@izara_project/izara-core-library-asynchronous-flow 1.0.52 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/awaitingMultipleSteps.js +3 -13
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "Sven Mason <thebarbariansven@gmail.com>",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"homepage": "https://bitbucket.org/izara-core-libraries/izara-core-library-asynchronous-flow#readme",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.53",
|
|
7
7
|
"description": "Shared asynchronous flow logic",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "index.js",
|
|
@@ -149,7 +149,7 @@ async function createAwaitingMultipleSteps(
|
|
|
149
149
|
if (finalRecords.length === 0 && !hasFlowPublish) {
|
|
150
150
|
finalRecords = [
|
|
151
151
|
{
|
|
152
|
-
awaitingStepId: createParentFlowId(
|
|
152
|
+
awaitingStepId: createParentFlowId(),
|
|
153
153
|
additionalAttributes
|
|
154
154
|
}
|
|
155
155
|
];
|
|
@@ -410,16 +410,6 @@ async function checkAllAwaitingStepsFinishedWithReturnParams(
|
|
|
410
410
|
returnValues
|
|
411
411
|
}
|
|
412
412
|
);
|
|
413
|
-
|
|
414
|
-
_izContext.logger.debug(
|
|
415
|
-
'[Lib:checkAllAwaitingStepsFinishedWithReturnParams] After updating awaitingStepItems',
|
|
416
|
-
{
|
|
417
|
-
pendingStepId,
|
|
418
|
-
awaitingStepId: currentAwaitingStepId,
|
|
419
|
-
errorsFound,
|
|
420
|
-
returnValues
|
|
421
|
-
}
|
|
422
|
-
);
|
|
423
413
|
}
|
|
424
414
|
|
|
425
415
|
const awaitingStepItems = await _queryAwaitingStepsByPendingStepId(
|
|
@@ -704,7 +694,7 @@ async function completeAction(
|
|
|
704
694
|
|
|
705
695
|
if (!pendingStepId) {
|
|
706
696
|
_izContext.logger.warn(
|
|
707
|
-
`No pending step found for awaitingStepId: ${
|
|
697
|
+
`No pending step found for awaitingStepId: ${parentFlowId}`
|
|
708
698
|
);
|
|
709
699
|
return { returnValue, errorsFound };
|
|
710
700
|
}
|
|
@@ -736,7 +726,7 @@ async function completeAction(
|
|
|
736
726
|
|
|
737
727
|
if (status) {
|
|
738
728
|
await Promise.all(
|
|
739
|
-
(additionalAttributes
|
|
729
|
+
(additionalAttributes?.listOfRecords ?? []).flatMap(records =>
|
|
740
730
|
Object.values(records).map(async record =>
|
|
741
731
|
dynamodbSharedLib.updateItem(
|
|
742
732
|
_izContext,
|