@@ -2,24 +2,47 @@ package bpmn_engine
22
33import "github.com/nitram509/lib-bpmn-engine/pkg/spec/BPMN20"
44
5- // ActivityState as per BPMN 2.0 spec, section 13.2.2 Activity, page 428
6- // State diagram (just partially shown):
5+ // ActivityState as per BPMN 2.0 spec, section 13.2.2 Activity, page 428, State diagram:
76//
8- // ┌─────┐
9- // │Ready│
10- // └──┬──┘
11- // |
12- // ┌───▽──┐
13- // │Active│
14- // └───┬──┘
15- // |
16- // ┌───▽──────┐
17- // │Completing│
18- // └────┬─────┘
19- // |
20- // ┌────▽────┐
21- // │Completed│
22- // └─────────┘
7+ // (Inactive)
8+ // O
9+ // |
10+ // A Token v
11+ // Arrives ┌─────┐
12+ // │Ready│
13+ // └─────┘
14+ // v Activity Interrupted An Alternative Path For
15+ // O -------------------------------------->O----------------------------+
16+ // Data InputSet v | Event Gateway Selected |
17+ // Available ┌──────┐ Interrupting| |
18+ // │Active│ Event | |
19+ // └──────┘ | v
20+ // v Activity Interrupted v An Alternative Path For┌─────────┐
21+ // O -------------------------------------->O ---------------------->│Withdrawn│
22+ // Activity's work v | Event Gateway Selected └─────────┘
23+ // completed ┌──────────┐ Interrupting| |
24+ // │Completing│ Event | The Process|
25+ // └──────────┘ | Ends |
26+ // v Activity Interrupted v Non-Error |
27+ // Completing O -------------------------------------->O--------------+ |
28+ // Requirements Done v Error v v |
29+ // Assignments ┌─────────┐ ┌───────┐ ┌───────────┐ |
30+ // Completed │Completed│ │Failing│ │Terminating│ |
31+ // └─────────┘ └───────┘ └───────────┘ |
32+ // v Compensation ┌────────────┐ v v |
33+ // O ------------->│Compensating│ O <-------------O Terminating |
34+ // | Occurs └────────────┘ v v Requirements Done
35+ // The Process | Compensation v Compensation | ┌──────────┐ |
36+ // Ends | +--------------O----------------/|\--------->│Terminated│ |
37+ // | | Completes | Interrupted | └──────────┘ |
38+ // | v | v | |
39+ // | ┌───────────┐ |Compensation┌──────┐ | |
40+ // | │Compensated│ +----------->│Failed│ | |
41+ // | └─────┬─────┘ Failed └──────┘ | |
42+ // | | | | |
43+ // v / The Process Ends / Process Ends / |
44+ // O<--------------------------------------------------------------------+
45+ // (Closed)
2346type ActivityState string
2447
2548const (
0 commit comments