webMethods step by step flow services branching
TASK: Creation of Flow Services - Branch
OS: WindowsOS
Platform: webMethods 7.1.2
Overview
In this scenario we will create business logic using two different Branch steps: one to test for contents of a variable, and one to evaluate labels associated with logic.
1) In acme.PurchaseOrder.work subfolder, create a new Flow service called branchEx
2) Define the inputs and outputs of branchEx, input string as testVar and output string as message
3) Add Branch code to the service to write a message to the server log, with the text of the message depending on the contents of the input testvar.
Ex: If testvar=true, write a message saying âThe output value is trueâ
è Add a Branch statement to your service. Specify testvar as the switch property and make evaluate labels property to false.
è Add a pub.flow.debugLog statement below the Branch and in properties set the label property to true
Go Go to the pipeline of service pub.flow.debugLog and set the value for the variable message as âThe output value is trueâ. So, whenever your input is true it invokes the debugLog service writing the text âThe output value is trueâ onto the server log.
4) In the same way now add other three debugLog services and give the label property in the properties tab to perform actions whenever you provide the testvar variable value input as false, novalue or someother value(default) to write the appropriate content to the server log
The second functionality of Branch is evaluating labels and determining actions to be takenâ¦it can evaluate Arithematic and other operators to perform operations.
è Now take another server Branch1 provide input variables as account and cost with output variable as message and at properties tab set evaluate labels property to true.
è Now, take three debugLog services and label them as shown below
è IS will check the input value basing on the input value it will run the branch and corresponding service.
Similar Blogs:
webMethods step by step creating Packages and...
webMethods step by step creating sample docum...
