Example of Error Handling in Sybflow
Subflow snippet:
<?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="out" name="errorFlag" type="boolean" eval="variable">errorFlag</Parameter> <Activity Name="SetErrorFlag"> <Action>NoOperation</Action> <Description lang="en">Set the error flag</Description> <Parameter direction="in" name="errorFlag" type="boolean" eval="constant">true</Parameter> </Activity> <Transition type="error" FromActivity="Any" ToActivity=" SetErrorFlag" /> </Workflow>
Parent workflow snippet:
<Activity Name=" CallTestSubflow"> <Action>InitiateSubFlow</Action> <Description>Calling Test Subflow</Description> <Execution>SYNCHR</Execution> <Parameter direction="in" type="string" eval="constant" name="eventState">SPAWNWORKFLOW</Parameter> <Parameter direction="in" type="string" eval="constant" name="ProcessID">standard/workflow/wfin26Test1</Parameter> <Parameter direction="in" type="document" eval="variable" name="InDocument">inDoc</Parameter> <Parameter name="errorFlag" type="boolean" eval="variable" direction="out">errorFlag</Parameter> </Activity> <Transition FromActivity="CallTestSubflow" ToActivity="RejectDueToWorkflowError"> <Description>If error in subflow</Description> <Rule> <Parameter name="errorFlag" type="boolean" eval="variable" direction="in">errorFlag</Parameter> <Parameter name="result" type="boolean" direction="out" /> <Condition format="bsh"> <![CDATA[ result = (errorFlag); System.out.println("Error Flag in Parent workflow - " + errorFlag); </Condition> </Rule> </Transition>
Copyright © Cloud Software Group, Inc. All rights reserved.