You can build a work performer that is based on either a Java™ or Java Message Service (JMS) component queue. For
either of these types of work performers, you need to do some preparatory work.
To develop a Component Integrator-based work performer, do the following actions:
Before you create a JMS component queue, set up access to a JMS queue:
- Find the Java Naming and
Directory Interface (JNDI) InitialContextFactory information.
- Before you configure the component queue for JMS, you must know the name of the JMS queue to
which you intend to post workflow messages.
Before you create a Java component queue, deploy a custom
Java class:
- The Java class needs to conform to the following
requirements:
- (Optional) Create the
Java Authentication and Authorization Service (JAAS)
authentication modules and login configuration file for your class, as follows:
- Create a LoginModule class for the systems your class accesses. Creation and
use of LoginModule classes is described in the JAAS documentation (Security Information).
- Create the JAR file to hold your custom Java class and its
corresponding LoginModule class.
- Use the application server administration tool to configure a JAAS Login Configuration file that
contains a LoginContext section (which specifies your LoginModule class).
Refer to Authentication and JAAS.
- Create a code module that contains the jar files with all of the items that are required by
custom component.
- Create and configure a component queue for the deployed custom Java class or the JMS queue. Only one class or JMS queue can be associated with a single
workflow system component queue. However, you can configure multiple component queues for any
particular class or JMS queue by assigning different names to the additional component queues. For
information about creating component queues, see Creating component
queues.
- When you configure a Java component queue:
- Associate queue operations with the public methods of the deployed custom Java component.
- Where applicable, associate each parameter of a Java class
method with a corresponding operation parameter that is defined for the Component Queue. (This
association is irrelevant when a method has no parameters).
- When you specify the polling rate:
The polling rate specifies the default polling rate when
there is work available. The polling rate setting determines the rate at which the Component Manager
polls component queues for work items that are requesting services. This rate is normally set to a
few seconds (specified in milliseconds).
- When you specify the batch size:
The batch size specifies the number of step elements to
query per batch at run time. The suggested minimum is 10.
- When you specify operation parameter types:
An attempt to import an incorrect parameter type
for a component method causes the import to fail. For specific type mapping information, see Component Operation Parameter Types.
Important: Ensure that you commit your changes.
- Author a workflow. Use the Process Designer tool to do the following actions:
- Add a workflow
step that includes at least one of your Java or JMS
components. This associates the operations for a component queue with a step.
- Defining the parameter values of each operation as an expression. This expression can include
the field values of a work item that are retrieved from the component queue.
For an example, see
the Content-Extended Operations
example.
- Launch a workflow
that uses your integrated component step and test the component operations.
How the Component Queues are
Processed
The Component Manager manages the processing between
the workflow system and the Java or
JMS service adapters. Component authentication takes place when the
service adapter initializes.
Java Component
Queues
When a work item is passed to a step that uses a Java
component queue, the Java service adapter does the following
actions:
JMS Component Queues
When a work item is passed to a step that uses a JMS component queue, the JMS service adapter
does the following actions:
- Sets the values of the operation parameters. These values are
defined by:
- The configuration for the associated component queue.
- The expression that is specified for the workflow (by using Process Designer). The expression can include field values from the retrieved
work item.
- Passes the values of the operation parameters into the stepElement object.
- Marshals the stepElement object for that step
into an XML String that represents the stepElement object.
- Posts the XML String representing the stepElement object
to the external JMS queue configured for the service adapter.
- The work item is not updated. For JMS component queue processing,
the field values of the work item are available for reading only.
- Completes the step by dispatching the work item to a subsequent step. For more information, see
Completing the step.