Runtime components : Core components : Operations : Tasks : Defining operation steps
  
Defining operation steps
To define an operation step that performs an action and then directs the flow according the results of the action, use the following format:
<opStep id="opStepName" on0Do="action1" on1Do="action2"
onXDo="action3" onOtherDo="action4"/>
The following example defines a flow in which the operation flow performs the sendHost operation step if this operation step returns a 0, performs the rollback operation step if this operation step returns a 1, and exits the operation flow if this operation step returns any other number other than 0 or 1.
<opStep id="writeJournal" on0Do="sendHost" on1Do="rollback" onOtherDo="return"/>
To define an operation step that makes a comparison (CompareAssertion) and then directs the flow according to the results of the comparison, use the following format:
<opStep id="compare" onTrue="action1"
onFalse="action2" dataElementA="dataa"
dataElementB="datab" operator="anOper"/>
The following example performs a comparison in which the operation flow performs the next operation step if the amount is less than the limit. If the amount is more than the limit, the operation flow performs the error message operation step.
<opStep id="compare" onTrue="next"
onFalse="errorMessage" dataElementA="amount"
dataElementB="limit" operator="less"/>
To define an operation step that checks whether a data element exists (ExistsAssertion) and then directs the flow according to the results of the check, use the following format:
<opStep id="exists" onTrue="action1" onFalse="action2"
dataElement="data" negated="aBoolean"/>
The following example checks whether the amount data element exists and if it does, the toolkit performs the next operation step in the flow. If the amount does not exist, the operation flow performs the error message operation step.
<opStep id="exists" onTrue="next"
onFalse="errorMessage" dataElement="amount"/>
To define an operation step that checks the number of elements (NumOfElementsAssertion) in a collection and then directs the flow according to whether the number of elements conforms to the specified operator, use the following format:
<opStep id="elements" onTrue="action1"
onFalse="action2" dataElement="data" size="number"
operator="anOper"/>
The following example checks whether the list of accounts has two elements and if it does, the toolkit performs the next operation step in the flow. If the list of accounts has more or less than two elements, the operation flow performs the error message operation step.
<opStep id="elements" onTrue="next" onFalse="error1"
dataElement="accountsList" size="2" operator="equal"/>
For a description of the attributes of the <opStep> tag, see Operation step external definitions.
Go up to
Tasks