File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
services/workflows-service/src/collection-flow/controllers Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -145,21 +145,25 @@ export class CollectionFlowController {
145
145
tokenScope . projectId ,
146
146
) ;
147
147
148
- const collectionFlow = getCollectionFlowState ( event . context ) ;
148
+ const collectionFlowState = getCollectionFlowState ( event . context ) ;
149
149
150
- if ( ! collectionFlow ) {
150
+ if ( ! collectionFlowState ) {
151
151
throw new CollectionFlowMissingException ( ) ;
152
152
}
153
153
154
- collectionFlow . status = CollectionFlowStatusesEnum . completed ;
154
+ collectionFlowState . status = CollectionFlowStatusesEnum . completed ;
155
155
156
156
return await this . workflowService . event (
157
157
{
158
158
id : tokenScope . workflowRuntimeDataId ,
159
159
name : BUILT_IN_EVENT . DEEP_MERGE_CONTEXT ,
160
160
payload : {
161
- newContext : { collectionFlow } ,
162
- arrayMergeOption : ARRAY_MERGE_OPTION . BY_ID ,
161
+ newContext : {
162
+ collectionFlow : {
163
+ state : collectionFlowState ,
164
+ } ,
165
+ } ,
166
+ arrayMergeOption : ARRAY_MERGE_OPTION . REPLACE ,
163
167
} ,
164
168
} ,
165
169
[ tokenScope . projectId ] ,
@@ -178,10 +182,12 @@ export class CollectionFlowController {
178
182
payload : {
179
183
newContext : {
180
184
collectionFlow : {
181
- status : CollectionFlowStatusesEnum . failed ,
185
+ state : {
186
+ status : CollectionFlowStatusesEnum . failed ,
187
+ } ,
182
188
} ,
183
189
} ,
184
- arrayMergeOption : ARRAY_MERGE_OPTION . BY_ID ,
190
+ arrayMergeOption : ARRAY_MERGE_OPTION . REPLACE ,
185
191
} ,
186
192
} ,
187
193
[ tokenScope . projectId ] ,
You can’t perform that action at this time.
0 commit comments