Interface Plugin

All Known Implementing Classes:
AbstractPlugin, AccessPlugin, AnalysisPlugin, ApplicationPlugin, ApproverPlugin, DocumentComposerPlugin, EventLogPlugin, HistoryPlugin, IntervalPlugin, LogPlugin, MailPlugin, OwnerPlugin, ReportPlugin, ResultPlugin, RulePlugin, SplitAndJoinPlugin, TaxonomyPlugin, VersionPlugin

public interface Plugin
A Plugin defines the interface between the WorkflowKernel and the WorkflowManager. Each Plugin have to be registered to the WorkflowKernel by the WorkflowManager. The WorkflowKernel executes all registered Plugins when processing a workflow event. A Plugin may throw a PluginException in case the execution failed. This will stop the execution of the process method. A Plugin methods init() and close() can be implemented by Plugin to initialize or tear down external resources or data.
Version:
2.0
Author:
Ralph Soika
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(boolean rollbackTransaction)
    This method is called after all plugins are executed by the WorkfloKernel.
    void
    init(WorkflowContext workflowContext)
    This method is called before the WorkflowKernel starts the execution.
    run(ItemCollection document, ItemCollection event)
     
  • Method Details

    • init

      void init(WorkflowContext workflowContext) throws PluginException
      This method is called before the WorkflowKernel starts the execution. A plugin can for example initialize external resources or data.
      Parameters:
      workflowContext - defines the context in which the plugin runs. The context can be used to get information about the environment
      Throws:
      PluginException
    • run

      Parameters:
      document - the workitem to be processed
      event - the workflow event containing the processing instructions
      Returns:
      updated workitem for further processing
      Throws:
      PluginException
    • close

      void close(boolean rollbackTransaction) throws PluginException
      This method is called after all plugins are executed by the WorkfloKernel. A plugin my tear down external resources.
      Parameters:
      rollbackTransaction - indicates if the current transaction will be rolled back.
      Throws:
      PluginException