Async Scope

 

The Async scope is a branch processing block that executes simultaneously with the main flow. The main flow continues to execute while it initiates and processes the Async processing. The flow does not have to pause until the last message processor embedded in the asynchronous flow has completed its task.

Async can be useful for executing time-consuming operations that do not require you to send a response back to the initiating flow.

The Async sends one copy of the message it has received to the first embedded message processor in its own processing block. At the same time, it sends another copy of the message to the next message processor in the main flow.

Limitations of Async:

  • Does not pass data back to the main flow
  • Is not called by a Flow Reference component.
  • Is not reusable
  • Does not inherit the exception strategy of the main flow

To handle Error in async scope you can use the Try Block

Configure the listener and drag and drop the Async activity

In the below scenario we will insert the Data in table and same data will write into file using async.

Async Scope

 

You can also defined the max concurrency with Async block

Async Scope

 

Deploy the project and test from soapui

Data Inserted successfully in table

Async Scope

File has written under test directory

Sample Application:Async Scope Sample

Sample Soap UI Project: Async scope sample soapui project

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments