1
1
import { defineContext , defineWorkflow } from '../../workflow/define-workflow' ;
2
2
import { TransitionType as Type } from '../../workflow/dto' ;
3
- import { EngagementStatus as Step } from '../dto' ;
3
+ import { EngagementStatus as Status } from '../dto' ;
4
4
import { EngagementWorkflowEvent } from './dto' ;
5
5
import {
6
6
BackTo ,
@@ -14,126 +14,126 @@ import {
14
14
export const EngagementWorkflow = defineWorkflow ( {
15
15
id : '0d0a59f6-c5f0-4c1d-bd5f-7b2814c76812' ,
16
16
name : 'Engagement' ,
17
- states : Step ,
17
+ states : Status ,
18
18
event : EngagementWorkflowEvent ,
19
19
context : defineContext < ResolveEngagementParams > ,
20
20
} ) ( {
21
21
Reject : {
22
- from : Step . InDevelopment ,
23
- to : Step . Rejected ,
22
+ from : Status . InDevelopment ,
23
+ to : Status . Rejected ,
24
24
label : 'Reject' ,
25
25
type : Type . Reject ,
26
26
} ,
27
27
'End Development' : {
28
- from : Step . InDevelopment ,
29
- to : Step . DidNotDevelop ,
28
+ from : Status . InDevelopment ,
29
+ to : Status . DidNotDevelop ,
30
30
label : 'End Development' ,
31
31
type : Type . Reject ,
32
32
} ,
33
33
'Approve to Active' : {
34
- from : Step . InDevelopment ,
35
- to : Step . Active ,
34
+ from : Status . InDevelopment ,
35
+ to : Status . Active ,
36
36
label : 'Approve' ,
37
37
type : Type . Approve ,
38
38
} ,
39
39
'Discuss Change To Plan' : {
40
- from : [ Step . Active , Step . ActiveChangedPlan ] ,
41
- to : Step . DiscussingChangeToPlan ,
40
+ from : [ Status . Active , Status . ActiveChangedPlan ] ,
41
+ to : Status . DiscussingChangeToPlan ,
42
42
label : 'Discuss Change to Plan' ,
43
43
type : Type . Neutral ,
44
44
} ,
45
45
'Discuss Suspension' : {
46
- from : [ Step . Active , Step . ActiveChangedPlan ] ,
47
- to : Step . DiscussingSuspension ,
46
+ from : [ Status . Active , Status . ActiveChangedPlan ] ,
47
+ to : Status . DiscussingSuspension ,
48
48
label : 'Discuss Susupension' ,
49
49
type : Type . Neutral ,
50
50
} ,
51
51
'Discuss Termination' : {
52
52
from : [
53
- Step . Active ,
54
- Step . ActiveChangedPlan ,
55
- Step . DiscussingSuspension ,
56
- Step . Suspended ,
57
- Step . DiscussingReactivation ,
53
+ Status . Active ,
54
+ Status . ActiveChangedPlan ,
55
+ Status . DiscussingSuspension ,
56
+ Status . Suspended ,
57
+ Status . DiscussingReactivation ,
58
58
] ,
59
- to : Step . DiscussingTermination ,
59
+ to : Status . DiscussingTermination ,
60
60
label : 'Discuss Termination' ,
61
61
type : Type . Neutral ,
62
62
} ,
63
63
'Finalize Completion' : {
64
- from : [ Step . Active , Step . ActiveChangedPlan ] ,
65
- to : Step . FinalizingCompletion ,
64
+ from : [ Status . Active , Status . ActiveChangedPlan ] ,
65
+ to : Status . FinalizingCompletion ,
66
66
label : 'Finalize Completion' ,
67
67
type : Type . Approve ,
68
68
} ,
69
69
'Approve Change to Plan' : {
70
- from : Step . DiscussingChangeToPlan ,
71
- to : Step . ActiveChangedPlan ,
70
+ from : Status . DiscussingChangeToPlan ,
71
+ to : Status . ActiveChangedPlan ,
72
72
label : 'Approve Change to Plan' ,
73
73
type : Type . Approve ,
74
74
} ,
75
75
'Will Not Change Plan' : {
76
- from : Step . DiscussingChangeToPlan ,
76
+ from : Status . DiscussingChangeToPlan ,
77
77
to : BackToActive ,
78
78
label : 'Will Not Change Plan' ,
79
79
type : Type . Neutral ,
80
80
} ,
81
81
'Discussing Change to Plan -> Discussing Suspension' : {
82
- from : [ Step . DiscussingChangeToPlan ] ,
83
- to : Step . DiscussingSuspension ,
82
+ from : [ Status . DiscussingChangeToPlan ] ,
83
+ to : Status . DiscussingSuspension ,
84
84
label : 'Discuss Susupension' ,
85
85
type : Type . Neutral ,
86
86
} ,
87
87
'Approve Suspension' : {
88
- from : Step . DiscussingSuspension ,
89
- to : Step . Suspended ,
88
+ from : Status . DiscussingSuspension ,
89
+ to : Status . Suspended ,
90
90
label : 'Approve Suspension' ,
91
91
type : Type . Approve ,
92
92
} ,
93
93
'Will Not Suspend' : {
94
- from : Step . DiscussingSuspension ,
94
+ from : Status . DiscussingSuspension ,
95
95
to : BackToActive ,
96
96
label : 'Will Not Suspend' ,
97
97
type : Type . Neutral ,
98
98
} ,
99
99
'Discuss Reactivation' : {
100
- from : Step . Suspended ,
101
- to : Step . DiscussingReactivation ,
100
+ from : Status . Suspended ,
101
+ to : Status . DiscussingReactivation ,
102
102
label : 'Discuss Reactivation' ,
103
103
type : Type . Neutral ,
104
104
} ,
105
105
'Approve Reactivation' : {
106
- from : Step . DiscussingReactivation ,
107
- to : Step . ActiveChangedPlan ,
106
+ from : Status . DiscussingReactivation ,
107
+ to : Status . ActiveChangedPlan ,
108
108
label : 'Approve Reactivation' ,
109
109
type : Type . Approve ,
110
110
} ,
111
111
'End Termination Discussion' : {
112
- from : Step . DiscussingTermination ,
112
+ from : Status . DiscussingTermination ,
113
113
to : BackTo (
114
- Step . Active ,
115
- Step . ActiveChangedPlan ,
116
- Step . DiscussingReactivation ,
117
- Step . Suspended ,
114
+ Status . Active ,
115
+ Status . ActiveChangedPlan ,
116
+ Status . DiscussingReactivation ,
117
+ Status . Suspended ,
118
118
) ,
119
119
label : 'Will Not Terminate' ,
120
120
type : Type . Neutral ,
121
121
} ,
122
122
'Approve Termination' : {
123
- from : Step . DiscussingTermination ,
124
- to : Step . Terminated ,
123
+ from : Status . DiscussingTermination ,
124
+ to : Status . Terminated ,
125
125
label : 'Approve Termination' ,
126
126
type : Type . Approve ,
127
127
} ,
128
128
'Not Ready for Completion' : {
129
- from : Step . FinalizingCompletion ,
129
+ from : Status . FinalizingCompletion ,
130
130
to : BackToActive ,
131
131
label : 'Still Working' ,
132
132
type : Type . Neutral ,
133
133
} ,
134
134
Complete : {
135
- from : Step . FinalizingCompletion ,
136
- to : Step . Completed ,
135
+ from : Status . FinalizingCompletion ,
136
+ to : Status . Completed ,
137
137
label : 'Complete 🎉' ,
138
138
type : Type . Approve ,
139
139
} ,
0 commit comments