Async subflow execution

Async subflow execution

Comments

  • If you have two [Start Linked Flow Async] steps one after another, will they run in parallel or one after another?

  • Because of the way asynchronous subflows work, they will be executed in the order they are created. [color=rgb(102, 102, 102)]The [Start Linked Subflow Async] step creates a Thread Job and adds it to the Decisions systems [/color][color=rgb(102, 102, 102)]Default Queue[/color][color=rgb(102, 102, 102)]. If there are hundreds or thousands of thread jobs in that cue before you started a flow with your [Start Linked Subflow Async] steps, their execution may be delayed since Thread Jobs are executed on a single thread in the order they are added to the queue. You can see this queue by navigating to System > Administration > System Tools > Event Viewer > Thread Jobs(page). [/color]To see how this works, we can create a flow with two run subflow async steps. You can create another flow with a pause step set for two minutes and a show popup step. Run the parent flow and go to Event Viewer > Thread Jobs. Note the number of jobs in the queue listed in the bottom right corner. Start the main flow in another tab and refresh Active Thread Jobs. You will notice that the Default Queue has grown. The first subflow will [b]always[/b] show its popup before the second subflow, and if the first subflow takes two minutes to execute, the second subflow will not start until the first subflow finishes.

    [i]edited by james.hartzell@decisions.com on 10/24/2019[/i]
    [i]edited by james.hartzell@decisions.com on 10/31/2019[/i]

Sign In or Register to comment.