A work performer is an application that performs an operation or set of operations associated with a workflow. Typically, work performers are designed without a user interface and are used to perform automatic workflow operations, such as those associated with a specific step in a workflow definition.
Work performer operations associated with workflow steps can include logging into and establishing a Process Engine session, polling a user or system queue (to find operations related to a particular workflow step), locking the retrieved object, processing the work (such as, performing updates of data, or saving), and cycling back to queue polling.
There are two types of 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 associated with a workflow. The Component Integrator enables the importing of Java or JMS components and interfaces to make them available from steps in Process Engine workflows, and manages the communication of events between the Process 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 makes use of the following facilities:
The Component Manager configures and communicates with the service adapters. At runtime, the Component Manager polls component queues for work items that request Java Message Service (JMS) or processing by Java components, and connects a work item requesting a component to the appropriate service adapter:
The Java Adapter handles Process calls to Java objects, represented to the Process Engine as operations on queues (work items), where each operation is done by a method of the Java class. The Java Adapter executes the interface to the Java component, then automatically waits for a response from the component, updates the work item, and dispatches the work item to the next workflow step
Places messages on the JMS Queue and dispatches the associated work item. The JMS Adapter handles posting of Process events to a message queue (in the form of an XML event based on the step element for the given operation).
Using the Process Configuration Console, you can create and configure the queues necessary for your Java or JMS components.
The following figure illustrates the Component Integrator architecture:
The following Process Engine tools are integral to the development of Component Integrator-based work performers:
For development instructions, see Developing Component Integrator-Based Work Performers.
How Component Integration WorksWhen a running workflow has a work item that reaches a component step (a component that has been created as a step in a workflow), the Component Integrator automatically does the following:
In contrast to the automatic updating of work item values that can be performed by the Component integrator, updating data field values with ordinary custom step processors is not automatic and requires explicit Process Java API calls.
A daemon-based work performer can be used to perform all normal operations associated with a workflow step, as opposed to the Component Integrator-based work performer's scope of 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 will have to specify polling).
You can build a custom daemon-based work performer using the Process Java API. For this information, see Developing Daemon-Based Work Performers.