fork

The fork keyword executes several statement blocks sequentially.

Purpose

The fork statement is a ruleflow statement used to execute several statement blocks in sequence.

Context

Body of flowtask blocks

Syntax

fork 
{ruleflowStatement} &&
{ruleflowStatement}
[&& {ruleflowStatement}] *

Description

Use this statement to define several ruleflow statement blocks that execute sequentially. The flow continues after the fork statement when all the statement blocks of the fork statement have been executed.

Example

In the following fork statement, the first block is executes T1, then T2. When T2 finishes execution, the second block executes T3, then T4. When T4 finished, all the fork blocks are finished, T5 can be executed.

flowtask main
{
   body =
   {
      fork
      { T1; T2; }
      &&
      { T3; T4; }
   }
   T5;
};