@izara_project/izara-core-generate-service-code 1.0.67 → 1.0.68
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/.prettierrc +11 -0
- package/package.json +16 -12
- package/scripts/format-ejs.js +105 -0
- package/src/compile/compileProject.js +16 -1
- package/src/compile/loadSchemas.js +89 -4
- package/src/emit/crud/emitDynamicCrudFlowSchemas.js +1 -2
- package/src/emit/crud/templates/CreateEndpoint_Main.ejs +296 -105
- package/src/emit/crud/templates/DeleteEndpoint_Main.ejs +222 -144
- package/src/emit/crud/templates/FlowEndpointBeforeLogical_Main.ejs +22 -6
- package/src/emit/crud/templates/FlowEndpointComplete_Main.ejs +134 -43
- package/src/emit/crud/templates/FlowEndpoint_HdrWbs.ejs +51 -31
- package/src/emit/crud/templates/FlowHandler_HdrApi.ejs +53 -45
- package/src/emit/crud/templates/FlowHandler_HdrInv.ejs +28 -26
- package/src/emit/crud/templates/FlowHandler_HdrSqs.ejs +15 -11
- package/src/emit/crud/templates/FlowMain_Wbs.ejs +53 -38
- package/src/emit/crud/templates/GetEndpoint_Main.ejs +5 -2
- package/src/emit/crud/templates/GetRangeEndpoint_Main.ejs +2 -2
- package/src/emit/crud/templates/UpdateEndpoint_Main.ejs +402 -249
- package/src/emit/custom/customFlows.js +51 -21
- package/src/emit/custom/emitCustomFlowApplicationArtifacts.js +13 -18
- package/src/emit/custom/templates/FlowEndpoint_Main.ejs +48 -36
- package/src/emit/custom/templates/FlowStep_Main.ejs +7 -9
- package/src/emit/custom/templates/s3/ConfirmReserved_HdrSqs.ejs +59 -54
- package/src/emit/custom/templates/s3/ConfirmReserved_Main.ejs +33 -23
- package/src/emit/custom/templates/s3/CreateObject_HdrWbs.ejs +30 -23
- package/src/emit/custom/templates/s3/CreateObject_Main.ejs +56 -39
- package/src/emit/custom/templates/s3/CreatePreSignUrl_HdrSqs.ejs +56 -51
- package/src/emit/custom/templates/s3/CreatePreSignUrl_Main.ejs +112 -75
- package/src/emit/custom/templates/s3/FlowHandler_HdrS3.ejs +12 -7
- package/src/emit/custom/templates/s3/ProcessS3File_Main.ejs +11 -8
- package/src/emit/custom/templates/s3/ReservedLimit_HdrSqs.ejs +64 -55
- package/src/emit/custom/templates/s3/ReservedLimit_Main.ejs +74 -52
- package/src/emit/custom/templates/triggerCache/CheckTriggerCache_HdrSqs.ejs +58 -14
- package/src/emit/custom/templates/triggerCache/CheckTriggerCache_Main.ejs +12 -17
- package/src/emit/custom/templates/triggerCache/TriggerCacheComplete_Main.ejs +20 -13
- package/src/emit/custom/templates/triggerCache/TriggerCache_Main.ejs +4 -1
- package/src/emit/function/functionYamlArtifact.js +20 -0
- package/src/emit/rbac/emitDynamicRbacFlowSchemas.js +28 -15
- package/src/emit/rbac/emitRbacApplicationArtifacts.js +168 -69
- package/src/emit/rbac/templates/CreateTargetRole_HdrSqs.ejs +41 -18
- package/src/emit/rbac/templates/CreateTargetRole_Main.ejs +23 -3
- package/src/emit/rbac/templates/ListRbac_HdrApi.ejs +27 -5
- package/src/emit/rbac/templates/ListRbac_HdrSqs.ejs +41 -8
- package/src/emit/rbac/templates/ListRbac_Main.ejs +26 -6
- package/src/emit/rbac/templates/RbacMutation_Main.ejs +23 -3
- package/src/emit/rbac/templates/UserRbacFlow_HdrSqs.ejs +46 -0
- package/src/emit/rbac/templates/UserRbacFlow_Main.ejs +152 -33
- package/src/emit/rbac/templates/UserRoleMutation_Main.ejs +24 -4
- package/src/emit/relationship/emitDynamicRelationshipFlowSchemas.js +1 -2
- package/src/emit/relationship/templates/ChangeRelationshipComplete_Main.ejs +64 -37
- package/src/emit/relationship/templates/ChangeRelationship_Main.ejs +258 -142
- package/src/emit/relationship/templates/CreateRelationshipComplete_Main.ejs +68 -43
- package/src/emit/relationship/templates/CreateRelationship_Main.ejs +315 -171
- package/src/emit/relationship/templates/DeleteRelationshipComplete_Main.ejs +67 -41
- package/src/emit/relationship/templates/DeleteRelationship_Main.ejs +226 -115
- package/src/emit/relationship/templates/FlowHandler_HdrApi.ejs +41 -33
- package/src/emit/relationship/templates/FlowHandler_HdrDsq.ejs +15 -11
- package/src/emit/relationship/templates/FlowHandler_HdrInv.ejs +28 -26
- package/src/emit/relationship/templates/FlowHandler_HdrSqs.ejs +15 -11
- package/src/emit/relationship/templates/GetRelationshipComplete_Main.ejs +46 -26
- package/src/emit/relationship/templates/GetRelationship_Main.ejs +233 -126
- package/src/emit/relationship/templates/MoveRelationshipComplete_Main.ejs +72 -44
- package/src/emit/relationship/templates/MoveRelationship_Main.ejs +266 -150
- package/src/emit/relationship/templates/UpdateRelationshipComplete_Main.ejs +74 -45
- package/src/emit/relationship/templates/UpdateRelationship_Main.ejs +285 -152
- package/src/emit/resource/emitResourceArtifacts.js +107 -11
- package/src/emit/resource/templates/DynamoDBTable_Yaml.ejs +18 -18
- package/src/emit/resource/templates/FlowOut_Yaml.ejs +5 -5
- package/src/emit/resource/templates/GeneratedLambdaRoleServiceConfig.ejs +138 -0
- package/src/emit/resource/templates/ResourceBeforeLogicalYaml.ejs +44 -44
- package/src/emit/resource/templates/ResourceSqsYaml.ejs +36 -36
- package/src/emit/resource/templates/ResourceYaml.ejs +48 -48
- package/src/emit/resource/templates/S3Bucket_Yaml.ejs +19 -0
- package/src/emit/resource/templates/SharedResource_Yaml.ejs +11 -11
- package/src/emit/resource/templates/SystemDynamoDB_Yaml.ejs +105 -105
- package/src/generate.js +6 -2
- package/test/createTargetRoleHandler.test.js +63 -14
- package/test/customFlowApplicationArtifacts.test.js +48 -23
- package/test/dynamicCrudFlowSchemas.test.js +6 -6
- package/test/dynamicRbacFlowSchemas.test.js +8 -12
- package/test/dynamicRelationshipFlowSchemas.test.js +3 -3
- package/test/publicApi.test.js +10 -12
- package/test/resourceArtifacts.test.js +12 -2
- package/docs/test.png +0 -0
- package/src/emit/rbac/templates/UserRbacFlow_HdrInv.ejs +0 -10
- /package/docs/{test.mmd → TriggeredCacheFlow.mmd} +0 -0
|
@@ -17,11 +17,24 @@ along with this program. If not, see
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
// ==================== Shared Core Utilities ====================
|
|
20
|
-
import {
|
|
21
|
-
|
|
20
|
+
import {
|
|
21
|
+
objectHash as hash,
|
|
22
|
+
identifierUuid
|
|
23
|
+
} from '@izara_project/izara-shared-core';
|
|
24
|
+
import {
|
|
25
|
+
consts as coreConsts,
|
|
26
|
+
NoRetryError
|
|
27
|
+
} from '@izara_project/izara-core-library-core';
|
|
22
28
|
|
|
23
29
|
// ==================== Core Service Schemas ====================
|
|
24
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
getObjectSchema,
|
|
32
|
+
consts,
|
|
33
|
+
utils,
|
|
34
|
+
identifiersObject,
|
|
35
|
+
dataDetailsLib,
|
|
36
|
+
uploadUseCase
|
|
37
|
+
} from '@izara_project/izara-core-library-service-schemas';
|
|
25
38
|
const { createObjType } = utils;
|
|
26
39
|
const { dynamoDbIdentifiersByStorageResource } = identifiersObject;
|
|
27
40
|
const { createUpdateDataDetail } = dataDetailsLib;
|
|
@@ -35,7 +48,10 @@ import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow
|
|
|
35
48
|
import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
|
|
36
49
|
|
|
37
50
|
// ==================== External Services ====================
|
|
38
|
-
import {
|
|
51
|
+
import {
|
|
52
|
+
sns,
|
|
53
|
+
lambda
|
|
54
|
+
} from '@izara_project/izara-core-library-external-request';
|
|
39
55
|
|
|
40
56
|
//(<optionalRequire>)
|
|
41
57
|
//(</optionalRequire>)
|
|
@@ -57,7 +73,11 @@ export async function <%- flowTag %>MainLogical(
|
|
|
57
73
|
beforeLogicalResults = {}
|
|
58
74
|
) {
|
|
59
75
|
try {
|
|
60
|
-
_izContext.logger.debug('[<%- flowTag %>MainLogical] started', {
|
|
76
|
+
_izContext.logger.debug('[<%- flowTag %>MainLogical] started', {
|
|
77
|
+
requestParams,
|
|
78
|
+
callingFlowConfig,
|
|
79
|
+
beforeLogicalResults
|
|
80
|
+
});
|
|
61
81
|
|
|
62
82
|
//(<beforeUpdateMainLogical>)
|
|
63
83
|
//(</beforeUpdateMainLogical>)
|
|
@@ -65,37 +85,52 @@ export async function <%- flowTag %>MainLogical(
|
|
|
65
85
|
// ── Settings ──────────────────────────────────────────────────────────────
|
|
66
86
|
const settings = requestParams.additionalParams?.settings ?? {};
|
|
67
87
|
const returnSystemFieldsName = settings.returnSystemFieldsName === true;
|
|
68
|
-
const returnOldData
|
|
88
|
+
const returnOldData = settings.returnOldData === true;
|
|
69
89
|
|
|
70
|
-
const objType
|
|
71
|
-
const identifiers
|
|
72
|
-
const fields
|
|
90
|
+
const objType = createObjType(requestParams.objectType);
|
|
91
|
+
const identifiers = requestParams.objInstanceFull.identifiers;
|
|
92
|
+
const fields = requestParams.objInstanceFull.fields;
|
|
73
93
|
const versionedDataIds = requestParams.versionedDataIds ?? {};
|
|
74
94
|
const parentFlowId = identifierUuid();
|
|
75
95
|
// ── Load schema ───────────────────────────────────────────────────────────
|
|
76
|
-
const objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(
|
|
96
|
+
const objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(
|
|
97
|
+
_izContext,
|
|
98
|
+
objType
|
|
99
|
+
);
|
|
77
100
|
_izContext.logger.debug('objectSchema', objectSchema);
|
|
78
101
|
|
|
79
|
-
const objectSchemas =
|
|
102
|
+
const objectSchemas =
|
|
103
|
+
await uploadUseCase.generateObjectSchemaForCombineFieldNames(
|
|
104
|
+
_izContext,
|
|
105
|
+
objectSchema
|
|
106
|
+
);
|
|
80
107
|
_izContext.logger.debug('objectSchemas', objectSchemas);
|
|
81
108
|
|
|
82
109
|
// ── Build updateDataDetails ───────────────────────────────────────────────
|
|
83
|
-
const updateDataDetails = await createUpdateDataDetail(
|
|
110
|
+
const updateDataDetails = await createUpdateDataDetail(
|
|
111
|
+
_izContext,
|
|
112
|
+
objectSchemas
|
|
113
|
+
);
|
|
84
114
|
_izContext.logger.debug('updateDataDetails', updateDataDetails);
|
|
85
115
|
|
|
86
116
|
const originTimestamp = Date.now();
|
|
87
117
|
|
|
88
118
|
// ── Validate versionedDataIds ─────────────────────────────────────────────
|
|
89
|
-
const haveVersionedDataIdsToUpdate =
|
|
119
|
+
const haveVersionedDataIdsToUpdate =
|
|
120
|
+
Object.keys(versionedDataIds).length > 0;
|
|
90
121
|
if (haveVersionedDataIdsToUpdate) {
|
|
91
|
-
const updateMainNodeData
|
|
122
|
+
const updateMainNodeData = {};
|
|
92
123
|
const updateVersionedData = {};
|
|
93
124
|
|
|
94
|
-
for (const [fieldProp, fieldVal] of Object.entries(
|
|
125
|
+
for (const [fieldProp, fieldVal] of Object.entries(
|
|
126
|
+
requestParams.objInstanceFull.fields
|
|
127
|
+
)) {
|
|
95
128
|
const fieldSetting = objectSchema.fieldNames[fieldProp];
|
|
96
129
|
if (fieldSetting.hasOwnProperty('versionedDataLabel')) {
|
|
97
130
|
updateVersionedData[fieldSetting.versionedDataLabel] ??= {};
|
|
98
|
-
Object.assign(updateVersionedData[fieldSetting.versionedDataLabel], {
|
|
131
|
+
Object.assign(updateVersionedData[fieldSetting.versionedDataLabel], {
|
|
132
|
+
[fieldProp]: fieldVal
|
|
133
|
+
});
|
|
99
134
|
} else {
|
|
100
135
|
Object.assign(updateMainNodeData, { [fieldProp]: fieldVal });
|
|
101
136
|
}
|
|
@@ -104,15 +139,26 @@ export async function <%- flowTag %>MainLogical(
|
|
|
104
139
|
_izContext.logger.debug('updateMainNodeData::', updateMainNodeData);
|
|
105
140
|
_izContext.logger.debug('updateVersionedData::', updateVersionedData);
|
|
106
141
|
|
|
107
|
-
const versionedDataIdLabelKeys
|
|
142
|
+
const versionedDataIdLabelKeys = Object.keys(versionedDataIds);
|
|
108
143
|
const updateVersionedDataLabelKeys = Object.keys(updateVersionedData);
|
|
109
144
|
|
|
110
|
-
const missingVersionedDataIdLabels
|
|
111
|
-
|
|
145
|
+
const missingVersionedDataIdLabels = updateVersionedDataLabelKeys.filter(
|
|
146
|
+
(l) => !versionedDataIdLabelKeys.includes(l)
|
|
147
|
+
);
|
|
148
|
+
const missingDataVersionedDataLabels = versionedDataIdLabelKeys.filter(
|
|
149
|
+
(l) => !updateVersionedDataLabelKeys.includes(l)
|
|
150
|
+
);
|
|
112
151
|
|
|
113
|
-
if (missingVersionedDataIdLabels.length)
|
|
114
|
-
|
|
115
|
-
|
|
152
|
+
if (missingVersionedDataIdLabels.length)
|
|
153
|
+
errorsFound.push(
|
|
154
|
+
`missing versionedDataIds of versionedDataLabel '${missingVersionedDataIdLabels.join(', ')}'`
|
|
155
|
+
);
|
|
156
|
+
if (missingDataVersionedDataLabels.length)
|
|
157
|
+
errorsFound.push(
|
|
158
|
+
`missing data of versionedDataLabels '${missingDataVersionedDataLabels.join(', ')}'`
|
|
159
|
+
);
|
|
160
|
+
if (Object.keys(updateMainNodeData).length)
|
|
161
|
+
errorsFound.push('cannot update mainNode if have versionedDataIds');
|
|
116
162
|
}
|
|
117
163
|
|
|
118
164
|
//(<validateBeforeUpdate>)
|
|
@@ -120,35 +166,59 @@ export async function <%- flowTag %>MainLogical(
|
|
|
120
166
|
|
|
121
167
|
// ── Early exit on errors ──────────────────────────────────────────────────
|
|
122
168
|
if (errorsFound.length) {
|
|
123
|
-
const updateNodeCompleteMessage =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
169
|
+
const updateNodeCompleteMessage =
|
|
170
|
+
callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(
|
|
171
|
+
callingFlowConfig,
|
|
172
|
+
{
|
|
173
|
+
objType,
|
|
174
|
+
objInstanceFull: { identifiers, fields },
|
|
175
|
+
versionedDataIds,
|
|
176
|
+
status: 'error',
|
|
177
|
+
errorsFound
|
|
178
|
+
}
|
|
179
|
+
);
|
|
127
180
|
|
|
128
|
-
_izContext.logger.debug(
|
|
181
|
+
_izContext.logger.debug(
|
|
182
|
+
'messageParams OutUpdateNodeComplete:::',
|
|
183
|
+
updateNodeCompleteMessage
|
|
184
|
+
);
|
|
129
185
|
await sns.publishAsync(_izContext, {
|
|
130
|
-
Message:
|
|
186
|
+
Message: JSON.stringify(updateNodeCompleteMessage),
|
|
131
187
|
MessageAttributes: sns.createStringMessageAttributes(
|
|
132
188
|
_izContext,
|
|
133
|
-
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
|
|
189
|
+
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
|
|
190
|
+
callingFlowConfig,
|
|
191
|
+
{}
|
|
192
|
+
)
|
|
134
193
|
),
|
|
135
|
-
TopicArn:
|
|
194
|
+
TopicArn: snsSharedLib.snsTopicArnByFlowSchema(
|
|
195
|
+
_izContext,
|
|
196
|
+
TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete
|
|
197
|
+
)
|
|
136
198
|
});
|
|
137
199
|
|
|
138
200
|
return updateNodeCompleteMessage;
|
|
139
201
|
}
|
|
140
202
|
|
|
141
203
|
// ── Helper: extract fields per storageTag ─────────────────────────────────
|
|
142
|
-
function createObjInstanceFullFieldsByStorageTag(
|
|
204
|
+
function createObjInstanceFullFieldsByStorageTag(
|
|
205
|
+
_izContext,
|
|
206
|
+
storageTag,
|
|
207
|
+
updateDataDetail
|
|
208
|
+
) {
|
|
143
209
|
const result = {};
|
|
144
|
-
for (const fieldName of Object.keys(
|
|
210
|
+
for (const fieldName of Object.keys(
|
|
211
|
+
requestParams.objInstanceFull.fields
|
|
212
|
+
)) {
|
|
145
213
|
if (
|
|
146
214
|
updateDataDetails[storageTag].fieldNames.includes(fieldName) &&
|
|
147
215
|
updateDataDetail.fieldNames.includes(fieldName) &&
|
|
148
216
|
!identifiers.hasOwnProperty(fieldName) &&
|
|
149
217
|
!result.hasOwnProperty(fieldName)
|
|
150
218
|
) {
|
|
151
|
-
Object.assign(result, {
|
|
219
|
+
Object.assign(result, {
|
|
220
|
+
[fieldName]: requestParams.objInstanceFull.fields[fieldName]
|
|
221
|
+
});
|
|
152
222
|
}
|
|
153
223
|
}
|
|
154
224
|
return result;
|
|
@@ -159,10 +229,14 @@ export async function <%- flowTag %>MainLogical(
|
|
|
159
229
|
const objInstanceFull = { identifiers: {}, fields: {} };
|
|
160
230
|
for (const field of Object.keys(object)) {
|
|
161
231
|
if (requestParams.objInstanceFull.identifiers.hasOwnProperty(field)) {
|
|
162
|
-
Object.assign(objInstanceFull.identifiers, {
|
|
232
|
+
Object.assign(objInstanceFull.identifiers, {
|
|
233
|
+
[field]: requestParams.objInstanceFull.identifiers[field]
|
|
234
|
+
});
|
|
163
235
|
}
|
|
164
236
|
if (requestParams.objInstanceFull.fields.hasOwnProperty(field)) {
|
|
165
|
-
Object.assign(objInstanceFull.fields, {
|
|
237
|
+
Object.assign(objInstanceFull.fields, {
|
|
238
|
+
[field]: requestParams.objInstanceFull.fields[field]
|
|
239
|
+
});
|
|
166
240
|
}
|
|
167
241
|
}
|
|
168
242
|
return objInstanceFull;
|
|
@@ -174,148 +248,221 @@ export async function <%- flowTag %>MainLogical(
|
|
|
174
248
|
let updateItem;
|
|
175
249
|
|
|
176
250
|
await Promise.all(
|
|
177
|
-
Object.entries(updateDataDetails).map(
|
|
251
|
+
Object.entries(updateDataDetails).map(
|
|
252
|
+
async ([storageTag, updateDataDetail]) => {
|
|
253
|
+
// ── Graph ─────────────────────────────────────────────────────────────
|
|
254
|
+
if (updateDataDetail.storageType === consts.STORAGE_TYPES.graph) {
|
|
255
|
+
//(<beforeUpdateGraph>)
|
|
256
|
+
//(</beforeUpdateGraph>)
|
|
257
|
+
|
|
258
|
+
const graphFields = createObjInstanceFullFieldsByStorageTag(
|
|
259
|
+
_izContext,
|
|
260
|
+
storageTag,
|
|
261
|
+
updateDataDetail
|
|
262
|
+
);
|
|
263
|
+
if (!Object.keys(graphFields).length) return;
|
|
178
264
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
//(<beforeUpdateGraph>)
|
|
182
|
-
//(</beforeUpdateGraph>)
|
|
265
|
+
//(<beforeUpdateNode>)
|
|
266
|
+
//(</beforeUpdateNode>)
|
|
183
267
|
|
|
184
|
-
|
|
185
|
-
|
|
268
|
+
//(<additionalAttributes>)
|
|
269
|
+
const additionalAttributes = {};
|
|
270
|
+
//(</additionalAttributes>)
|
|
186
271
|
|
|
187
|
-
|
|
188
|
-
|
|
272
|
+
const records = awaitingStepIds.length === 0 ? listOfRecords : [];
|
|
273
|
+
awaitingStepIds.push({
|
|
274
|
+
awaitingStepId: asyncFlowSharedLib.createAwaitingStepId(
|
|
275
|
+
parentFlowId,
|
|
276
|
+
PREFIX.updateNode
|
|
277
|
+
),
|
|
278
|
+
additionalAttributes: {
|
|
279
|
+
listOfRecords: records,
|
|
280
|
+
additionalAttributes: additionalAttributes
|
|
281
|
+
}
|
|
282
|
+
});
|
|
189
283
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
284
|
+
if (awaitingStepIds.length) {
|
|
285
|
+
const awaitingMultipleStep =
|
|
286
|
+
await asyncFlowSharedLib.createAwaitingMultipleSteps(
|
|
287
|
+
_izContext,
|
|
288
|
+
asyncFlowSharedLib.createPendingStepId(
|
|
289
|
+
_izContext.uniqueRequestId
|
|
290
|
+
),
|
|
291
|
+
awaitingStepIds
|
|
292
|
+
);
|
|
293
|
+
_izContext.logger.debug(
|
|
294
|
+
'awaitingMultipleStep',
|
|
295
|
+
awaitingMultipleStep
|
|
296
|
+
);
|
|
297
|
+
}
|
|
193
298
|
|
|
299
|
+
let updateNodeParams = {
|
|
300
|
+
objType,
|
|
301
|
+
objInstanceFull: { identifiers, fields: graphFields },
|
|
302
|
+
versionedDataIds,
|
|
303
|
+
originTimestamp,
|
|
304
|
+
settings: { returnSystemFieldsName, returnOldData },
|
|
305
|
+
parentFlowId
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
updateNodeParams =
|
|
309
|
+
callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
310
|
+
updateNodeParams,
|
|
311
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
312
|
+
callingFlowConfig,
|
|
313
|
+
callingFlowSharedLib.createCallingFlowConfig(
|
|
314
|
+
//(<callingFlowProperties>)
|
|
315
|
+
await lambdaSharedLib.lambdaFunctionName(
|
|
316
|
+
_izContext,
|
|
317
|
+
TOPIC_NAME_GENERATE_CODE.updateNodeComplete
|
|
318
|
+
),
|
|
319
|
+
{}
|
|
320
|
+
//(</callingFlowProperties>)
|
|
321
|
+
)
|
|
322
|
+
)
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
_izContext.logger.debug(
|
|
326
|
+
'messageObject before send message:',
|
|
327
|
+
updateNodeParams
|
|
328
|
+
);
|
|
194
329
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
330
|
+
const resSNS = await sns.publishAsync(_izContext, {
|
|
331
|
+
Message: JSON.stringify(updateNodeParams),
|
|
332
|
+
MessageAttributes: sns.createStringMessageAttributes(
|
|
333
|
+
_izContext,
|
|
334
|
+
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
|
|
335
|
+
callingFlowConfig,
|
|
336
|
+
{}
|
|
337
|
+
)
|
|
338
|
+
),
|
|
339
|
+
TopicArn: snsSharedLib.snsTopicArnByFlowSchema(
|
|
340
|
+
_izContext,
|
|
341
|
+
TOPIC_NAME_GRAPH_HANDLER.inUpdateNode,
|
|
342
|
+
storageTag
|
|
343
|
+
)
|
|
344
|
+
});
|
|
345
|
+
_izContext.logger.debug(
|
|
346
|
+
'resSNS send to topic InUpdateNode finish!',
|
|
347
|
+
resSNS
|
|
348
|
+
);
|
|
203
349
|
|
|
204
|
-
|
|
205
|
-
|
|
350
|
+
// ── DynamoDB ──────────────────────────────────────────────────────────
|
|
351
|
+
} else if (
|
|
352
|
+
updateDataDetail.storageType === consts.STORAGE_TYPES.dynamoDB
|
|
353
|
+
) {
|
|
354
|
+
const dynamoFields = createObjInstanceFullFieldsByStorageTag(
|
|
206
355
|
_izContext,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
356
|
+
storageTag,
|
|
357
|
+
updateDataDetail
|
|
358
|
+
);
|
|
359
|
+
if (!Object.keys(dynamoFields).length) return;
|
|
360
|
+
|
|
361
|
+
//(<beforeUpdateDynamoDb>)
|
|
362
|
+
//(</beforeUpdateDynamoDb>)
|
|
363
|
+
|
|
364
|
+
const identifiersForUpdateData =
|
|
365
|
+
await dynamoDbIdentifiersByStorageResource(
|
|
366
|
+
_izContext,
|
|
367
|
+
objectSchema,
|
|
368
|
+
updateDataDetail,
|
|
369
|
+
identifiers
|
|
370
|
+
);
|
|
371
|
+
_izContext.logger.debug(
|
|
372
|
+
'identifiersForUpdateData',
|
|
373
|
+
identifiersForUpdateData
|
|
211
374
|
);
|
|
212
|
-
_izContext.logger.debug('awaitingMultipleStep', awaitingMultipleStep);
|
|
213
|
-
}
|
|
214
375
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
originTimestamp,
|
|
220
|
-
settings: { returnSystemFieldsName, returnOldData },
|
|
221
|
-
parentFlowId
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
updateNodeParams = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
225
|
-
updateNodeParams,
|
|
226
|
-
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
227
|
-
callingFlowConfig,
|
|
228
|
-
callingFlowSharedLib.createCallingFlowConfig(
|
|
229
|
-
//(<callingFlowProperties>)
|
|
230
|
-
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.updateNodeComplete), {}
|
|
231
|
-
//(</callingFlowProperties>)
|
|
376
|
+
if (
|
|
377
|
+
Object.values(updateDataDetails).some(
|
|
378
|
+
(updateDataDetail) =>
|
|
379
|
+
updateDataDetail.storageType === consts.STORAGE_TYPES.graph
|
|
232
380
|
)
|
|
233
|
-
)
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
_izContext.logger.debug('resSNS send to topic InUpdateNode finish!', resSNS);
|
|
244
|
-
|
|
245
|
-
// ── DynamoDB ──────────────────────────────────────────────────────────
|
|
246
|
-
} else if (updateDataDetail.storageType === consts.STORAGE_TYPES.dynamoDB) {
|
|
247
|
-
const dynamoFields = createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, updateDataDetail);
|
|
248
|
-
if (!Object.keys(dynamoFields).length) return;
|
|
249
|
-
|
|
250
|
-
//(<beforeUpdateDynamoDb>)
|
|
251
|
-
//(</beforeUpdateDynamoDb>)
|
|
252
|
-
|
|
253
|
-
const identifiersForUpdateData = await dynamoDbIdentifiersByStorageResource(_izContext, objectSchema, updateDataDetail, identifiers);
|
|
254
|
-
_izContext.logger.debug('identifiersForUpdateData', identifiersForUpdateData);
|
|
255
|
-
|
|
256
|
-
if (Object.values(updateDataDetails).some(
|
|
257
|
-
updateDataDetail => updateDataDetail.storageType === consts.STORAGE_TYPES.graph)) {
|
|
258
|
-
_izContext.logger.debug('must process graph first');
|
|
259
|
-
listOfRecords.push({
|
|
260
|
-
[storageTag]: {
|
|
261
|
-
serviceTag: updateDataDetail.serviceTag,
|
|
262
|
-
tableName: updateDataDetail.tableName,
|
|
263
|
-
objInstanceFull: {
|
|
264
|
-
identifiers: identifiersForUpdateData,
|
|
265
|
-
fields: dynamoFields
|
|
381
|
+
) {
|
|
382
|
+
_izContext.logger.debug('must process graph first');
|
|
383
|
+
listOfRecords.push({
|
|
384
|
+
[storageTag]: {
|
|
385
|
+
serviceTag: updateDataDetail.serviceTag,
|
|
386
|
+
tableName: updateDataDetail.tableName,
|
|
387
|
+
objInstanceFull: {
|
|
388
|
+
identifiers: identifiersForUpdateData,
|
|
389
|
+
fields: dynamoFields
|
|
390
|
+
}
|
|
266
391
|
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
_izContext.logger.debug('can process record dynamo')
|
|
392
|
+
});
|
|
393
|
+
} else {
|
|
394
|
+
_izContext.logger.debug('can process record dynamo');
|
|
271
395
|
updateItem = await dynamodbSharedLib.updateItem(
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
396
|
+
_izContext,
|
|
397
|
+
await dynamodbSharedLib.tableName(
|
|
398
|
+
_izContext,
|
|
399
|
+
updateDataDetail.tableName,
|
|
400
|
+
updateDataDetail.serviceTag
|
|
401
|
+
),
|
|
402
|
+
identifiersForUpdateData,
|
|
403
|
+
dynamoFields,
|
|
404
|
+
{ returnValues: 'ALL_NEW' }
|
|
405
|
+
);
|
|
280
406
|
|
|
407
|
+
_izContext.logger.debug('updateItem:', updateItem);
|
|
408
|
+
}
|
|
281
409
|
}
|
|
282
|
-
|
|
283
410
|
}
|
|
284
|
-
|
|
411
|
+
)
|
|
285
412
|
);
|
|
286
413
|
|
|
287
414
|
// ── DynamoDB-only complete path ───────────────────────────────────────────
|
|
288
415
|
if (awaitingStepIds.length === 0) {
|
|
289
416
|
let messageObject = {
|
|
290
417
|
objType,
|
|
291
|
-
objInstanceFull: createObjInstanceFullFromParams(
|
|
418
|
+
objInstanceFull: createObjInstanceFullFromParams(
|
|
419
|
+
updateItem,
|
|
420
|
+
requestParams
|
|
421
|
+
)
|
|
292
422
|
};
|
|
293
423
|
|
|
294
424
|
//(<additionalProperties>)
|
|
295
425
|
//(</additionalProperties>)
|
|
296
426
|
|
|
297
|
-
if (
|
|
427
|
+
if (
|
|
428
|
+
callingFlowConfig[
|
|
429
|
+
callingFlowSharedLib.consts.CALLINGFLOWPROPERTIES_PROPERTYNAME
|
|
430
|
+
]
|
|
431
|
+
) {
|
|
298
432
|
_izContext.logger.debug('HAVE CALLING FLOW');
|
|
299
|
-
messageObject =
|
|
433
|
+
messageObject =
|
|
434
|
+
callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(
|
|
435
|
+
callingFlowConfig,
|
|
436
|
+
messageObject
|
|
437
|
+
);
|
|
300
438
|
|
|
301
439
|
_izContext.logger.debug('after create callingFlow', messageObject);
|
|
302
440
|
await sns.publishAsync(_izContext, {
|
|
303
|
-
Message:
|
|
441
|
+
Message: JSON.stringify(messageObject),
|
|
304
442
|
MessageAttributes: sns.createStringMessageAttributes(
|
|
305
443
|
_izContext,
|
|
306
|
-
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
|
|
444
|
+
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
|
|
445
|
+
callingFlowConfig,
|
|
446
|
+
{}
|
|
447
|
+
)
|
|
307
448
|
),
|
|
308
|
-
TopicArn:
|
|
449
|
+
TopicArn: snsSharedLib.snsTopicArnByFlowSchema(
|
|
450
|
+
_izContext,
|
|
451
|
+
TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete
|
|
452
|
+
)
|
|
309
453
|
});
|
|
310
454
|
}
|
|
311
455
|
}
|
|
312
456
|
|
|
313
457
|
return {
|
|
314
|
-
returnValues: {
|
|
315
|
-
|
|
458
|
+
returnValues: {
|
|
459
|
+
objType,
|
|
460
|
+
objInstanceFull: { identifiers, fields },
|
|
461
|
+
versionedDataIds
|
|
462
|
+
},
|
|
463
|
+
status: 'complete',
|
|
316
464
|
errorsFound
|
|
317
465
|
};
|
|
318
|
-
|
|
319
466
|
} catch (err) {
|
|
320
467
|
_izContext.logger.error('[<%- flowTag %>MainLogical] error:', err);
|
|
321
468
|
throw err;
|
|
@@ -337,22 +484,25 @@ export default async function <%- flowTag %>(
|
|
|
337
484
|
//(</additionalParams>)
|
|
338
485
|
) {
|
|
339
486
|
try {
|
|
340
|
-
_izContext.logger.debug('[<%- flowTag %>] started', {
|
|
487
|
+
_izContext.logger.debug('[<%- flowTag %>] started', {
|
|
488
|
+
requestParams,
|
|
489
|
+
callingFlowConfig
|
|
490
|
+
});
|
|
341
491
|
|
|
342
492
|
// ── Build identifiers (used for hash in beforeLogical) ──────────────────
|
|
343
493
|
const identifiers = requestParams.objInstanceFull.identifiers;
|
|
344
|
-
const errorsFound
|
|
494
|
+
const errorsFound = [];
|
|
345
495
|
|
|
346
496
|
//(<validateBeforeUpdate>)
|
|
347
497
|
//(</validateBeforeUpdate>)
|
|
348
498
|
|
|
349
499
|
if (errorsFound.length > 0)
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
500
|
+
return await createMainLogical(
|
|
501
|
+
_izContext,
|
|
502
|
+
requestParams,
|
|
503
|
+
callingFlowConfig,
|
|
504
|
+
errorsFound
|
|
505
|
+
);
|
|
356
506
|
|
|
357
507
|
// ── beforeLogical phase check ─────────────────────────────────────────────
|
|
358
508
|
<%_
|
|
@@ -366,134 +516,138 @@ export default async function <%- flowTag %>(
|
|
|
366
516
|
}, {});
|
|
367
517
|
_%>
|
|
368
518
|
<%_ Object.entries(groupedByObjType).forEach(([objectType, configs]) => { _%>
|
|
369
|
-
|
|
519
|
+
<%_
|
|
370
520
|
const hasOwnTopic = configs.some(c => c.invocationType === 'ownTopic');
|
|
371
521
|
const hasLambdaSyncInv = configs.some(c => c.invocationType === 'lambdaSyncInv');
|
|
372
522
|
_%>
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
523
|
+
if (requestParams.objectType === '<%= objectType %>') {
|
|
524
|
+
<%_ if (hasLambdaSyncInv) { _%>
|
|
525
|
+
const lambdaSyncInvResults = await Promise.all([
|
|
526
|
+
<%_ configs.filter(c => c.invocationType === 'lambdaSyncInv').forEach((config, index, arr) => { _%>
|
|
527
|
+
// lambdaSyncInv <%= config.flowTag %>
|
|
528
|
+
lambda
|
|
529
|
+
.invokeSync(
|
|
380
530
|
_izContext,
|
|
381
531
|
await lambdaSharedLib.lambdaFunctionName(
|
|
382
532
|
_izContext,
|
|
383
533
|
'Process<%= config.flowTag %>HdrInv'
|
|
384
534
|
),
|
|
385
535
|
{ requestParams, callingFlowConfig }
|
|
386
|
-
)
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
536
|
+
)
|
|
537
|
+
.then((returnValue) => ({
|
|
538
|
+
flowTag: '<%= config.flowTag %>',
|
|
539
|
+
returnValue
|
|
540
|
+
})) /*__EJS_COMMA_14__*/
|
|
541
|
+
// lambdaSyncInv <%= config.flowTag %>
|
|
542
|
+
<%_ }) _%>
|
|
543
|
+
]);
|
|
544
|
+
<%_ } _%>
|
|
545
|
+
|
|
546
|
+
//(<afterBeforeLogical_<%= objectType %>>)
|
|
547
|
+
//(</afterBeforeLogical_<%= objectType %>>)
|
|
548
|
+
|
|
549
|
+
<%_ if (hasOwnTopic) { _%>
|
|
550
|
+
// ── ownTopic (async — create awaitingSteps and then publish) ──────────
|
|
551
|
+
const awaitingMultipleStepIds = [];
|
|
552
|
+
const recordMsgs = [];
|
|
553
|
+
|
|
554
|
+
<%_ configs.filter(c => c.invocationType === 'ownTopic').forEach(config => { _%>
|
|
555
|
+
// ownTopic <%= config.flowTag %>
|
|
556
|
+
awaitingMultipleStepIds.push({
|
|
557
|
+
awaitingStepId: await asyncFlowSharedLib.createAwaitingStepId(
|
|
558
|
+
hash(identifiers),
|
|
559
|
+
'<%= config.codeHookTag %>_<%= objectType %>_<%= config.flowTag.charAt(0).toUpperCase() + config.flowTag.slice(1) %>'
|
|
560
|
+
),
|
|
561
|
+
additionalAttributes: {}
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
recordMsgs.push({
|
|
565
|
+
msg: callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
566
|
+
requestParams,
|
|
567
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
568
|
+
callingFlowConfig,
|
|
569
|
+
callingFlowSharedLib.createCallingFlowConfig(
|
|
570
|
+
//(<callingFlowProperties_<%= config.flowTag %>>)
|
|
571
|
+
await lambdaSharedLib.lambdaFunctionName(
|
|
572
|
+
_izContext,
|
|
573
|
+
'<%= config.generatedCodeTag %><%= config.codeHookTag.charAt(0).toUpperCase() + config.codeHookTag.slice(1) %>'
|
|
574
|
+
),
|
|
575
|
+
{}
|
|
576
|
+
//(</callingFlowProperties_<%= config.flowTag %>>)
|
|
577
|
+
)
|
|
578
|
+
)
|
|
579
|
+
),
|
|
580
|
+
flowTag: '<%= config.flowTag.charAt(0).toUpperCase() + config.flowTag.slice(1) %>'
|
|
581
|
+
});
|
|
582
|
+
<%_ }) _%>
|
|
583
|
+
|
|
584
|
+
<%_ if (hasLambdaSyncInv) { _%>
|
|
585
|
+
// ── Add lambdaSyncInv results to awaitingSteps ────────────────────────
|
|
586
|
+
for (const syncResult of lambdaSyncInvResults) {
|
|
402
587
|
awaitingMultipleStepIds.push({
|
|
403
588
|
awaitingStepId: await asyncFlowSharedLib.createAwaitingStepId(
|
|
404
589
|
hash(identifiers),
|
|
405
|
-
'<%=
|
|
590
|
+
'<%= configs[0].codeHookTag %>_<%= objectType %>_' + syncResult.flowTag
|
|
406
591
|
),
|
|
407
|
-
additionalAttributes: {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
requestParams,
|
|
413
|
-
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
414
|
-
callingFlowConfig,
|
|
415
|
-
callingFlowSharedLib.createCallingFlowConfig(
|
|
416
|
-
//(<callingFlowProperties_<%= config.flowTag %>>)
|
|
417
|
-
await lambdaSharedLib.lambdaFunctionName(
|
|
418
|
-
_izContext,
|
|
419
|
-
'<%= config.generatedCodeTag %><%= config.codeHookTag.charAt(0).toUpperCase() + config.codeHookTag.slice(1) %>'
|
|
420
|
-
),
|
|
421
|
-
{}
|
|
422
|
-
//(</callingFlowProperties_<%= config.flowTag %>>)
|
|
423
|
-
)
|
|
424
|
-
)
|
|
425
|
-
),
|
|
426
|
-
flowTag: '<%= config.flowTag.charAt(0).toUpperCase() + config.flowTag.slice(1) %>'
|
|
592
|
+
additionalAttributes: {
|
|
593
|
+
complete: true,
|
|
594
|
+
errorsFound: [],
|
|
595
|
+
returnValue: syncResult.returnValue
|
|
596
|
+
}
|
|
427
597
|
});
|
|
428
|
-
|
|
598
|
+
}
|
|
599
|
+
<%_ } _%>
|
|
600
|
+
|
|
601
|
+
await asyncFlowSharedLib.initAwaitingStepsWithAttrs(
|
|
602
|
+
_izContext,
|
|
603
|
+
awaitingMultipleStepIds,
|
|
604
|
+
asyncFlowSharedLib.createPendingStepId(
|
|
605
|
+
_izContext.uniqueRequestId,
|
|
606
|
+
'beforeLogical_<%= objectType %>'
|
|
607
|
+
)
|
|
608
|
+
);
|
|
429
609
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
for (const syncResult of lambdaSyncInvResults) {
|
|
433
|
-
awaitingMultipleStepIds.push({
|
|
434
|
-
awaitingStepId: await asyncFlowSharedLib.createAwaitingStepId(
|
|
435
|
-
hash(identifiers),
|
|
436
|
-
'<%= configs[0].codeHookTag %>_<%= objectType %>_' + syncResult.flowTag
|
|
437
|
-
),
|
|
438
|
-
additionalAttributes: {
|
|
439
|
-
complete: true,
|
|
440
|
-
errorsFound: [],
|
|
441
|
-
returnValue: syncResult.returnValue
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
<%_ } _%>
|
|
610
|
+
//(<beforePublish_<%= objectType %>>)
|
|
611
|
+
//(</beforePublish_<%= objectType %>>)
|
|
446
612
|
|
|
447
|
-
|
|
613
|
+
for (const recordMsg of recordMsgs) {
|
|
614
|
+
const messageAttributes = sns.createStringMessageAttributes(
|
|
448
615
|
_izContext,
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
'beforeLogical_<%= objectType %>'
|
|
616
|
+
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
|
|
617
|
+
callingFlowConfig,
|
|
618
|
+
{}
|
|
453
619
|
)
|
|
454
620
|
);
|
|
455
621
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
const messageAttributes = sns.createStringMessageAttributes(
|
|
461
|
-
_izContext,
|
|
462
|
-
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
|
|
463
|
-
callingFlowConfig,
|
|
464
|
-
{}
|
|
465
|
-
)
|
|
466
|
-
);
|
|
467
|
-
|
|
468
|
-
const topicArn = snsSharedLib.snsTopicArnByFlowSchema(
|
|
469
|
-
_izContext,
|
|
470
|
-
`${recordMsg.flowTag}_In`
|
|
471
|
-
);
|
|
622
|
+
const topicArn = snsSharedLib.snsTopicArnByFlowSchema(
|
|
623
|
+
_izContext,
|
|
624
|
+
`${recordMsg.flowTag}_In`
|
|
625
|
+
);
|
|
472
626
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
627
|
+
await sns.publishAsync(_izContext, {
|
|
628
|
+
Message: JSON.stringify(recordMsg.msg),
|
|
629
|
+
MessageAttributes: messageAttributes,
|
|
630
|
+
TopicArn: topicArn
|
|
631
|
+
});
|
|
632
|
+
}
|
|
479
633
|
|
|
480
|
-
|
|
634
|
+
return 'complete beforeLogical <%= objectType %>';
|
|
481
635
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
636
|
+
<%_ } else { _%>
|
|
637
|
+
// ── lambdaSyncInv only — collect results and proceed to updateMainLogical
|
|
638
|
+
const beforeLogicalResults = lambdaSyncInvResults.reduce((acc, r) => {
|
|
639
|
+
acc[r.flowTag] = r.returnValue;
|
|
640
|
+
return acc;
|
|
641
|
+
}, {});
|
|
488
642
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
643
|
+
return await <%- flowTag %>MainLogical(
|
|
644
|
+
_izContext,
|
|
645
|
+
requestParams,
|
|
646
|
+
callingFlowConfig,
|
|
647
|
+
beforeLogicalResults
|
|
648
|
+
);
|
|
649
|
+
<%_ } _%>
|
|
650
|
+
}
|
|
497
651
|
<%_ }) _%>
|
|
498
652
|
|
|
499
653
|
//(<beforeUpdateMainLogical>)
|
|
@@ -505,7 +659,6 @@ export default async function <%- flowTag %>(
|
|
|
505
659
|
requestParams,
|
|
506
660
|
callingFlowConfig
|
|
507
661
|
);
|
|
508
|
-
|
|
509
662
|
} catch (err) {
|
|
510
663
|
_izContext.logger.error('[<%- flowTag %>] error:', err);
|
|
511
664
|
throw err;
|