Workflow Descriptor

The workflow descriptor defines a Business Rules workflow. It is the highest level of processing and it names the nodes which comprise the workflow and any connections between the nodes. Each connection names the source node, destination node, and whether the connection is executed as a result of a success or failure from the source node. In the workflow in Figure 1, the workflow is comprised of three nodes: Node1, Node2, and Node3. The workflow begins in Node1 and, if Node1 is successful, it invokes Node2. If Node1 has a failure, it invokes Node3.
Figure 1. Workflow Descriptor
gpy_izwc_wf1descriptor.jpg
The following workflow descriptor defines the WF1 workflow shown in Figure 1:
<?xml version="1.0"?>
<workflowDescriptor name="WF1">
  <userExitClass>WorkflowUserExit</userExitClass>
  <nodes>
    <node name="Node1"/>
    <node name="Node2"/>
    <node name="Node3"/>
  </nodes>
  <connections>
    <connection srcName="Node1" dstName="Node2" results="SUCCESS"/>
    <connection srcName="Node1" dstName="Node3" results="FAILURE"/>
  </connections>
</workflowDescriptor>

The workflowDescriptor element is the root element and holds the remainder of the elements. The workflow to be defined must be specified. The nodes element is a container for the individual node names. Each node element specifies the name of a Business Rules node. The first node in the workflow should be the first node listed. The connections element specifies the source node name, destination node name, and the result from the source node which triggers the move to the destination node. Additionally, the workflowDescriptor element may contain a userExitClass element. The userExitClass element specifies an optional user exit which is invoked before and after the processing of the workflow. The user exit must implement the defined workflow user exit interface.