webMethods step by step flow services branching
Jun 16, 2012 21:44 0 Comments Development Asadul

 

 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

alt


2)  Define the inputs and outputs of branchEx, input string as testVar and output string as message


alt


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.


alt


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


alt

 alt


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

alt 

è IS will check the input value basing on the input value it will run the branch and corresponding service.

alt


alt


alt


alt



Similar Blogs: 

webMethods step by step creating Packages and...

webMethods step by step creating sample docum...

                Creating a sample flow service at webmethods ...

               webMethods step by step creation of Indices

Prev Next
About the Author
Topic Replies (0)
Leave a Reply
Guest User

You might also like

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect