Running Steps Asynchronously with the Go Async Component
  • Updated on 09 May 2013
  • 2 minutes to read
  • Print
  • Dark
    Light

Running Steps Asynchronously with the Go Async Component

  • Print
  • Dark
    Light

The Go Async component allows subsequent flow steps to be run asynchronously, returning control immediately to the flow's calling entity (such as a parent flow, user or process). In other words, any steps placed after the Go Async component will run autonomously.
This can be useful for managing steps that are expected to take a long time and produce outputs that aren't required by the calling entity. Note that any outputs produced by steps subsequent to theGo Async component will not be available to the calling entity, since that entity will cease to have any insight into what they are doing.

Another useful application of this component is in error handling. If a non-critical error is thrown within a flow, (for example, in sending a non-critical email), the flow could initiate an error handling process using the Go Async component and then resume with the main process.
The Go Async component can be found in the Toolbox panel, under the categoryFlow Management .

Example

Our example flow will add a document containing a list of over 1,000 new subscriber email addresses to our process folder. Our flow will then send a welcome email to each one of those subscribers. Because the process of sending 1,000 emails will not return a necessary output, and because the process itself could take a very long time, we will make it happen autonomously with the Go Async component.
Our example flow has already been started with some functional components already in place. We will continue building it by going to our Designer Folder and clicking theEdit link on theSend EmailList Flow thumbnail.

2018-01-16_114229.png

In the Flow Designer , notice that the steps already in place are Email Address List (which provides the list of subscriber email addresses) and Send Email 1 (which will send welcome emails to those addresses). Both steps are configured and ready to go, except for the fact that they are unconnected.

2018-01-16_114314.png

After our example flow adds the list of email addresses to our process folder, we want it to begin autonomously sending the welcome emails, and immediately return control to the entity that called it. In this case, returning control to the entity is equivalent to immediately progressing to theEnd Step while Send Email 1 continues to send emails.
To do this, place the Go Async component in the flow between Email Address List and Send Email 1 . It is in the Steps panel, under the category Flow Management .

2018-01-16_114354.png

Next, connect Email Address List toGo Async 1, and Go Async 1 to Send Email 1 with their respectiveDone outcomes.

2018-01-16_114622.png

This completes our flow. To debug it, click the Debug Flow link at the top of the Flow Designer.
2018-01-16_114641.png

Our example flow progresses smoothly to Send Email 1 a step that ordinarily would take several minutes
2018-01-16_114721-1024x258.png

but, in this case, continues asynchronously while our flow continues uninterrupted to the End Step.

2018-01-16_114745-1024x547.png

Was this article helpful?