두 손끝의 창조자

한 Activity에서 나가는 Sequence Flow가 여러개라면? 본문

BPMN

한 Activity에서 나가는 Sequence Flow가 여러개라면?

codinglog 2020. 5. 12. 12:02

한 Activity가 분기 조건 없는 Sequence Flow(이하 S.F)를 가지고 있을 때 어떻게 동작할까?

Activity가 완료될 때 모든 S.F로 토큰을 전달한다. 즉 병렬로 동작한다. 이를 게이트웨이 요소로 표현하면 아래와 같다.

Figure 13.1 - Behavior of multiple outgoing Sequence Flows of an Activity

토큰은 프로세스의 요소들과 S.F를 통과하는 이론적인 개념이다.

게이트웨이는 게이트웨이가 토큰을 평가해서 명시적으로 어떤 S.F로 가야 하는지 정하지만, 이 경우는 모든 S.F를 평가하고 True에 해당하는 모든 S.F로 토큰을 통과시킨다. 만약 True 인 S.F가 없다면 디폴트 S.F로 통과시킨다.

원문

The nature and behavior of Sequence Flows is described in “Sequence Flow” on page 97. But there are special considerations relative to Sequence Flows when applied to Activities. An Activity that is the target of multiple Sequence Flows participates in “uncontrolled flow.”

To facilitate the definition of Sequence Flow (and other Process elements) behavior, we employ the concept of a token that will traverse the Sequence Flows and pass through the elements in the Process.
A token is a theoretical concept that is used as an aid to define the behavior of a Process that is being performed.
The behavior of Process elements can be defined by describing how they interact with a token as it “traverses” the structure of the Process. However, modeling and execution tools that implement BPMN are NOT REQUIRED to implement any form of token.

Uncontrolled flow means that, for each token arriving on any incoming Sequence Flows into the Activity, the Task will be enabled independently of the arrival of tokens on other incoming Sequence Flows. The presence of multiple incoming Sequence Flows behaves as an exclusive gateway. If the flow of tokens into the Task needs to be ‘controlled’, then Gateways (other than Exclusive) should be explicitly included in the Process flow prior to the Task to fully eliminate semantic ambiguities.

If an Activity has no incoming Sequence Flows, the Activity will be instantiated when the containing Process or Sub-Process is instantiated. Exceptions to this are Compensation Activities, as they have specialized instantiation behavior.

Activities can also be source of Sequence Flows. If an Activity has multiple outgoing Sequence Flows, all of them will receive a token when the Activity transitions to the Completed state. Semantics for token propagation for other termination states is defined below. Thus, multiple outgoing Sequence Flows behaves as a parallel split. Multiple outgoing Sequence Flows with conditions behaves as an inclusive split. A mix of multiple outgoing Sequence Flows with and without conditions is considered as a combination of a parallel and an inclusive split as shown in the Figure 13.1.

Figure 13.1 - Behavior of multiple outgoing Sequence Flows of an Activity

If the Activity has no outgoing Sequence Flows, the Activity will terminate without producing any tokens and termination semantics for the container is then applied.

Token movement across a Sequence Flow does not have any timing constraints. A token might take a long or short time to move across the Sequence Flow. If the isImmediate attribute of a Sequence Flow has a value of false, or has no value and is taken to mean false, then Activities not in the model MAY be executed while the token is moving along the Sequence Flow. If the isImmediate attribute of a Sequence Flow has a value of true, or has no value and is taken to mean true, then Activities not in the model MAY NOT be executed while the token is moving along the Sequence Flow.

구글 번역

시퀀스 플로우의 특성과 동작은 97 페이지의 "시퀀스 플로우"에 설명되어 있습니다. 그러나 활동에 적용될 때 시퀀스 플로우와 관련하여 특별히 고려해야 할 사항이 있습니다. 여러 시퀀스 플로우의 대상인 활동은 "제어되지 않은 플로우"에 참여합니다.

시퀀스 플로우 (및 기타 프로세스 요소) 동작의 정의를 용이하게 하기 위해 시퀀스 플로우를 통과하고 프로세스의 요소를 통과하는 토큰 개념을 사용합니다.
토큰은 수행 중인 프로세스의 동작을 정의하는 데 도움이 되는 이론적인 개념입니다.
프로세스 요소의 동작은 프로세스의 구조를 "이동"할 때 토큰과 상호 작용하는 방식을 설명하여 정의할 수 있습니다. 그러나 BPMN을 구현하는 모델링 및 실행 도구는 어떤 형태의 토큰도 구현하지 않아도 됩니다.

제어되지 않은 흐름은 들어오는 시퀀스 흐름에 도달 한 각 토큰이 활동에 유입될 때마다 다른 들어오는 시퀀스 흐름에 토큰이 도착하는 것과 독립적으로 작업이 활성화됨을 의미합니다. 여러 수신 시퀀스 플로우가 있으면 독점 게이트웨이로 작동합니다. 작업으로의 토큰 흐름을 '제어'해야 하는 경우 의미 적 모호성을 완전히 제거하기 위해 작업 전에 게이트웨이 (독점 제외)를 프로세스 흐름에 명시 적으로 포함해야 합니다.

활동에 들어오는 시퀀스 플로우가 없는 경우 포함하는 프로세스 또는 하위 프로세스가 인스턴스화 될 때 활동이 인스턴스화 됩니다. 이에 대한 예외는 특화된 인스턴스화 동작이 있는 보상 활동입니다.

활동은 시퀀스 플로우의 소스 일 수도 있습니다. 활동에 여러 개의 송신 시퀀스 플로우가 있는 경우 활동이 완료됨 상태로 전환될 때 모든 토큰이 수신됩니다. 다른 종료 상태에 대한 토큰 전파의 의미는 다음과 같습니다. 따라서 여러 발신 시퀀스 흐름은 병렬 분할로 작동합니다. 조건이 있는 다중 발신 시퀀스 플로우는 포괄적 분할로 작동합니다. 조건이 있거나 없는 여러 발신 시퀀스 흐름의 혼합은 그림 13.1에 표시된 것처럼 병렬 및 포괄적 분할의 조합으로 간주됩니다.

활동에 나가는 시퀀스 플로우가 없으면 토큰을 생성하지 않고 활동이 종료되고 컨테이너에 대한 종료 시맨틱이 적용됩니다.

시퀀스 흐름을 통한 토큰 이동에는 타이밍 제약이 없습니다. 시퀀스 흐름에서 토큰을 이동하는 데 시간이 오래 걸리거나 짧을 수 있습니다. 시퀀스 플로우의 isImmediate 속성 값이 false이거나 값이 없고 false를 의미하는 경우 토큰이 시퀀스 플로우를 따라 이동하는 동안 모델에 없는 활동이 실행될 수 있습니다. 시퀀스 플로우의 isImmediate 속성 값이 true이거나 값이없고 true를 의미하는 경우, 토큰이 시퀀스 플로우를 따라 이동하는 동안 모델에없는 활동이 실행되지 않을 수 있습니다.

반응형
Comments