Main Content

Join or Fork Node

Synchronize multiple input tokens into one output, or replicate one input token on all output flows

Since R2024a

  • Join or Fork Node

Description

A Join or Fork Node block is represented by a thick gray line with rounded ends. You can use the Join or Fork Node block for either join or fork functions, depending on how you configure input and output token flows.

  • Join node — Consists of only one output token flow, but can have multiple input token flows

  • Fork node — Consists of only one input token flow, but can have multiple output token flows

Join

The purpose of the join node is to join all incoming token flows, including control flows, into one output flow. When an object token is present on all input flows, the join node synchronizes these tokens into one consolidated token that exits through the output flow. When a control token is present on all input flows, the join node outputs one representative control token. The data type of all input object tokens to the join node must be the same.

Fork

The function of the fork node is to replicate the incoming token, and send a copy to each output flow.

Create a Join or Fork Node

You can create a join or fork node on the activity diagram canvas in two ways:

  • Drag and drop the Join or Fork Node block from the palette on the left to any location on the canvas.

  • Hold down the left mouse button at the desired location on the canvas and drag in any direction. A blue outline of a node appears on the canvas. Select Create JoinFork from the horizontal menu that appears below the outline.

Limitations

A block which combines the join and fork functionality (in that order) is not supported. As a result, you cannot configure a Join or Fork Node block to have multiple input and output flows.

Version History

Introduced in R2024a