Example 1
This conditional transition example loops through the InternalApprovalWorkItemModify activity, until all participants approve the modification or one of them rejects the modification.
<Rule> <Parameter name="wicreated" type="boolean" eval="variable" direction="in">approvalFlag</Parameter> <Parameter name="numberCreated" type="long" eval="variable" direction="in">NumberCreated</Parameter> <Parameter name="numberCompleted" type="long" eval="variable" direction="in">NumberCompleted</Parameter> <Parameter name="response" type="string" eval="xpath" source="/Message/Body/Document/BusinessDocument/CatalogAction/CatalogA ctionHeader/CatalogActionHeaderAck[last()]/AcknowledgmentCode/Code/Val ue/text()" direction="in">workDoc</Parameter> <Parameter name="result" type="boolean" direction="out" /> <Condition format="bsh"> <![CDATA[ result = ((wicreated) && (numberCompleted < numberCreated) && (!((response != null) && (response.equalsIgnoreCase("Reject"))))); System.out.println("Transition InternalApprovalWorkItemModify to InternalApprovalWorkItemModify result - " + result + " Created = " + numberCreated + " Completed = " + numberCompleted + " Response = " + response); </Condition> </Rule> <Rule> <Parameter name="workitemcreation" type="boolean" eval="variable" direction="in">approvalFlag</Parameter> <Parameter name="result" type="boolean" direction="out" /> <Condition format="bsh"> <![CDATA[ result = workitemcreation; System.out.println("In transition from Modify to MoveToNext. The result is:"+result+ ", WI created is:"+workitemcreation); </Condition> </Rule>
Copyright © Cloud Software Group, Inc. All rights reserved.