允许加入节点的多个事件操作

Multiple event actions at Join Node allowed

是否允许在一个连接节点使用多个事件,如下所示。

或者是可以用来描述 activity 流程的虚构标记,在第二个事件出现之前只存在一个瞬间就消失了?

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

传入边上提供的令牌在连接未通过时被阻止,JoinNode 通过的时刻取决于其 joinSpec :

  • 如果一个JoinNode没有一个joinSpec,那么这相当于一个joinSpec ] 使用布尔运算符“and”的表达式。也就是说,隐含的默认 joinSpec 条件是每个传入 ActivityEdge
  • 至少提供一个令牌
  • 否则 joinSpec 它是一个 ValueSpecification 确定连接将发出令牌的条件,然后在每个传入的 ActivityEdge 至少提供一个令牌。每当在任何传入的 ActivityEdge 上向 JoinNode 提供新令牌时,都会评估此 ValueSpecification

有关更多信息,请参阅 formal/2017-12-05 的 §15.3.3.4 加入节点第 389 页的副本:

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.