Subflow or Called Workflow Example
The workflow described in the previous section calls the following workflow using the InitiateSubFlow activity:
<?xml version="1.0"?> <Workflow Version="0.1"> <Owner>TIBCO</Owner> <Name>wfin26test1</Name> <Description lang="en">Test subflow activity</Description> <Parameter direction="in" eval="variable" type="document" name="inDoc">1</Parameter> <Parameter direction="in" type="String" eval="variable" name="InStatus">TestInStatus</Parameter> <Parameter direction="out" eval="variable" type="document" name="OutDoc">workDoc</Parameter> <Parameter direction="out" eval="variable" type="String" name="status">finalStatus</Parameter> <Parameter direction="out" eval="variable" type="boolean" name="statusFlag">finalStatusFlag</Parameter> <Parameter direction="out" eval="constant" type="long" name="statusValue">10</Parameter> <Parameter direction="out" eval="variable" type="recordList" name="outRecordList1">workRecordList</Parameter> <Activity Name="AddMsgInfoToEvent"> <Action>UpdateEvent</Action> <Start/> <Description lang="en">Initialize Event Info</Description> <Parameter direction="in" type="string" eval="constant" name="eventState">START</Parameter> <Parameter direction="in" name="eventDescriptor" type="string" eval="xpath" source="/Message/Body/Document/@subtype">inDoc</Parameter> <Parameter direction="in" eval="constant" type="String" name="finalStatus">finalStatus1</Parameter> <Parameter direction="in" eval="constant" type="boolean" name="finalStatusFlag">true</Parameter> <Parameter direction="in" name="deploymentMode" type="string" eval="xpath" source="/Message/@messageType">inDoc</Parameter> <Parameter direction="in" name="dbDirectLoadDump" type="string" eval="constant">N</Parameter> <Parameter direction="in" name="eventType" type="string" eval="constant">CAT</Parameter> </Activity> <Activity Name="TestSubflow"> <Action>NoOperation</Action> <Description>Test Subflow</Description> <Execution>ASYNCHR</Execution> <Parameter direction="in" type="string" eval="constant" name="eventState">SPAWNWORKFLOW</Parameter> <Parameter direction="in" type="document" eval="variable" name="InDocument">inDoc</Parameter> </Activity> <Activity Name="ManageRecordCollection"> <Description lang="en">Create Bundles in the Record Collection</Description> <Action>ManageRecordCollection</Action> <Parameter direction="in" type="string" eval="constant" name="eventState">CREATEBUNDLE</Parameter> <Parameter direction="in" name="BundlingOption" type="boolean" eval="constant">false</Parameter> <Parameter direction="in" name="VersionOption" type="string" eval="constant">LATEST</Parameter> <Parameter direction="out" name="OutRecordList" type="recordlist" eval="variable">workRecordList</Parameter> </Activity> <Transition FromActivity="AddMsgInfoToEvent" ToActivity="TestSubflow"/> <Transition FromActivity="TestSubflow" ToActivity="ManageRecordCollection"/> </Workflow>
Output Parameters
This workflow has following output parameters:
- outRecordList1 — Record list. Value is assigned by local variable workRecordList which is the output of the ManageRecordCollection activity.
- statusFlag — Boolean. Value is assigned by local variable finalStatusFlag which is the output of AddMsgInfoEvent activity.
- status — String. Value is assigned by local variable finalStatus which is the output of the AddMsgInfoEvent activity.
- statusValue — Long. Assigned a constant value of 10.
Copyright © Cloud Software Group, Inc. All rights reserved.