Developing Work Performers

A work performer is an application that performs an operation or set of operations that is associated with a workflow.

Typically, work performers have the following attributes:
  • They are designed without a user interface.
  • They are used to perform automatic workflow operations, such as those associated with a specific step in a workflow definition.
Here are some work performer operations that are associated with workflow steps:
  • Logging in to and establishing a workflow system session
  • Polling a user or system queue (to find operations that are related to a particular workflow step)
  • Locking the retrieved object
  • Processing the work (such as performing updates of data, or saving)
  • Cycling back to queue polling

There are two types of work performers:

Component Integrator-Based Work Performers

This type of work performer is a component based on either a Java™ class or a Java Message Service (JMS) event. A Java component can be used to perform all operations that are associated with a workflow. The Component Integrator enables the importing of Java or JMS components and interfaces to make them available from steps in workflows. It also manages the communication of events between the Content Platform Engine and a Java or JMS (Java Message Service) queue. A workflow step can then call a Java component to perform custom operations, or (for JMS) post an event to a message queue.

The Component Integrator uses the following facilities:

  • Component Manager

    configures and communicates with the service adapters. At run time, Component Manager polls component queues for work items that request Java Message Service (JMS) or processing by Java components. It connects a work item that is requesting a component to the appropriate service adapter:

    • Java Adapter
      The Java Adapter handles Process calls to Java objects. The calls are represented to the Content Platform Engine as operations on queues (work items), where each operation is done by a method of the Java class. The Java Adapter performs the following sequence of actions:
      • Runs the interface to the Java component
      • Automatically waits for a response from the component
      • Updates the work item
      • Dispatches the work item to the next workflow step
    • JMS Adapter

      Places messages on the JMS Queue and dispatches the associated work item. The JMS Adapter handles posting of Process events to a message queue. The posting is in the form of an XML event based on the step element for the operation.

  • Component Queues

    You can create and configure the queues that are necessary for your Java or JMS components.

The following figure illustrates the Component Integrator architecture:

Component Integrator Architecture

The following tools are integral to the development of Component Integrator-based work performers:
  • The administration console is the tool to use to create and configure queues for your Java components (classes) and JMS components (event messages).
  • The Process Designer is a UI for workflow design. By using the Process Designer, you can insert operations that are associated with component queues into workflow steps.

For development instructions, see Developing Component Integrator-Based Work Performers.

How Component Integration Works

A component step is a component that was created as a step in a workflow. When a running workflow has a work item that reaches a component step, the Component Integrator automatically does the following actions:

  1. Defines a Process operation that associates parameter values with a component method. Using Process operations, you can pass work item field values to a component method. The method can then automatically update the work item field values.
  2. Waits for a response from the component method.
  3. Updates work item field values according to any changes that resulted from the execution of the component method.

    Component Integrator can update work items values automatically. In contrast, updating data field values with ordinary custom step processors is not automatic. It requires explicit Process Java API calls.

  4. Saves the work item.
  5. Unlocks the work item.
  6. Completes the step by dispatching the work item to a subsequent step.

Daemon-Based Work Performers

A daemon-based work performer can be used to perform all normal operations that are associated with a workflow step. In contrast, the scope of work for a Component Integrator-based work performer is all operations in a workflow. An example of the use of a daemon-based work performer is obtaining Step operations from a queue. (Unlike the Component Integrator-based Work Performer, you must specify polling).

You can build a custom daemon-based work performer by using the Process Java API. For this information, see Developing Daemon-Based Work Performers.