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 {
145145 tokenScope . projectId ,
146146 ) ;
147147
148- const collectionFlow = getCollectionFlowState ( event . context ) ;
148+ const collectionFlowState = getCollectionFlowState ( event . context ) ;
149149
150- if ( ! collectionFlow ) {
150+ if ( ! collectionFlowState ) {
151151 throw new CollectionFlowMissingException ( ) ;
152152 }
153153
154- collectionFlow . status = CollectionFlowStatusesEnum . completed ;
154+ collectionFlowState . status = CollectionFlowStatusesEnum . completed ;
155155
156156 return await this . workflowService . event (
157157 {
158158 id : tokenScope . workflowRuntimeDataId ,
159159 name : BUILT_IN_EVENT . DEEP_MERGE_CONTEXT ,
160160 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 ,
163167 } ,
164168 } ,
165169 [ tokenScope . projectId ] ,
@@ -178,10 +182,12 @@ export class CollectionFlowController {
178182 payload : {
179183 newContext : {
180184 collectionFlow : {
181- status : CollectionFlowStatusesEnum . failed ,
185+ state : {
186+ status : CollectionFlowStatusesEnum . failed ,
187+ } ,
182188 } ,
183189 } ,
184- arrayMergeOption : ARRAY_MERGE_OPTION . BY_ID ,
190+ arrayMergeOption : ARRAY_MERGE_OPTION . REPLACE ,
185191 } ,
186192 } ,
187193 [ tokenScope . projectId ] ,
You can’t perform that action at this time.
0 commit comments