Sequence Flow - modelint/shlaer-mellor-metamodel GitHub Wiki

An explicit sequence from one Action to one or more other Actions in the same Activity is defined with a sequence flow.

There are times when one Action must complete its execution before another set of Actions may begin. Usually this is due to a data or conditional dependency between the Actions.

But in some cases, there is no direct data or condition flow from the first Action to the dependent set of Actions. For example the first Action may need to complete a calculation and then update some instance's attribute value before the dependent Actions attempt to read that updated value. In such a case the modeler has two choices.

One possibility is to split the Activity across state boundaries. Entry into the second State guarantees completion of the updating Action. But there are times when it is more convenient to specify all of the Actions in the same Activity, yet still specify the execution sequence. To do this, we output a Sequence to one or more downstream Actions. Each downstream Action must wait until the Action outputting the Sequence Flow completes execution.

Here's an example of how this can be specified in Scrall using a labeled sequence token:

&R43 /R2/R28/Shaft Level( in.Floor ) <updated>
<updated> UI.New location( Shaft, floor: Current floor )

// <updated> is a named sequence token and it ensures that 2nd action executes
// after the first

In the above example, the first Action updates an attribute of a Shaft Level instance and then sets the updated sequence flow. The second action is prepended with this same sequence flow, so we know that it may not execute before the originating action. The dependent action set, in this example consists of only one Action which invokes an operation on the UI External Entity.

On a data flow diagram it can be seen as a dashed arrow output from an upstream Action leading to one or more downstream Actions.

If a given Action has more than one Sequence Flow input, it must wait until all of the source Actions have completed.

Identifiers

  1. Flow + Activity + Domain

Attributes

No non-referential attributes

⚠️ **GitHub.com Fallback** ⚠️