@izara_project/izara-core-library-asynchronous-flow 1.0.3 → 1.0.4
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 +2 -3
- package/src/AsyncFlowSharedLib.js +11 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@izara_project/izara-core-library-asynchronous-flow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Shared asynchronous flow logic",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"@izara_project/izara-core-library-dynamodb": "^1.0.2",
|
|
25
25
|
"@izara_project/izara-core-library-external-request": "^1.0.17",
|
|
26
26
|
"@izara_project/izara-core-library-logger": "^1.0.6",
|
|
27
|
-
"@izara_project/izara-core-library-sqs": "^1.0.2"
|
|
28
|
-
"@izara_project/izara-core-library-trigger-cache": "^1.0.2"
|
|
27
|
+
"@izara_project/izara-core-library-sqs": "^1.0.2"
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -24,7 +24,6 @@ const Logger = require('@izara_project/izara-core-library-logger');
|
|
|
24
24
|
// Data and service interaction libraries
|
|
25
25
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
26
26
|
const sqsSharedLib = require('@izara_project/izara-core-library-sqs');
|
|
27
|
-
const triggeredCacheSharedLib = require('@izara_project/izara-core-library-trigger-cache');
|
|
28
27
|
|
|
29
28
|
// External service interactions
|
|
30
29
|
const { sqs } = require('@izara_project/izara-core-library-external-request');
|
|
@@ -84,6 +83,14 @@ module.exports.explodePendingStepId = (
|
|
|
84
83
|
|
|
85
84
|
}
|
|
86
85
|
|
|
86
|
+
// copy from izara-core-library-trigger-cache
|
|
87
|
+
module.exports.createFieldNameCacheComplete = (prefix = 'cache') => { // timeStamp
|
|
88
|
+
return prefix + 'CacheComplete';
|
|
89
|
+
}
|
|
90
|
+
module.exports.createFieldNameStatus = (prefix = 'cache') => {
|
|
91
|
+
return prefix + 'Status';
|
|
92
|
+
}
|
|
93
|
+
|
|
87
94
|
//====================================== AwaitingMultipleSteps
|
|
88
95
|
// AwaitingMultipleSteps is when a flow is awaiting multiple external flows before it can continue
|
|
89
96
|
// One awaitingStepId can have multiple pendingStepIds that are awaiting it
|
|
@@ -689,9 +696,9 @@ module.exports.checkAndGetTimeCacheComplete = async (
|
|
|
689
696
|
prefix: prefix
|
|
690
697
|
});
|
|
691
698
|
|
|
692
|
-
let uniqueRequestIdFieldName =
|
|
693
|
-
let cacheCompleteFieldName =
|
|
694
|
-
let statusFieldName =
|
|
699
|
+
let uniqueRequestIdFieldName = this.createFieldNameUniqueRequestId('cache');
|
|
700
|
+
let cacheCompleteFieldName = this.createFieldNameCacheComplete(prefix);
|
|
701
|
+
let statusFieldName = this.createFieldNameStatus(prefix);
|
|
695
702
|
|
|
696
703
|
let getTimeCacheComplete = await dynamodbSharedLib.getItem(
|
|
697
704
|
_izContext,
|