Switch control flow

Switch is a select statement in Logic Apps that chooses a single switch action based on the input. When you have lots of if…else logic in your workflow, switch can be more efficient in terms of performance and overall workflow design. In the following Logic Apps workflow example with switch, we have a Logic Apps instance that listens for user sentiment through an HTTP endpoint and, based on the result, sends an auto-response to the calling application over HTTP using the request-response pattern:

In the workflow displayed in the preceding screenshot, we've parsed the request JSON payload with the Parse JSON action and have used a sentiment property to send a response back to the caller. The switch uses the same pattern as a primitive language construct. The code for this Logic Apps definition is displayed here:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.254.179