Launch execution

Understanding what happens when a Launch is started

David Li avatar
Written by David Li
Updated over a week ago

Launching a Wrkflow starts the execution of the Wrk Actions within the Wrkflow.

The parameters provided at launch is passed to the Wrkflow execution engine starting with the first Wrk Action in the Wrkflow. The first Wrk Action is the one that is directly connected to the launch icon on the Designer canvas.

Launch icon in the Wrkflow Designer

Each Wrk Action is then passed to the appropriate sub engine for execution depending on the type of Wrk Action it is. A Wrk Action can be completed by a bot that is powered by Wrk, or sent to the API of a 3rd party system that will do the execution, or even sent to a human that can complete the task manually. The execution engine will automatically handle the assignment and execution.

Order of execution

The Wrk Actions are executed in the same order as they are shown in the Designer. In the example below, the Wrk Action will be executed in the following order: WA-1, WA-2, WA-3

Simple example of a 3 Wrk Action Wrkflow

Wrkflow Branching

In a simple linear Wrkflow, it is assumed that there is only one path that the execution engine will follow - which is starting with the first Wrk Action and ending with the last. However you may want to do branching to handle non linear paths or to execute multiple steps in parallel.

Outcome Branching

A Wrk Action can have multiple outcomes, where the execution engine will decide on the next step based on the completion outcome of the Wrk Action.

In the following example, the Wrk Action "Search company profile..." has two outcomes: "Success" and "No Result". The execution engine will start the next Wrk Action after WA-1 based on its outcome. In the case of a "Success" outcome, the next Wrk Action that will get executed is "Retrieve company details..."; and in the case of "No Result" outcome, the next Wrk Action that will get executed is "Search places in Google Maps...".

In the case of a branching by Wrk Action outcome, the execution will continue on either one branch or the other, not both.

Branching based on outcome

Parallel Branching

In parallel branching, the execution engine will execute the next steps at the same time. Each branch having its own execution scheduling.

In the following example, the connecting lines between the top Wrk Action are originating from the same Wrk Action and the same outcome. Meaning a successful outcome will initiate the execution of the next two Wrk Actions that follows.

In the case of parallel branching, the execution will continue on both branches at the same time.

Divide Branching

Divide is another form of branching that baked into some Wrk Actions to improve the performance of execution. Divide branching is mostly managed automatically by the Wrk Platform and less user manageable. To learn about Divide, refer to this article.

Ending Execution

The execution will end automatically when all branches reach a 'dead end' in the Wrkflow. A dead end is an outcome of a Wrk Action that is not connected to any other Wrk Action. When there is no more Wrk Action to execute, the launch is considered as completed.

Execution can be stopped when a Launch is paused. When paused, the execution engine will complete any Wrk Action that was currently in the process of being completed, but will not continue to the next Wrk Action. A Launch can be paused by you, or directly by the execution engine when there are too many errors or there are no more credits available.

Did this answer your question?