@izara_project/izara-market-library-service-schemas 1.0.33 → 1.0.34
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/GenerateCodeLibs/src/GenerateCodeLibs.js +15 -1
- package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/statusFieldTemplate.ejs +14 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/storedCacheTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +8 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +29 -1
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +3 -3
- package/src/reStructure/TemplateData/perActionComplete/create/yaml/data.js +9 -3
- package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/delete/yaml/data.js +9 -3
- package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/get/yaml/data.js +10 -4
- package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/update/yaml/data.js +9 -3
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +5 -5
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +5 -5
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +1 -1
package/package.json
CHANGED
|
@@ -1058,6 +1058,19 @@ function createBasicRelationshipsProperties(from, to, storageResources, baseDire
|
|
|
1058
1058
|
return relationshipProperties
|
|
1059
1059
|
}
|
|
1060
1060
|
|
|
1061
|
+
function createFieldNamesFromRequestParamsByObjectSchema(_izContext, requestParams, objectSchema) {
|
|
1062
|
+
let createFieldNameParams = {};
|
|
1063
|
+
_izContext.logger.debug("createFieldNamesFromRequestParamsByObjectSchema ::", { requestParams, objectSchema })
|
|
1064
|
+
for (const fieldName of Object.keys(objectSchema.fieldNames)) {
|
|
1065
|
+
if (Object.keys(requestParams).includes(fieldName)) {
|
|
1066
|
+
if (!createFieldNameParams.hasOwnProperty(fieldName)) {
|
|
1067
|
+
Object.assign(createFieldNameParams, { [fieldName]: requestParams[fieldName] })
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
return createFieldNameParams
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1061
1074
|
module.exports = {
|
|
1062
1075
|
sendMsgOutComplete,
|
|
1063
1076
|
messageToDlq,
|
|
@@ -1077,7 +1090,8 @@ module.exports = {
|
|
|
1077
1090
|
createDeleteDataDetail,
|
|
1078
1091
|
|
|
1079
1092
|
createFieldForUpdateDynamoDb,
|
|
1080
|
-
createBasicRelationshipsProperties
|
|
1093
|
+
createBasicRelationshipsProperties,
|
|
1094
|
+
createFieldNamesFromRequestParamsByObjectSchema
|
|
1081
1095
|
}
|
|
1082
1096
|
|
|
1083
1097
|
|
|
@@ -131,7 +131,7 @@ async function externalLambdaIamRoleDataPerAction(_izContext, allObjSchemas) {
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
|
-
objectType: SOURCE_GENERATE_IAM_ROLE.
|
|
134
|
+
objectType: SOURCE_GENERATE_IAM_ROLE.PerActionEndpoint,
|
|
135
135
|
additionalResourcePermission
|
|
136
136
|
}
|
|
137
137
|
}
|
package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/statusFieldTemplate.ejs
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// getObjectSchema
|
|
2
|
+
let objectSchema = await getObjectSchema.getObjSchemaS3WithCache(_izContext, flowSchema.objType)
|
|
3
|
+
|
|
4
|
+
// create record
|
|
5
|
+
let fieldNames = createFieldNamesFromRequestParamsByObjectSchema(_izContext, requestParams, objectSchema)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
let sendMessageToCreateEndpoint = {
|
|
9
|
+
Message: JSON.stringify({fieldNames: fieldNames}),
|
|
10
|
+
topicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, "Create_In")
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
_izContext.logger.debug("before sendMessageToCreateEndpoint:: ", sendMessageToCreateEndpoint);
|
|
14
|
+
await sns.publishAsync(_izContext, sendMessageToCreateEndpoint);
|
package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/storedCacheTemplate.ejs
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// create storedCache
|
|
2
|
+
function createExpiryTime (_izContext, expiryInterval) {
|
|
3
|
+
const currentTime = new Date();
|
|
4
|
+
const expiryTime = new Date(currentTime);
|
|
5
|
+
expiryTime.setTime(expiryTime.getTime() + expiryInterval);
|
|
6
|
+
return expiryTime.getTime();
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
await dynamodbSharedLib.putItem(_izContext,
|
|
10
|
+
await dynamodbSharedLib.tableName(_izContext, "<%- flowTag %>Main"),
|
|
11
|
+
{
|
|
12
|
+
<%- flowTag %>Id: hash(requestParams),
|
|
13
|
+
cacheExpiryTime: createExpiryTime(_izContext, 31536000000),
|
|
14
|
+
cacheStatus: "processing",
|
|
15
|
+
cacheUniqueRequestId: _izContext.uniqueRequestId
|
|
16
|
+
}
|
|
17
|
+
)
|
|
@@ -33,6 +33,8 @@ const {
|
|
|
33
33
|
SOURCE_GENERATE_IAM_ROLE
|
|
34
34
|
} = require('../../../../../../MainLibs/src/Consts');
|
|
35
35
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
36
|
+
const statusFieldTemplate = path.join(__dirname, "../../../createRecordByStatusType/statusFieldTemplate.ejs")
|
|
37
|
+
const storedCacheTemplate = path.join(__dirname, "../../../createRecordByStatusType/storedCacheTemplate.ejs")
|
|
36
38
|
|
|
37
39
|
/**
|
|
38
40
|
* receive objectSchema
|
|
@@ -50,10 +52,15 @@ function data(_izContext, flowSchema, srcPath) {
|
|
|
50
52
|
function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
51
53
|
let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopic)
|
|
52
54
|
let topicArn = Object.keys(flowSchema.flowSteps)[0];
|
|
55
|
+
let statusType = flowSchema.statusType
|
|
53
56
|
return {
|
|
54
57
|
templatePath: templatePath,
|
|
55
58
|
templateData: {
|
|
56
|
-
topicArn
|
|
59
|
+
topicArn,
|
|
60
|
+
statusType,
|
|
61
|
+
statusFieldTemplate,
|
|
62
|
+
storedCacheTemplate,
|
|
63
|
+
flowTag: flowSchema.flowTag,
|
|
57
64
|
},
|
|
58
65
|
setting: {
|
|
59
66
|
savePath: path.join(srcPath, SOURCE_PATH.flowSchemaOwnTopic, flowSchema.flowTag, "source/"),
|
|
@@ -32,9 +32,11 @@ const sns = externalRequest.sns
|
|
|
32
32
|
|
|
33
33
|
const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils')
|
|
34
34
|
const NoRetryError = require('@izara_project/izara-core-library-core').NoRetryError
|
|
35
|
-
const { v4: uuidv4 } = require('uuid')
|
|
36
35
|
const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
37
36
|
const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
37
|
+
<% if (statusType === "statusField") { %>
|
|
38
|
+
const { createFieldNamesFromRequestParamsByObjectSchema } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs')
|
|
39
|
+
<% } %>
|
|
38
40
|
/**
|
|
39
41
|
*
|
|
40
42
|
*
|
|
@@ -75,6 +77,10 @@ module.exports.flowSchemaOwnTopic = async (
|
|
|
75
77
|
throw new NoRetryError(`flowTag not found ${requestParams.action}`)
|
|
76
78
|
}
|
|
77
79
|
|
|
80
|
+
<% if (statusType === "statusField") { %>
|
|
81
|
+
<%- include(statusFieldTemplate) %>
|
|
82
|
+
<% } else if (statusType === "storedCache") { %>
|
|
83
|
+
<%- include(storedCacheTemplate) %>
|
|
78
84
|
let messageObject = {
|
|
79
85
|
requestParams:requestParams
|
|
80
86
|
}
|
|
@@ -95,6 +101,28 @@ module.exports.flowSchemaOwnTopic = async (
|
|
|
95
101
|
}
|
|
96
102
|
_izContext.logger.debug("sendMessageToCreateEndpoint", sendMessageToCreateEndpoint);
|
|
97
103
|
await sns.publishAsync(_izContext, sendMessageToCreateEndpoint);
|
|
104
|
+
<% } else if (statusType === "none") { %>
|
|
105
|
+
let messageObject = {
|
|
106
|
+
requestParams:requestParams
|
|
107
|
+
}
|
|
108
|
+
// create callingFlow
|
|
109
|
+
messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
110
|
+
messageObject,
|
|
111
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
112
|
+
callingFlowConfig,
|
|
113
|
+
callingFlowSharedLib.createCallingFlowConfig(
|
|
114
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.flowSchemaOwnTopicComplete), {}
|
|
115
|
+
)
|
|
116
|
+
)
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
let sendMessageToCreateEndpoint = {
|
|
120
|
+
Message: JSON.stringify(messageObject),
|
|
121
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, "<%- topicArn %>")
|
|
122
|
+
}
|
|
123
|
+
_izContext.logger.debug("sendMessageToCreateEndpoint", sendMessageToCreateEndpoint);
|
|
124
|
+
await sns.publishAsync(_izContext, sendMessageToCreateEndpoint);
|
|
125
|
+
<% } %>
|
|
98
126
|
|
|
99
127
|
} catch (err) {
|
|
100
128
|
_izContext.logger.error('error WebSocketInvoke: ', err)
|
|
@@ -22,7 +22,7 @@ const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
|
22
22
|
const sns = require('@izara_project/izara-core-library-external-request/src/resources/Sns');
|
|
23
23
|
const _ = require('lodash');
|
|
24
24
|
const hash = require("object-hash")
|
|
25
|
-
|
|
25
|
+
const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
26
26
|
const PREFIX = {
|
|
27
27
|
CREATE_OBJECT_ASYNC: "createObjectAsync",
|
|
28
28
|
CREATE_OBJECT_ASYNC_COMPLETE: "createObjectAsyncComplete"
|
|
@@ -77,7 +77,7 @@ module.exports.createObjectComplete = async (
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
if (status == "error" && errorsFound.length > 0) {
|
|
80
|
-
errorsFound.push(
|
|
80
|
+
errorsFound.push("error before validate");
|
|
81
81
|
} else if (status == "error" && errorsFound.length == 0) {
|
|
82
82
|
errorsFound.push("[invalid]statur is error not have errorfound form graphService");
|
|
83
83
|
|
|
@@ -141,7 +141,7 @@ module.exports.createObjectComplete = async (
|
|
|
141
141
|
let sendMessageOutCreateObjectComplete = {
|
|
142
142
|
Message: JSON.stringify(messageObject),
|
|
143
143
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
144
|
-
TopicArn: await snsSharedLib.
|
|
144
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
145
145
|
};
|
|
146
146
|
_izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
|
|
147
147
|
await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
|
|
@@ -89,15 +89,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
89
89
|
SQS_RESOURCE.getQueueUrl,
|
|
90
90
|
SQS_RESOURCE.receiveMessage,
|
|
91
91
|
SQS_RESOURCE.sendMessage
|
|
92
|
-
]
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
[
|
|
95
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
96
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
97
|
+
]
|
|
98
|
+
),
|
|
99
|
+
createIamRole(
|
|
100
|
+
{
|
|
93
101
|
[RESOURCE_CLASSES.sns]: [
|
|
94
102
|
SNS_RESOURCE.publish,
|
|
95
103
|
SNS_RESOURCE.subscribe
|
|
96
104
|
]
|
|
97
105
|
},
|
|
98
106
|
[
|
|
99
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
100
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
101
107
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
102
108
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
103
109
|
]
|
|
@@ -72,7 +72,7 @@ module.exports.deleteNodeComplete = async (
|
|
|
72
72
|
let sendMessageToOutUpdateNodeComplete = {
|
|
73
73
|
Message: JSON.stringify(deleteNodeComplete),
|
|
74
74
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
75
|
-
TopicArn: await snsSharedLib.
|
|
75
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
|
|
76
76
|
};
|
|
77
77
|
_izContext.logger.debug("Send Message to DeleteNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
78
78
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
@@ -87,15 +87,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
87
87
|
SQS_RESOURCE.getQueueUrl,
|
|
88
88
|
SQS_RESOURCE.receiveMessage,
|
|
89
89
|
SQS_RESOURCE.sendMessage
|
|
90
|
-
]
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
[
|
|
93
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
94
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
95
|
+
]
|
|
96
|
+
),
|
|
97
|
+
createIamRole(
|
|
98
|
+
{
|
|
91
99
|
[RESOURCE_CLASSES.sns]: [
|
|
92
100
|
SNS_RESOURCE.publish,
|
|
93
101
|
SNS_RESOURCE.subscribe
|
|
94
102
|
]
|
|
95
103
|
},
|
|
96
104
|
[
|
|
97
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
98
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
99
105
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
100
106
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
101
107
|
]
|
|
@@ -101,7 +101,7 @@ module.exports.updateNodeComplete = async (
|
|
|
101
101
|
let sendMessageToOutUpdateNodeComplete = {
|
|
102
102
|
Message: JSON.stringify(updateCompleteMsg),
|
|
103
103
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
104
|
-
TopicArn: await snsSharedLib.
|
|
104
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
|
|
105
105
|
};
|
|
106
106
|
_izContext.logger.debug("Send Message to OutUpdateNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
107
107
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
@@ -67,15 +67,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
67
67
|
SQS_RESOURCE.getQueueUrl,
|
|
68
68
|
SQS_RESOURCE.receiveMessage,
|
|
69
69
|
SQS_RESOURCE.sendMessage
|
|
70
|
-
]
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
[
|
|
73
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
74
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
75
|
+
]
|
|
76
|
+
),
|
|
77
|
+
createIamRole(
|
|
78
|
+
{
|
|
71
79
|
[RESOURCE_CLASSES.sns]: [
|
|
72
80
|
SNS_RESOURCE.publish,
|
|
73
81
|
SNS_RESOURCE.subscribe
|
|
74
82
|
]
|
|
75
83
|
},
|
|
76
84
|
[
|
|
77
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
78
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
79
85
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
80
86
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
81
87
|
]
|
|
@@ -93,7 +99,7 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
93
99
|
additionalResourcePermission,
|
|
94
100
|
resourceLocation: SOURCE_PATH.resourceLocationOutPerActionComplete,
|
|
95
101
|
functionNameConfig,
|
|
96
|
-
roleName: SOURCE_GENERATE_IAM_ROLE.
|
|
102
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.ObjectCompleteRole,
|
|
97
103
|
},
|
|
98
104
|
setting: {
|
|
99
105
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -101,7 +101,7 @@ module.exports.updateNodeComplete = async (
|
|
|
101
101
|
let sendMessageToOutUpdateNodeComplete = {
|
|
102
102
|
Message: JSON.stringify(updateCompleteMsg),
|
|
103
103
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
104
|
-
TopicArn: await snsSharedLib.
|
|
104
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
|
|
105
105
|
};
|
|
106
106
|
_izContext.logger.debug("Send Message to OutUpdateNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
107
107
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
@@ -91,15 +91,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
91
91
|
SQS_RESOURCE.getQueueUrl,
|
|
92
92
|
SQS_RESOURCE.receiveMessage,
|
|
93
93
|
SQS_RESOURCE.sendMessage
|
|
94
|
-
]
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
[
|
|
97
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
98
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
99
|
+
]
|
|
100
|
+
),
|
|
101
|
+
createIamRole(
|
|
102
|
+
{
|
|
95
103
|
[RESOURCE_CLASSES.sns]: [
|
|
96
104
|
SNS_RESOURCE.publish,
|
|
97
105
|
SNS_RESOURCE.subscribe
|
|
98
106
|
]
|
|
99
107
|
},
|
|
100
108
|
[
|
|
101
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
102
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
103
109
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
104
110
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
105
111
|
]
|
package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs
CHANGED
|
@@ -109,7 +109,7 @@ module.exports.createRelationshipComplete = async (
|
|
|
109
109
|
let sendMessageToOutCreateRelatonshipComplete = {
|
|
110
110
|
Message: JSON.stringify(createCompleteMsg),
|
|
111
111
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
112
|
-
TopicArn: await snsSharedLib.
|
|
112
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateRelComplete)
|
|
113
113
|
};
|
|
114
114
|
_izContext.logger.debug("Send message to OutCreateRelationshipComplete :::>", sendMessageToOutCreateRelatonshipComplete);
|
|
115
115
|
await sns.publishAsync(_izContext, sendMessageToOutCreateRelatonshipComplete);
|
package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs
CHANGED
|
@@ -107,13 +107,13 @@ module.exports.createRelationshipComplete = async (
|
|
|
107
107
|
let messageAttributes = callingFlowSharedLib.addParentPassBackCallingFlowToSnsResponseMessageAttributes(passBackProperties, {});
|
|
108
108
|
_izContext.logger.debug("After addCallingFlowToSnsResponseMessageAttributes", deleteRelComp);
|
|
109
109
|
|
|
110
|
-
let
|
|
110
|
+
let sendMessageToOutDeleteRelatonshipComplete = {
|
|
111
111
|
Message: JSON.stringify(deleteRelComp),
|
|
112
112
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
113
|
-
TopicArn: await snsSharedLib.
|
|
113
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outDeleteRelComplete)
|
|
114
114
|
};
|
|
115
|
-
_izContext.logger.debug("Send message to OutCreateRelationshipComplete :::>",
|
|
116
|
-
await sns.publishAsync(_izContext,
|
|
115
|
+
_izContext.logger.debug("Send message to OutCreateRelationshipComplete :::>", sendMessageToOutDeleteRelatonshipComplete);
|
|
116
|
+
await sns.publishAsync(_izContext, sendMessageToOutDeleteRelatonshipComplete);
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
// remove awaitingMultipleStep after finished
|
|
@@ -134,7 +134,7 @@ module.exports.createRelationshipComplete = async (
|
|
|
134
134
|
errorsFound
|
|
135
135
|
}
|
|
136
136
|
} catch (err) {
|
|
137
|
-
_izContext.logger.error('error
|
|
137
|
+
_izContext.logger.error('error deleteRelationshipComplete:', err)
|
|
138
138
|
throw (err)
|
|
139
139
|
}
|
|
140
140
|
}
|
package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs
CHANGED
|
@@ -107,13 +107,13 @@ module.exports.createRelationshipComplete = async (
|
|
|
107
107
|
let messageAttributes = callingFlowSharedLib.addParentPassBackCallingFlowToSnsResponseMessageAttributes(passBackProperties, {});
|
|
108
108
|
_izContext.logger.debug("After addCallingFlowToSnsResponseMessageAttributes", createCompleteMsg);
|
|
109
109
|
|
|
110
|
-
let
|
|
110
|
+
let sendMessageToOutGetRelComplete = {
|
|
111
111
|
Message: JSON.stringify(createCompleteMsg),
|
|
112
112
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
113
|
-
TopicArn: await snsSharedLib.
|
|
113
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outGetRelComplete)
|
|
114
114
|
};
|
|
115
|
-
_izContext.logger.debug("Send message to
|
|
116
|
-
await sns.publishAsync(_izContext,
|
|
115
|
+
_izContext.logger.debug("Send message to outGetRelComplete :::>", sendMessageToOutGetRelComplete);
|
|
116
|
+
await sns.publishAsync(_izContext, sendMessageToOutGetRelComplete);
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
// remove awaitingMultipleStep after finished
|
|
@@ -135,7 +135,7 @@ module.exports.createRelationshipComplete = async (
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
} catch (err) {
|
|
138
|
-
_izContext.logger.error('error
|
|
138
|
+
_izContext.logger.error('error GetRelationshipComplete:', err)
|
|
139
139
|
throw (err)
|
|
140
140
|
}
|
|
141
141
|
}
|
package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs
CHANGED
|
@@ -112,7 +112,7 @@ module.exports.updateRelationshipComplete = async (
|
|
|
112
112
|
let sendMessageToOutUpdateRelatonshipComplete = {
|
|
113
113
|
Message: JSON.stringify(updateCompleteMsg),
|
|
114
114
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
115
|
-
TopicArn: await snsSharedLib.
|
|
115
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateRelComplete)
|
|
116
116
|
};
|
|
117
117
|
_izContext.logger.debug("Send message to OutUpdateRelationshipComplete :::>", sendMessageToOutUpdateRelatonshipComplete);
|
|
118
118
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateRelatonshipComplete);
|