Gate Action - modelint/shlaer-mellor-metamodel GitHub Wiki

Conditional logic such as a Decision Action or a Switch Action may yield the same Labeled Flow, but with a different input depending on the condition (true/false) or (case) that was enabled during execution. The Gate Action lets us funnel two or more mutually exclusive Data Flow inputs into a single labeled output flow. Consider this Switch Action example:

^dir? {
    _up:
        // Get the lowest floor at or above the cabin
        nearest dest ||= destination heights(Height >= current floor height)(1, ^-Height)
    _down:
        // Get the highest floor below the cabin
        nearest dest ||= destination heights(Height < current floor height)(1, ^+Height)
}

The tuple flow labeled nearest dest received a different value depending on the enumerated _up or _down value of the dir input parameter.

So we need a way to show that a single tuple flow is output from this switch, but with a conditional input source. In the activity data flow diagram extract of the switch and its cases, a Gate Action ACTN16 inputs Data Flows F16 and F18 outputs the conditional input as Flow F19.

images/action/gate_action_10.png

During execution, the Gate Action does not manipulate or transform the input data in any way, it merely indicates that only one of the inputs will pass through, much like a hardware multiplexer.

This means that each Data Flow input to a Gate Action must share the same type and multiplicity (if not Scalar) which also matches the single output Data FLow.

By convention we rename the inputs to indicate the source Action with an initial underscore and use the assignment target name as the name of the output flow.

Identifiers

  1. ID + Acitivty + Domain
  2. Output flow + Activity + Domain

Attributes

No non-referential attributes.