Posted on Leave a comment

Choice Router

Choice

Choice Router works on the evaluation of the expression i.e., True or False. The Route for which the expression evaluates to be True, that route is executed.

It executes routes sequentially i.e. if for both route-1 and route-2 condition expression evaluates to be true, it will execute only route-1 because of its sequential nature and will not execute route-2.

The expression cannot be kept as blank and there is a default block that executes if none of the expressions evaluates to True.

 

Use Case 1:-

in above picture,

we set the variable “Id” and  value is “payload.empId”.

We are sending empId in body section.

Response:-

 

Use Case 2:-

If “empId” is null , then this comes in the input then the Default route will be triggered.

We are sending Null empId in body.

Response:-

 

Leave a Reply

Your email address will not be published. Required fields are marked *