最佳答案
Is it allowed to use multiple events at a join node
是的,JoinNode 是一个同步多个流的ControlNode。
is the imaginary token, that can be used to describe an activity flow, just one moment there and gone before the second events appears
当连接未通过时,传入边缘上提供的 token 会被阻止,JoinNode 传递的时刻取决于其joinSpec:
- 如果JoinNode没有joinSpec,那么这相当于带有 bool 运算符“and”的joinSpec表达式。也就是说,隐式默认 joinSpec 条件是每个传入的 ActivityEdge 上至少提供一个 token
- 否则joinSpec它是一个ValueSpecification,确定连接将发出 token 的条件,并且当每个传入至少提供一个 token 时则不需要ActivityEdge。每当向任何传入 ActivityEdge 上的 JoinNode 提供新 token 时,都会评估此 ValueSpecification。
有关更多信息,请参阅formal/2017-12-05第 389 页的 §15.3.3.4 加入节点副本。 :
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.
关于uml - 允许在加入节点执行多个事件操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65701843/