@izara_project/izara-core-generate-service-code 1.0.67 → 1.0.69

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.
Files changed (128) hide show
  1. package/.prettierrc +11 -0
  2. package/package.json +16 -12
  3. package/scripts/format-ejs.js +104 -0
  4. package/src/compile/compileProject.js +40 -9
  5. package/src/compile/loadSchemas.js +120 -11
  6. package/src/emit/crud/emitCrudApplicationArtifacts.js +188 -41
  7. package/src/emit/crud/emitDynamicCrudFlowSchemas.js +34 -18
  8. package/src/emit/crud/generateCrudApplicationArtifacts.js +14 -6
  9. package/src/emit/crud/generateDynamicCrudFlowSchemas.js +4 -1
  10. package/src/emit/crud/templates/CreateEndpoint_Main.ejs +296 -105
  11. package/src/emit/crud/templates/DeleteEndpoint_Main.ejs +222 -144
  12. package/src/emit/crud/templates/FlowEndpointBeforeLogical_Main.ejs +22 -6
  13. package/src/emit/crud/templates/FlowEndpointComplete_Main.ejs +134 -43
  14. package/src/emit/crud/templates/FlowEndpoint_HdrWbs.ejs +51 -31
  15. package/src/emit/crud/templates/FlowHandler_HdrApi.ejs +53 -45
  16. package/src/emit/crud/templates/FlowHandler_HdrInv.ejs +28 -26
  17. package/src/emit/crud/templates/FlowHandler_HdrSqs.ejs +15 -11
  18. package/src/emit/crud/templates/FlowMain_Wbs.ejs +53 -38
  19. package/src/emit/crud/templates/GetEndpoint_Main.ejs +6 -3
  20. package/src/emit/crud/templates/GetRangeEndpoint_Main.ejs +2 -2
  21. package/src/emit/crud/templates/UpdateEndpoint_Main.ejs +402 -249
  22. package/src/emit/custom/customFlows.js +68 -28
  23. package/src/emit/custom/emitCustomFlowApplicationArtifacts.js +520 -123
  24. package/src/emit/custom/generateCustomFlowApplicationArtifacts.js +28 -8
  25. package/src/emit/custom/templates/FlowEndpoint_Main.ejs +48 -36
  26. package/src/emit/custom/templates/FlowStep_Main.ejs +7 -9
  27. package/src/emit/custom/templates/s3/ConfirmReserved_HdrSqs.ejs +59 -54
  28. package/src/emit/custom/templates/s3/ConfirmReserved_Main.ejs +33 -23
  29. package/src/emit/custom/templates/s3/CreateObject_HdrWbs.ejs +30 -23
  30. package/src/emit/custom/templates/s3/CreateObject_Main.ejs +56 -39
  31. package/src/emit/custom/templates/s3/CreatePreSignUrl_HdrSqs.ejs +56 -51
  32. package/src/emit/custom/templates/s3/CreatePreSignUrl_Main.ejs +112 -75
  33. package/src/emit/custom/templates/s3/FlowHandler_HdrS3.ejs +14 -9
  34. package/src/emit/custom/templates/s3/ProcessS3File_Main.ejs +11 -8
  35. package/src/emit/custom/templates/s3/ReservedLimit_HdrSqs.ejs +65 -56
  36. package/src/emit/custom/templates/s3/ReservedLimit_Main.ejs +74 -52
  37. package/src/emit/custom/templates/triggerCache/CheckTriggerCache_HdrSqs.ejs +58 -14
  38. package/src/emit/custom/templates/triggerCache/CheckTriggerCache_Main.ejs +12 -17
  39. package/src/emit/custom/templates/triggerCache/TriggerCacheComplete_Main.ejs +20 -13
  40. package/src/emit/custom/templates/triggerCache/TriggerCache_Main.ejs +4 -1
  41. package/src/emit/function/functionYamlArtifact.js +272 -79
  42. package/src/emit/function/templates/ApiFunction_Yaml.ejs +7 -0
  43. package/src/emit/function/templates/EventBridgeFunction_Yaml.ejs +6 -0
  44. package/src/emit/function/templates/InvFunction_Yaml.ejs +5 -0
  45. package/src/emit/function/templates/S3Function_Yaml.ejs +16 -0
  46. package/src/emit/function/templates/SqsFunction_Yaml.ejs +10 -0
  47. package/src/emit/function/templates/WbsFunction_Yaml.ejs +10 -0
  48. package/src/emit/rbac/emitDynamicRbacFlowSchemas.js +40 -29
  49. package/src/emit/rbac/emitRbacApplicationArtifacts.js +171 -72
  50. package/src/emit/rbac/generateCreateTargetRoleHandler.js +6 -4
  51. package/src/emit/rbac/generateDynamicRbacFlowSchemas.js +8 -2
  52. package/src/emit/rbac/rbacFlowTag.js +3 -1
  53. package/src/emit/rbac/templates/CreateTargetRole_HdrSqs.ejs +41 -18
  54. package/src/emit/rbac/templates/CreateTargetRole_Main.ejs +23 -3
  55. package/src/emit/rbac/templates/ListRbac_HdrApi.ejs +27 -5
  56. package/src/emit/rbac/templates/ListRbac_HdrSqs.ejs +41 -8
  57. package/src/emit/rbac/templates/ListRbac_Main.ejs +26 -6
  58. package/src/emit/rbac/templates/RbacMutation_Main.ejs +23 -3
  59. package/src/emit/rbac/templates/UserRbacFlow_HdrSqs.ejs +46 -0
  60. package/src/emit/rbac/templates/UserRbacFlow_Main.ejs +152 -33
  61. package/src/emit/rbac/templates/UserRoleMutation_Main.ejs +24 -4
  62. package/src/emit/relationship/emitDynamicRelationshipFlowSchemas.js +26 -11
  63. package/src/emit/relationship/emitRelationshipApplicationArtifacts.js +179 -37
  64. package/src/emit/relationship/generateDynamicRelationshipFlowSchemas.js +8 -2
  65. package/src/emit/relationship/generateRelationshipApplicationArtifacts.js +15 -6
  66. package/src/emit/relationship/templates/ChangeRelationshipComplete_Main.ejs +64 -37
  67. package/src/emit/relationship/templates/ChangeRelationship_Main.ejs +258 -142
  68. package/src/emit/relationship/templates/CreateRelationshipComplete_Main.ejs +68 -43
  69. package/src/emit/relationship/templates/CreateRelationship_Main.ejs +315 -171
  70. package/src/emit/relationship/templates/DeleteRelationshipComplete_Main.ejs +67 -41
  71. package/src/emit/relationship/templates/DeleteRelationship_Main.ejs +226 -115
  72. package/src/emit/relationship/templates/FlowHandler_HdrApi.ejs +41 -33
  73. package/src/emit/relationship/templates/FlowHandler_HdrDsq.ejs +15 -11
  74. package/src/emit/relationship/templates/FlowHandler_HdrInv.ejs +28 -26
  75. package/src/emit/relationship/templates/FlowHandler_HdrSqs.ejs +15 -11
  76. package/src/emit/relationship/templates/GetRelationshipComplete_Main.ejs +46 -26
  77. package/src/emit/relationship/templates/GetRelationship_Main.ejs +233 -126
  78. package/src/emit/relationship/templates/MoveRelationshipComplete_Main.ejs +72 -44
  79. package/src/emit/relationship/templates/MoveRelationship_Main.ejs +266 -150
  80. package/src/emit/relationship/templates/UpdateRelationshipComplete_Main.ejs +74 -45
  81. package/src/emit/relationship/templates/UpdateRelationship_Main.ejs +285 -152
  82. package/src/emit/resource/emitResourceArtifacts.js +274 -105
  83. package/src/emit/resource/generateResourceArtifacts.js +15 -6
  84. package/src/emit/resource/templates/GeneratedLambdaRoleServiceConfig.ejs +139 -0
  85. package/src/emit/resource/templates/S3Bucket_Yaml.ejs +19 -0
  86. package/src/emit/resource/templates/S3Subscription_Yaml.ejs +7 -0
  87. package/src/emit/resource/templates/WebSocketSubscription_Yaml.ejs +7 -0
  88. package/src/emit/system/emitSystemWebSocketArtifacts.js +61 -165
  89. package/src/emit/system/templates/WebSocketComplete_HdrSqs.ejs +32 -0
  90. package/src/emit/system/templates/WebSocketComplete_Main.ejs +46 -0
  91. package/src/emit/system/templates/WebSocketComplete_Yaml.ejs +19 -0
  92. package/src/emit/system/templates/WebSocketConnect.ejs +25 -0
  93. package/src/emit/system/templates/WebSocketConnect_Yaml.ejs +11 -0
  94. package/src/generate.js +141 -34
  95. package/src/generateIntTest.js +76 -28
  96. package/src/generateResourceIntTest.js +35 -12
  97. package/src/generateResources/IntTest/generateResources/generateResources.js +5 -2
  98. package/src/generateResources/IntTest/generateResources/templateResources.ejs +18 -30
  99. package/src/generateResources/IntTest/generateTests/events/events.js +1 -1
  100. package/src/generateResources/IntTest/generateTests/events/templateEvents.ejs +13 -10
  101. package/src/generateResources/IntTest/generateTests/generateTemplate.js +2 -2
  102. package/src/generateResources/IntTest/generateTests/pathIntTest/pathIntTest.js +2 -1
  103. package/src/generateResources/IntTest/generateTests/pathIntTest/template.ejs +1 -3
  104. package/src/generateResources/IntTest/generateTests/tests/templateTests.ejs +1 -1
  105. package/src/generateResources/IntTest/generateTests/tests/tests.js +7 -3
  106. package/src/generateResources/IntTest/libs/{libs.js → IntTestGenerateLib.js} +34 -23
  107. package/src/generateResources/IntTest/upload/uploadIntTest.js +33 -19
  108. package/src/intTestGeneratorShared.js +15 -10
  109. package/src/output/commitArtifacts.js +99 -39
  110. package/src/output/mergeHooks.js +24 -10
  111. package/src/output/validateArtifacts.js +37 -27
  112. package/src/plan/buildGenerationPlan.js +24 -13
  113. package/test/core.test.js +116 -49
  114. package/test/createTargetRoleHandler.test.js +63 -14
  115. package/test/crudApplicationArtifacts.test.js +128 -23
  116. package/test/customFlowApplicationArtifacts.test.js +391 -84
  117. package/test/dynamicCrudFlowSchemas.test.js +74 -26
  118. package/test/dynamicRbacFlowSchemas.test.js +63 -20
  119. package/test/dynamicRelationshipFlowSchemas.test.js +65 -18
  120. package/test/functionYamlArtifact.test.js +67 -10
  121. package/test/intTestApi.test.js +9 -10
  122. package/test/publicApi.test.js +184 -44
  123. package/test/relationshipApplicationArtifacts.test.js +90 -19
  124. package/test/resourceArtifacts.test.js +183 -33
  125. package/docs/test.png +0 -0
  126. package/src/emit/rbac/templates/UserRbacFlow_HdrInv.ejs +0 -10
  127. package/src/emit/relationship/dynamicRelationshipFlowSchemaTemplate.js +0 -11
  128. /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 { objectHash as hash, identifierUuid } from '@izara_project/izara-shared-core';
21
- import { consts as coreConsts, NoRetryError } from '@izara_project/izara-core-library-core';
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 { getObjectSchema, consts, utils, identifiersObject, dataDetailsLib, uploadUseCase } from '@izara_project/izara-core-library-service-schemas';
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 { sns, lambda } from '@izara_project/izara-core-library-external-request';
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', { requestParams, callingFlowConfig, beforeLogicalResults });
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 = settings.returnOldData === true;
88
+ const returnOldData = settings.returnOldData === true;
69
89
 
70
- const objType = createObjType(requestParams.objectType);
71
- const identifiers = requestParams.objInstanceFull.identifiers;
72
- const fields = requestParams.objInstanceFull.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(_izContext, objType);
96
+ const objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(
97
+ _izContext,
98
+ objType
99
+ );
77
100
  _izContext.logger.debug('objectSchema', objectSchema);
78
101
 
79
- const objectSchemas = await uploadUseCase.generateObjectSchemaForCombineFieldNames(_izContext, objectSchema);
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(_izContext, objectSchemas);
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 = Object.keys(versionedDataIds).length > 0;
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(requestParams.objInstanceFull.fields)) {
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], { [fieldProp]: fieldVal });
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 = Object.keys(versionedDataIds);
142
+ const versionedDataIdLabelKeys = Object.keys(versionedDataIds);
108
143
  const updateVersionedDataLabelKeys = Object.keys(updateVersionedData);
109
144
 
110
- const missingVersionedDataIdLabels = updateVersionedDataLabelKeys.filter(l => !versionedDataIdLabelKeys.includes(l));
111
- const missingDataVersionedDataLabels = versionedDataIdLabelKeys.filter(l => !updateVersionedDataLabelKeys.includes(l));
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) errorsFound.push(`missing versionedDataIds of versionedDataLabel '${missingVersionedDataIdLabels.join(', ')}'`);
114
- if (missingDataVersionedDataLabels.length) errorsFound.push(`missing data of versionedDataLabels '${missingDataVersionedDataLabels.join(', ')}'`);
115
- if (Object.keys(updateMainNodeData).length) errorsFound.push('cannot update mainNode if have versionedDataIds');
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 = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(
124
- callingFlowConfig,
125
- { objType, objInstanceFull: { identifiers, fields }, versionedDataIds, status: 'error', errorsFound }
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('messageParams OutUpdateNodeComplete:::', updateNodeCompleteMessage);
181
+ _izContext.logger.debug(
182
+ 'messageParams OutUpdateNodeComplete:::',
183
+ updateNodeCompleteMessage
184
+ );
129
185
  await sns.publishAsync(_izContext, {
130
- Message: JSON.stringify(updateNodeCompleteMessage),
186
+ Message: JSON.stringify(updateNodeCompleteMessage),
131
187
  MessageAttributes: sns.createStringMessageAttributes(
132
188
  _izContext,
133
- callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {})
189
+ callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
190
+ callingFlowConfig,
191
+ {}
192
+ )
134
193
  ),
135
- TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
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(_izContext, storageTag, updateDataDetail) {
204
+ function createObjInstanceFullFieldsByStorageTag(
205
+ _izContext,
206
+ storageTag,
207
+ updateDataDetail
208
+ ) {
143
209
  const result = {};
144
- for (const fieldName of Object.keys(requestParams.objInstanceFull.fields)) {
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, { [fieldName]: requestParams.objInstanceFull.fields[fieldName] });
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, { [field]: requestParams.objInstanceFull.identifiers[field] });
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, { [field]: requestParams.objInstanceFull.fields[field] });
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(async ([storageTag, updateDataDetail]) => {
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
- // ── Graph ─────────────────────────────────────────────────────────────
180
- if (updateDataDetail.storageType === consts.STORAGE_TYPES.graph) {
181
- //(<beforeUpdateGraph>)
182
- //(</beforeUpdateGraph>)
265
+ //(<beforeUpdateNode>)
266
+ //(</beforeUpdateNode>)
183
267
 
184
- const graphFields = createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, updateDataDetail);
185
- if (!Object.keys(graphFields).length) return;
268
+ //(<additionalAttributes>)
269
+ const additionalAttributes = {};
270
+ //(</additionalAttributes>)
186
271
 
187
- //(<beforeUpdateNode>)
188
- //(</beforeUpdateNode>)
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
- //(<additionalAttributes>)
191
- const additionalAttributes = {}
192
- //(</additionalAttributes>)
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
- const records = awaitingStepIds.length === 0 ? listOfRecords : [];
196
- awaitingStepIds.push({
197
- awaitingStepId: asyncFlowSharedLib.createAwaitingStepId(
198
- parentFlowId,
199
- PREFIX.updateNode
200
- ),
201
- additionalAttributes: { listOfRecords: records, additionalAttributes: additionalAttributes }
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
- if (awaitingStepIds.length) {
205
- const awaitingMultipleStep = await asyncFlowSharedLib.createAwaitingMultipleSteps(
350
+ // ── DynamoDB ──────────────────────────────────────────────────────────
351
+ } else if (
352
+ updateDataDetail.storageType === consts.STORAGE_TYPES.dynamoDB
353
+ ) {
354
+ const dynamoFields = createObjInstanceFullFieldsByStorageTag(
206
355
  _izContext,
207
- asyncFlowSharedLib.createPendingStepId(
208
- _izContext.uniqueRequestId
209
- ),
210
- awaitingStepIds
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
- let updateNodeParams = {
216
- objType,
217
- objInstanceFull: { identifiers, fields: graphFields },
218
- versionedDataIds,
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
- _izContext.logger.debug('messageObject before send message:', updateNodeParams);
237
-
238
- const resSNS = await sns.publishAsync(_izContext, {
239
- Message: JSON.stringify(updateNodeParams),
240
- MessageAttributes: sns.createStringMessageAttributes(_izContext, callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {})),
241
- TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inUpdateNode, storageTag)
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
- } else {
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
- _izContext,
273
- await dynamodbSharedLib.tableName(_izContext, updateDataDetail.tableName, updateDataDetail.serviceTag),
274
- identifiersForUpdateData,
275
- dynamoFields,
276
- { returnValues: 'ALL_NEW' }
277
- );
278
-
279
- _izContext.logger.debug('updateItem:', updateItem);
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(updateItem, requestParams)
418
+ objInstanceFull: createObjInstanceFullFromParams(
419
+ updateItem,
420
+ requestParams
421
+ )
292
422
  };
293
423
 
294
424
  //(<additionalProperties>)
295
425
  //(</additionalProperties>)
296
426
 
297
- if (callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOWPROPERTIES_PROPERTYNAME]) {
427
+ if (
428
+ callingFlowConfig[
429
+ callingFlowSharedLib.consts.CALLINGFLOWPROPERTIES_PROPERTYNAME
430
+ ]
431
+ ) {
298
432
  _izContext.logger.debug('HAVE CALLING FLOW');
299
- messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, 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: JSON.stringify(messageObject),
441
+ Message: JSON.stringify(messageObject),
304
442
  MessageAttributes: sns.createStringMessageAttributes(
305
443
  _izContext,
306
- callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {})
444
+ callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
445
+ callingFlowConfig,
446
+ {}
447
+ )
307
448
  ),
308
- TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
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: { objType, objInstanceFull: { identifiers, fields }, versionedDataIds },
315
- status: 'complete',
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', { requestParams, callingFlowConfig });
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
- return await createMainLogical(
351
- _izContext,
352
- requestParams,
353
- callingFlowConfig,
354
- errorsFound
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
- if (requestParams.objectType === '<%= objectType %>') {
374
-
375
- <%_ if (hasLambdaSyncInv) { _%>
376
- const lambdaSyncInvResults = await Promise.all([
377
- <%_ configs.filter(c => c.invocationType === 'lambdaSyncInv').forEach((config, index, arr) => { _%>
378
- // lambdaSyncInv <%= config.flowTag %>
379
- lambda.invokeSync(
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
- ).then(returnValue => ({ flowTag: '<%= config.flowTag %>', returnValue }))<%= index < arr.length - 1 ? ',' : '' %>
387
- // lambdaSyncInv <%= config.flowTag %>
388
- <%_ }) _%>
389
- ]);
390
- <%_ } _%>
391
-
392
- //(<afterBeforeLogical_<%= objectType %>>)
393
- //(</afterBeforeLogical_<%= objectType %>>)
394
-
395
- <%_ if (hasOwnTopic) { _%>
396
- // ── ownTopic (async — create awaitingSteps and then publish) ──────────
397
- const awaitingMultipleStepIds = [];
398
- const recordMsgs = [];
399
-
400
- <%_ configs.filter(c => c.invocationType === 'ownTopic').forEach(config => { _%>
401
- // ownTopic <%= config.flowTag %>
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
- '<%= config.codeHookTag %>_<%= objectType %>_<%= config.flowTag.charAt(0).toUpperCase() + config.flowTag.slice(1) %>'
590
+ '<%= configs[0].codeHookTag %>_<%= objectType %>_' + syncResult.flowTag
406
591
  ),
407
- additionalAttributes: {}
408
- });
409
-
410
- recordMsgs.push({
411
- msg: callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
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
- <%_ if (hasLambdaSyncInv) { _%>
431
- // ── Add lambdaSyncInv results to awaitingSteps ────────────────────────
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
- await asyncFlowSharedLib.initAwaitingStepsWithAttrs(
613
+ for (const recordMsg of recordMsgs) {
614
+ const messageAttributes = sns.createStringMessageAttributes(
448
615
  _izContext,
449
- awaitingMultipleStepIds,
450
- asyncFlowSharedLib.createPendingStepId(
451
- _izContext.uniqueRequestId,
452
- 'beforeLogical_<%= objectType %>'
616
+ callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(
617
+ callingFlowConfig,
618
+ {}
453
619
  )
454
620
  );
455
621
 
456
- //(<beforePublish_<%= objectType %>>)
457
- //(</beforePublish_<%= objectType %>>)
458
-
459
- for (const recordMsg of recordMsgs) {
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
- await sns.publishAsync(_izContext, {
474
- Message: JSON.stringify(recordMsg.msg),
475
- MessageAttributes: messageAttributes,
476
- TopicArn: topicArn
477
- });
478
- }
627
+ await sns.publishAsync(_izContext, {
628
+ Message: JSON.stringify(recordMsg.msg),
629
+ MessageAttributes: messageAttributes,
630
+ TopicArn: topicArn
631
+ });
632
+ }
479
633
 
480
- return 'complete beforeLogical <%= objectType %>';
634
+ return 'complete beforeLogical <%= objectType %>';
481
635
 
482
- <%_ } else { _%>
483
- // ── lambdaSyncInv only — collect results and proceed to updateMainLogical
484
- const beforeLogicalResults = lambdaSyncInvResults.reduce((acc, r) => {
485
- acc[r.flowTag] = r.returnValue;
486
- return acc;
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
- return await <%- flowTag %>MainLogical(
490
- _izContext,
491
- requestParams,
492
- callingFlowConfig,
493
- beforeLogicalResults
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;