Hi Friends, in this article I would like to explain parallel processing in Logic App. Parallel Processing in Logic app is a mechanism by which two or more different actions can take place concurrently but independently.
Consider an example that calls 2 independent list of Services in parallel and One with 25 seconds of delay. First we shall see how our Parallel Shape would look like inside Logic App Designer,
In this Logic App,
- There is a Request shape which receives the request.
- Initialize shape to initialize a Integer variable “PostNumber” to 0
- Branch (kind of) shape has 2 wings in it.
- The first wing has 2 REST calls with a Delay of 25 seconds
- Second wing has 2 REST calls.
- Once the execution over in both the sides, we combine both the outputs and form the response.
- The control flow will continue and return the response only if both wings are completed in the Branch shape.
REST Service looks like below and in the URL we pass PostNumber variable.
it returns Latin language so we call Google translation API Service to Convert it into English.
Logic App waits till first wing’s execution to get over
At the moment, we cant bring a parallel branch shape in the Logic App Designer but using runafter() element in the code window, we could achieve it. In this case, “Increment_PostNumberBy1” and “Increment_PostNumberBy2” has same runafter() value that is Initialize_Variable.