Class HistoryPlugin

  • All Implemented Interfaces:
    Plugin

    public class HistoryPlugin
    extends AbstractPlugin
    This Plugin creates a history log in the property txtWorkflowHistory. The history log contains a list of history entires. Each entry provides the following information:
    • date of creation (Date)
    • comment (String)
    • userID (String)
    Note: In early versions of this plugin the history entries were stored in a simple string list. The date was separated by the char sequence ' : ' from the comment entry. The userId was not stored explicit. This plugin converts the old format automatically (see method convertOldFormat)
    Version:
    2.0
    Author:
    Ralph Soika
    • Constructor Detail

      • HistoryPlugin

        public HistoryPlugin()
    • Method Detail

      • run

        public ItemCollection run​(ItemCollection adocumentContext,
                                  ItemCollection adocumentActivity)
                           throws PluginException
        Update the Log entry. The method tests if the deprecated property 'txtworkflowhistorylogrev' exists. In this case the old log format will be transformed into the new format see method convertOldFormat
        Parameters:
        adocumentContext - the workitem to be processed
        adocumentActivity - the workflow event containing the processing instructions
        Returns:
        updated workitem for further processing
        Throws:
        PluginException
      • convertOldFormat

        protected void convertOldFormat()
        This method converts the old StringList format in the new format with a list of separated values:
        • date of creation (Date)
        • comment (String)
        • userID (String)