Emitter - modelint/shlaer-mellor-metamodel GitHub Wiki

Within an Activity, a Sequence Flow establishes a control dependency between a single upstream Action and a downstream Action (if we think of control as a stream). So the downstream Action may execute only after the upstream Action has completed processing.

Ordinarily we might use a Data Flow to establish such a dependency, but sometimes the upstream Action is manipulating stored data (Class Attribute values) that will be processed by the downstream Action.

Now let's imagine that multiple upstream Actions must complete before a downstream Action may proceed. We solve this problem by having each upstream Activity output a separate Sequence Flow and then have them all connect as control input to the downstream Action. The downstream Action may not begin execution until each of the Sequence Flow inputs has been enabled, thus indicating that all of the source Actions have completed processing.

Finally, let's consider a situation where the completion of multiple upstream Actions triggers the initiation of multiple downstream Actions. With a State Activity it might be argued that this is best solved by adding another State and splitting up the Activity to make the synchronization explicit. But this is not always the cleanest solution. And with a Method, it may or may not be desirable to split it out into multiple state initiated Methods.

So let's assume we are stuck with a single Activity. We can feed the various Sequence Flows from the upstream Actions into an emitter which outputs a single Sequence Flow only when all of the input Sequence Flows have been enabled. This single output Sequence Flow can then be fed into multiple downstream Actions.

Here is an example of this last scenario both in Scrall and as a data flow diagram:

images/conditional-logic-subsystem/emitter-10.png

Identifiers

  1. Output flow + Activity + Domain

Attributes

No non-referential attributes.