Is it allowed to use multiple events at a join node, like shown below.
Or is the imaginary token, that can be used to describe an activity flow, just one moment there and gone before the second events appears?
Is it allowed to use multiple events at a join node
Yes, a JoinNode is a ControlNode that synchronizes multiple flows.
is the imaginary token, that can be used to describe an activity flow, just one moment there and gone before the second events appears
The token offered on the incoming edges are blocked while the join is not passing, the moment a JoinNode is passing depends on its joinSpec :
For more here is a copy of the §15.3.3.4 Join Nodes page 389 of formal/2017-12-05:
A JoinNode is a ControlNode that synchronizes multiple flows. A JoinNode shall have exactly one outgoing ActivityEdge but may have multiple incoming ActivityEdges. If any of the incoming edges of a JoinNode are ObjectFlows, the outgoing edge shall be an ObjectFlow. Otherwise the outgoing edge shall be a ControlFlow.
Join nodes may have a joinSpec, which is a ValueSpecification that determines the condition under which the join will emit a token.
If a JoinNode has a joinSpec, then this ValueSpecification is evaluated whenever a new token is offered to the JoinNode on any incoming ActivityEdge. This evaluation shall not be interrupted by any new tokens offered during the evaluation, nor shall concurrent evaluations be started when new tokens are offered during an evaluation. The ValueSpecification shall evaluate to a Boolean value.
If the joinSpec ValueSpecification is given by a textual expression, then the names of the incoming edges may be used to denote a Boolean value indicating the presence (true) or absence (false) of an offer from a ControlFlow or to denote the value associated with an object token offered from an ObjectFlow (if any). Alternatively, the joinSpec may consist of an Expression with the name of a single Boolean operator and no operands specified. In this case, the value of the joinSpec shall be given by applying the given operator to Boolean values indicating the presence (true) or absence (false) of offers on each incoming edge (with the ordering of the operands not specified).
If a JoinNode does not have a joinSpec, then this is equivalent to a joinSpec Expression with the Boolean operator “and.” That is, the implicit default joinSpec condition is that there is at least one token offered on each incoming ActivityEdge.
If the (implicit or explicit) joinSpec of a JoinNode evaluates to true, then tokens are offered on the outgoing ActivityEdge of the JoinNode according to the following rules:
- If all the tokens offered on the incoming edges are control tokens, then one control token is offered on the outgoing edge.
- If some of the tokens offered on the incoming edges are control tokens and others are object tokens, then only the object tokens are offered on the outgoing edge. Tokens are offered on the outgoing edge in the same order they were offered to the join. If isCombinedDuplicate is true for the JoinNode, then before object tokens are offered to the outgoing edge, those containing objects with the same identity are combined into one token.
The above rules apply to all tokens offered to the JoinNode, including multiple tokens offered from the same incoming edge.
If any tokens are offered to the outgoing ActivityEdge of a JoinNode, they shall be accepted by the target or rejected for traversal over the edge (e.g., due to a failed guard) before any more tokens are offered to the outgoing edge. If tokens are rejected for traversal, they shall no longer be offered to the outgoing edge. A conforming implementation may omit unnecessary joinSpec evaluations if the JoinNode is blocked from offering tokens on its outgoing edge.