Workflow XML file
The workflow XML file declares the nodes to be used in a workflow and the connections between them.
The <nodes> section must include every node that can be called. The
<connections> section directs the flow from one node to the next. When the Business Rules Server processes a client application message, it calls the first node in the
<nodes> list and then follows the flow as defined in the
<connections> section.
This example uses a PVR transaction workflow, but the concepts apply to all workflows. After the PvrRoutingTransitNode runs, control is passed to the PvrAccountNode. After the PvrAccountNode, control goes to the PvrProcessControlNode, and on down the list. This example shows all of the available PVR nodes.
<?xml version="1.0" ?>
<workflowDescriptor name="ipdPvrItemWorkflow">
<nodes>
<node name="PvrRoutingTransitNode"/>
<node name="PvrAccountNode"/>
<node name="PvrProcessControlNode"/>
<node name="PvrAuxOnUsNode"/>
<node name="PvrAmountNode"/>
<node name="PvrField4Node"/>
<node name="PvrExtProcCodeNode"/>
<node name="AutoCorrectNode"/>
<node name="PvrEndorseNode"/>
<node name="PvrPocketMapNode"/>
</nodes>
<connections>
<connection srcName="PvrRoutingTransitNode" dstName="AutoCorrectNode"
results="FAILURE" recordId="61"/>
<connection srcName="PvrRoutingTransitNode" dstName="AutoCorrectNode"
results="SUCCESS">
<paymentCheck field="ibmNprValidationError" operator="EQ" value="true"/>
</connection>
<connection srcName="PvrRoutingTransitNode" dstName="PvrEndorseNode"
results="SUCCESS">
<paymentCheck field="ibmNprControlDoc" operator="EQ" value="true"/>
</connection>
<connection srcName="PvrRoutingTransitNode" dstName="PvrAccountNode"
results="SUCCESS"/>
<connection srcName="PvrAccountNode" dstName="AutoCorrectNode"
results="FAILURE" recordId="83"/>
<connection srcName="PvrAccountNode" dstName="PvrProcessControlNode"/>
<connection srcName="PvrProcessControlNode" dstName="PvrField4Node"/>
<connection srcName="PvrField4Node" dstName="PvrAuxOnUsNode"/>
<connection srcName="PvrAuxOnUsNode" dstName="PvrExtProcCodeNode"/>
<connection srcName="PvrExtProcCodeNode" dstName="PvrAmountNode"/>
<connection srcName="PvrAmountNode" dstName="AutoCorrectNode">
<paymentCheck field="ibmNprValidationError" operator="EQ" value="true"/>
</connection>
<connection srcName="PvrAmountNode" dstName="PvrEndorseNode"/>
<connection srcName="AutoCorrectNode" dstName="PvrRoutingTransitNode"
results="SUCCESS"/>
<connection srcName="AutoCorrectNode" dstName="PvrEndorseNode"/>
<connection srcName="PvrEndorseNode" dstName="PvrPocketMapNode"/>
</connections>
</workflowDescriptor>
In a PVR transaction workflow, the PvrRoutingTransitNode must be the first of the PVR nodes set. All PocketMapNode nodes must be the last ones set. The remaining PVR nodes can be configured in any order.
Other node types, for example ESortNode and UserNode, can also be used in setting up the workflow. No restrictions exist for the number of or the location of these nodes in the connections list.
The next example shows how to control the downstream flow based on the execution results of a node. The
first line in the connections list was added with the results=FAILURE qualifier. It can be
interpreted as "if the RTNode returns with a failure, run the PocketMapNode next; otherwise, check the next
connection in the list".
<?xml version="1.0" ?>
<workflowDescriptor name="PvrWorkflow">
<nodes>
<node name="RTNode"/>
<node name="AccountNode"/>
<node name="ProcessControlNode"/>
<node name="AuxOnUsNode"/>
<node name="AmountNode"/>
<node name="EndorseNode"/>
<node name="PocketMapNode"/>
</nodes>
<connections>
<connection srcName="RTNode" dstName="PocketMapNode"
results="FAILURE"/>
<connection srcName="RTNode" dstName="AccountNode"/>
<connection srcName="AccountNode" dstName="ProcessControlNode"/>
<connection srcName="ProcessControlNode" dstName="AuxOnUsNode"/>
<connection srcName="AuxOnUsNode" dstName="AmountNode"/>
<connection srcName="AmountNode" dstName="EndorseNode"/>
<connection srcName="EndorseNode" dstName="PocketMapNode"/>
</connections>
</workflowDescriptor> <connection srcName="RTNode" dstName="AccountNode"
results="SUCCESS"/>
<connection srcName="RTNode" dstName="PocketMapNode"/>
<connection srcName="AccountNode" dstName="ProcessControlNode"/>
<connection srcName="ProcessControlNode" dstName="AuxOnUsNode"/>
<connection srcName="AuxOnUsNode" dstName="AmountNode"/>
<connection srcName="AmountNode" dstName="EndorseNode"/>
<connection srcName="EndorseNode" dstName="PocketMapNode"/>- The omission of the results qualifier means to always go to the destination node.
- The connections list is scanned from beginning to end. Processing starts when the node name is located.
- The workflow control program returns to the client when it makes it all the way through the list without finding a destination node.
<connections>
<connection srcName="RTNode" dstName="PocketMapNode" results="FAILURE"/>
<connection srcName="RTNode" dstName="PocketMapNode" results="SUCCESS">
<paymentCheck field="ibmNprValidationError" operator="EQ" value="true"/>
</connection>
<connection srcName="RTNode" dstName="AccountNode"/>
<connection srcName="AccountNode" dstName="ProcessControlNode"/>
<connection srcName="ProcessControlNode" dstName="AuxOnUsNode"/>
<connection srcName="AuxOnUsNode" dstName="AmountNode"/>
<connection srcName="AmountNode" dstName="EndorseNode"/>
<connection srcName="EndorseNode" dstName="PocketMapNode"/>
</connections>The <paymentCheck> element
identifies the field name, the operator, and the value that is used to run the compare. In the previous
example, if the result is successful and the value of the ibmNprValidationError data field
at the time the RTNode returns is equal to true, control passes to the PocketMapNode.
- EQ - equal
- NE - not equal
- LT - less than
- GT - greater than
- LE - less than or equal
- GE - greater than or equal
- Null - value is null
- NotNull - value is not null
- Current - value is current
- NotCurrent - value is not current
- CurrentNotNull - value is current and not null
<connections>
<connection srcName="RTNode" dstName="PocketMapNode" results="FAILURE"/>
<connection srcName="RTNode" dstName="PocketMapNode" results="SUCCESS">
<paymentCheck field="ibmNprValidationError" operator="EQ" value="true"/>
<paymentCheck field="ibmNprCredit" operator="EQ" value="true"/>
</connection>
<connection srcName="RTNode" dstName="AccountNode"/>
<connection srcName="AccountNode" dstName="ProcessControlNode"/>
<connection srcName="ProcessControlNode" dstName="AuxOnUsNode"/>
<connection srcName="AuxOnUsNode" dstName="AmountNode"/>
<connection srcName="AmountNode" dstName="EndorseNode"/>
<connection srcName="EndorseNode" dstName="PocketMapNode"/>
</connections><paymentCheck> element to true. In the following example, all three of the conditions
must be met to continue to the next connection.
<connection srcName="ValMICRValNode" dstName="ItemReviewsRequiredNode">
<paymentCheck field="ibmNprValidationError" operator="EQ" value="0" and="true"/>
<paymentCheck field="ibmAmountDelta" operator="NE" value="0000000000" and="true"/>
<paymentCheck field="ibmClientType" operator="EQ" value="Repair"/>
</connection> <connection srcName="ValMICRValNode" dstName="ItemReviewsRequiredNode">
<paymentCheck field="ibmNprValidationError" operator="EQ" value="0" and="true"/>
<paymentCheck field="ibmClientType" operator="EQ" value="Payment Repair"/>
<paymentCheck field="ibmNprValidationError" operator="EQ" value="0" and="true"/>
<paymentCheck field="ibmClientType" operator="EQ" value="Auto Adjust"/>
</connection>This
example implements the following
logic.If ((ibmNprValidationError==0 AND ibmClientType=="Payment Repair") OR
(ibmNprValidationError==0 AND ibmClientType=="Auto Adjust"))
goto ItemReviewsRequiredNode<paymentCheck> element.- If the field name is not known by the workflow (for example, it is not found in the DecisionRequest data field collection), it is ignored. Check the spelling because the field name is case-sensitive.
- For all operators except the NotCurrent operator, the conditional doesn't succeed when the condition of the data field is notCurrent.
- BYTE data types are treated as Shorts. The number must be between -32768 and 32767. CHAR types are now supported.
- It interprets true and false in the value field as Boolean values. Only the EQ and NE operators work with Boolean data fields.
<paymentCheck> element is added to an existing
<connection>, the implicit forward slash terminator at the end of the element must be
removed and the explicit </connection> terminator must be added.recordId="61", sets the
ibmNprRecordId field to 61 and the ibmNprValidationError field to true.
These fields are located in the DecisionRequest object. Only invalid record IDs can be set
this way. No range checking is done on the record ID value.
<connections>
<connection srcName="RTNode" dstName="PocketMapNode"
results="FAILURE" recordId="61"/>
<connection srcName="RTNode" dstName="PocketMapNode"
results="SUCCESS">
<paymentCheck field="ibmNprValidationError" operator="EQ" value="true"/>
<paymentCheck field="ibmNprCredit" operator="EQ" value="true" recordId="62"/>
</connection>
<connection srcName="RTNode" dstName="AccountNode"/>
<connection srcName="AccountNode" dstName="ProcessControlNode"/>
<connection srcName="ProcessControlNode" dstName="AuxOnUsNode"/>
<connection srcName="AuxOnUsNode" dstName="AmountNode"/>
<connection srcName="AmountNode" dstName="EndorseNode"/>
<connection srcName="EndorseNode" dstName="PocketMapNode"/>
</connections>