@izara_project/izara-core-generate-service-code 1.0.36 → 1.0.38
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/generateCode/generateFlowStepWithPlugIn/afterFirstFlowStep/recievePlugIn/mainFunction/template.ejs +1 -1
- package/src/generateCode/generateFlowStepWithPlugIn/afterFirstFlowStep/sendPlugIn/mainFunction/template.ejs +1 -1
- package/src/generateCode/generateFlowStepWithPlugIn/firstFlowStep/mainFunction/template.ejs +1 -1
- package/src/generateCode/generateSchema/actionEndpointComponent/mainFunction/beforeLogical/template.ejs +10 -0
- package/src/generateCode/generateSchema/actionEndpointComponent/mainFunction/create/main/template.ejs +1 -0
- package/src/generateCode/generateSchema/relationshipPerActionComponent/create/action/mainFunction/template.ejs +7 -4
- package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/action/handler/templateByHandler/apiTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/action/handler/templateByHandler/invTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/get/action/handler/templateByHandler/apiTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/get/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/get/action/handler/templateByHandler/invTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/get/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/get/action/mainFunction/template.ejs +60 -47
- package/src/generateCode/generateSchema/relationshipPerActionComponent/moveRelationship/action/mainFunction/template.ejs +12 -8
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/handler/templateByHandler/apiTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/handler/templateByHandler/invTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/mainFunction/template.ejs +203 -187
- package/src/libs/Consts.js +1 -1
package/package.json
CHANGED
|
@@ -135,6 +135,16 @@ import { <%= action %>MainLogical } from './<%= functionName %>_Main.js';
|
|
|
135
135
|
})
|
|
136
136
|
);
|
|
137
137
|
|
|
138
|
+
if (callingFlowConfig.callingFlow === `${process.env.iz_resourcePrefix}CreateBeforeLogical`) {
|
|
139
|
+
callingFlowConfig =
|
|
140
|
+
callingFlowConfig.callingFlowProperties.parentPassBackProperties;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
_izContext.logger.debug(
|
|
144
|
+
'[createBeforeLogicalMain] callingFlowConfig',
|
|
145
|
+
callingFlowConfig
|
|
146
|
+
);
|
|
147
|
+
|
|
138
148
|
//(<beforeLogicalMain>)
|
|
139
149
|
//(</beforeLogicalMain>)
|
|
140
150
|
|
|
@@ -240,6 +240,7 @@ const PREFIX = {
|
|
|
240
240
|
messageObject = {
|
|
241
241
|
objType,
|
|
242
242
|
objInstanceFull: objectForCreate.objInstanceFull,
|
|
243
|
+
deepPathConditional: requestParams.deepPathConditional || [],
|
|
243
244
|
setFieldConditionals: requestParams.setFieldConditionals || [],
|
|
244
245
|
relationships: requestParams.relationships || []
|
|
245
246
|
};
|
|
@@ -129,6 +129,9 @@ export default async function createRelationship(
|
|
|
129
129
|
const relationshipSchema = await getRelationshipSchemaWithCache(_izContext, relType);
|
|
130
130
|
_izContext.logger.debug("relationshipSchema: ", relationshipSchema);
|
|
131
131
|
|
|
132
|
+
const firstObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, firstObject.objType);
|
|
133
|
+
const secondObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, secondObject.objType);
|
|
134
|
+
|
|
132
135
|
const links = await findLinksByObjTypes(_izContext, [firstObject.objType, secondObject.objType], relationshipSchema.links)
|
|
133
136
|
_izContext.logger.debug("links", links)
|
|
134
137
|
if (!links.length) {
|
|
@@ -140,8 +143,8 @@ export default async function createRelationship(
|
|
|
140
143
|
const { serviceTag: fromServiceTag, objectType: fromObjectType } = link.from.objType;
|
|
141
144
|
const { serviceTag: toServiceTag, objectType: toObjType } = link.to.objType;
|
|
142
145
|
|
|
143
|
-
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObject.objType
|
|
144
|
-
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObject.objType
|
|
146
|
+
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObject.objType;
|
|
147
|
+
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObject.objType;
|
|
145
148
|
|
|
146
149
|
const matchFromTo = fromServiceTag === firstServiceTag && fromObjectType === firstObjectType &&
|
|
147
150
|
toServiceTag === secondServiceTag && toObjType === secondObjectType;
|
|
@@ -169,8 +172,8 @@ export default async function createRelationship(
|
|
|
169
172
|
const { serviceTag: fromServiceTag, objectType: fromObjectType } = from.objType
|
|
170
173
|
const { serviceTag: toServiceTag, objectType: toObjectType } = to.objType
|
|
171
174
|
|
|
172
|
-
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObject.objType;
|
|
173
|
-
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObject.objType;
|
|
175
|
+
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObjectHie.extendObjType || firstObject.objType;
|
|
176
|
+
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObjectHie.extendObjType || secondObject.objType;
|
|
174
177
|
|
|
175
178
|
// find exists link
|
|
176
179
|
if (
|
|
@@ -28,7 +28,7 @@ import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Mai
|
|
|
28
28
|
// validate event params in middleware before into function
|
|
29
29
|
let validator = {
|
|
30
30
|
type: "object",
|
|
31
|
-
required: ["
|
|
31
|
+
required: ["relType", "relId"],
|
|
32
32
|
properties: {
|
|
33
33
|
firstObject: {
|
|
34
34
|
type: "object",
|
|
@@ -46,7 +46,7 @@ middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
|
46
46
|
// validate event params in middlewware before into function.
|
|
47
47
|
let validatorSchema = {
|
|
48
48
|
type: "object",
|
|
49
|
-
required: ["
|
|
49
|
+
required: ["relType", "relId"],
|
|
50
50
|
properties: {
|
|
51
51
|
firstObject: {
|
|
52
52
|
type: "object",
|
|
@@ -29,7 +29,7 @@ import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Mai
|
|
|
29
29
|
// validate event params in middlewware before into function.
|
|
30
30
|
let validator = {
|
|
31
31
|
type: "object",
|
|
32
|
-
|
|
32
|
+
required: ["relType", "relId"],
|
|
33
33
|
properties: {
|
|
34
34
|
firstObject: {
|
|
35
35
|
type: "object",
|
|
@@ -33,7 +33,7 @@ middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema());
|
|
|
33
33
|
// validate event params in middleware before into function
|
|
34
34
|
let validator = {
|
|
35
35
|
type: "object",
|
|
36
|
-
|
|
36
|
+
required: ["relType", "relId"],
|
|
37
37
|
properties: {
|
|
38
38
|
firstObject: {
|
|
39
39
|
type: "object",
|
|
@@ -28,7 +28,7 @@ import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Mai
|
|
|
28
28
|
// validate event params in middlewareHandler before into function
|
|
29
29
|
let basicValidatorSchema = {
|
|
30
30
|
type: "object",
|
|
31
|
-
required: ["
|
|
31
|
+
required: ["relType", 'relId'],
|
|
32
32
|
properties: {
|
|
33
33
|
firstObject: {
|
|
34
34
|
type: "object",
|
|
@@ -43,7 +43,7 @@ middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
|
43
43
|
// validate event params in middlewware before into function.
|
|
44
44
|
let validator = {
|
|
45
45
|
type: "object",
|
|
46
|
-
required: ["
|
|
46
|
+
required: ["relType", 'relId'],
|
|
47
47
|
properties: {
|
|
48
48
|
firstObject: {
|
|
49
49
|
type: "object",
|
|
@@ -28,7 +28,7 @@ import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Mai
|
|
|
28
28
|
// validate event params in middlewware before into function.
|
|
29
29
|
let validator = {
|
|
30
30
|
type: "object",
|
|
31
|
-
required: ["
|
|
31
|
+
required: ["relType", 'relId'],
|
|
32
32
|
properties: {
|
|
33
33
|
firstObject: {
|
|
34
34
|
type: "object",
|
|
@@ -32,7 +32,7 @@ middlewareHandler.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
|
32
32
|
// validate event params in middlewareHandler before into function
|
|
33
33
|
let basicValidatorSchema = {
|
|
34
34
|
type: "object",
|
|
35
|
-
required: ["
|
|
35
|
+
required: ["relType", 'relId'],
|
|
36
36
|
properties: {
|
|
37
37
|
firstObject: {
|
|
38
38
|
type: "object",
|
|
@@ -143,54 +143,67 @@ export default async function getRelationship(
|
|
|
143
143
|
let targetStorageResources = [];
|
|
144
144
|
|
|
145
145
|
if (relationshipSchema) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
relationshipSchema.links.map(async ({ from, to, storageResourceTags }) => {
|
|
149
|
-
const { serviceTag: fromServiceTag, objectType: fromObjectType } = from.objType
|
|
150
|
-
const { serviceTag: toServiceTag, objectType: toObjectType } = to.objType
|
|
151
|
-
|
|
152
|
-
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObject.objType;
|
|
153
|
-
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObject.objType;
|
|
154
|
-
|
|
155
|
-
// find exists link
|
|
156
|
-
if (
|
|
157
|
-
(
|
|
158
|
-
(firstServiceTag === fromServiceTag && firstObjectType === fromObjectType) &&
|
|
159
|
-
(secondServiceTag === toServiceTag && secondObjectType === toObjectType)
|
|
160
|
-
) ||
|
|
161
|
-
(
|
|
162
|
-
(firstServiceTag === toServiceTag && firstObjectType === toObjectType) &&
|
|
163
|
-
(secondServiceTag === fromServiceTag && secondObjectType === fromObjectType)
|
|
164
|
-
)
|
|
165
|
-
) {
|
|
166
|
-
|
|
167
|
-
// check founded storageResource of link and collect used storageResources
|
|
168
|
-
await Promise.all(storageResourceTags.map(async storageResourceTag => {
|
|
169
|
-
const usedStorageResource = relationshipSchema.storageResources[storageResourceTag];
|
|
170
|
-
|
|
171
|
-
if (usedStorageResource.storageType === consts.STORAGE_TYPES.graph) {
|
|
172
|
-
const graphServiceTag = await getGraphServiceTagWithCache(_izContext, usedStorageResource.graphServerTag);
|
|
173
|
-
if (!graphServiceTag) {
|
|
174
|
-
errorsFound.push(`storageResourceTag: ${storageResourceTag} invalid, not found graph serviceTag from graphServerTag: ${usedStorageResource.graphServerTag}`)
|
|
175
|
-
}
|
|
146
|
+
let firstObjectHie;
|
|
147
|
+
let secondObjectHie;
|
|
176
148
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
149
|
+
if (firstObject && Object.values(firstObject).length > 0) {
|
|
150
|
+
firstObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, firstObject.objType);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
if (secondObject && Object.values(secondObject).length > 0) {
|
|
154
|
+
secondObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, secondObject.objType);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
if (firstObjectHie || firstObject || secondObjectHie || secondObject) {
|
|
158
|
+
// find targetStorageResources and validate each storageResources
|
|
159
|
+
await Promise.all(
|
|
160
|
+
relationshipSchema.links.map(async ({ from, to, storageResourceTags }) => {
|
|
161
|
+
const { serviceTag: fromServiceTag, objectType: fromObjectType } = from.objType
|
|
162
|
+
const { serviceTag: toServiceTag, objectType: toObjectType } = to.objType
|
|
163
|
+
|
|
164
|
+
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObjectHie.extendObjType || firstObject.objType;
|
|
165
|
+
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObjectHie.extendObjType || secondObject.objType;
|
|
166
|
+
|
|
167
|
+
// find exists link
|
|
168
|
+
if (
|
|
169
|
+
(
|
|
170
|
+
(firstServiceTag === fromServiceTag && firstObjectType === fromObjectType) &&
|
|
171
|
+
(secondServiceTag === toServiceTag && secondObjectType === toObjectType)
|
|
172
|
+
) ||
|
|
173
|
+
(
|
|
174
|
+
(firstServiceTag === toServiceTag && firstObjectType === toObjectType) &&
|
|
175
|
+
(secondServiceTag === fromServiceTag && secondObjectType === fromObjectType)
|
|
176
|
+
)
|
|
177
|
+
) {
|
|
178
|
+
|
|
179
|
+
// check founded storageResource of link and collect used storageResources
|
|
180
|
+
await Promise.all(storageResourceTags.map(async storageResourceTag => {
|
|
181
|
+
const usedStorageResource = relationshipSchema.storageResources[storageResourceTag];
|
|
182
|
+
|
|
183
|
+
if (usedStorageResource.storageType === consts.STORAGE_TYPES.graph) {
|
|
184
|
+
const graphServiceTag = await getGraphServiceTagWithCache(_izContext, usedStorageResource.graphServerTag);
|
|
185
|
+
if (!graphServiceTag) {
|
|
186
|
+
errorsFound.push(`storageResourceTag: ${storageResourceTag} invalid, not found graph serviceTag from graphServerTag: ${usedStorageResource.graphServerTag}`)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
targetStorageResources.push({
|
|
190
|
+
...usedStorageResource,
|
|
191
|
+
graphServiceTag: graphServiceTag
|
|
192
|
+
});
|
|
193
|
+
} else {
|
|
194
|
+
targetStorageResources.push(usedStorageResource);
|
|
195
|
+
}
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
);
|
|
200
|
+
//(<afterGetRelCreateRel>)
|
|
201
|
+
//(</afterGetRelCreateRel>)
|
|
202
|
+
_izContext.logger.debug("targetStorageResources: ", targetStorageResources);
|
|
203
|
+
|
|
204
|
+
if (!targetStorageResources.length) {
|
|
205
|
+
errorsFound.push(`Not found link from relationship schema`);
|
|
206
|
+
}
|
|
194
207
|
}
|
|
195
208
|
} else {
|
|
196
209
|
errorsFound.push(`relationshipSchema not exists`);
|
|
@@ -64,7 +64,7 @@ import { consts as coreConsts } from '@izara_project/izara-core-library-core';
|
|
|
64
64
|
*
|
|
65
65
|
* @returns {object} description of return value
|
|
66
66
|
*/
|
|
67
|
-
export default async function
|
|
67
|
+
export default async function moveRelationship(
|
|
68
68
|
_izContext,
|
|
69
69
|
requestParams,
|
|
70
70
|
callingFlowConfig = {},
|
|
@@ -72,9 +72,9 @@ export default async function <%- functionName %> (
|
|
|
72
72
|
//(</additionalParams>)
|
|
73
73
|
) {
|
|
74
74
|
try {
|
|
75
|
-
_izContext.logger.debug('
|
|
76
|
-
_izContext.logger.debug('
|
|
77
|
-
_izContext.logger.debug('
|
|
75
|
+
_izContext.logger.debug('moveRelationship _izContext: ', _izContext);
|
|
76
|
+
_izContext.logger.debug('moveRelationship requestParams: ', requestParams);
|
|
77
|
+
_izContext.logger.debug('moveRelationship callingFlowConfig: ', callingFlowConfig);
|
|
78
78
|
|
|
79
79
|
const {
|
|
80
80
|
firstObject,
|
|
@@ -140,6 +140,10 @@ export default async function <%- functionName %> (
|
|
|
140
140
|
|
|
141
141
|
const links = await findLinksByObjTypes(_izContext, [firstObject.objType, secondObject.objType], relationshipSchema.links)
|
|
142
142
|
_izContext.logger.debug("links", links)
|
|
143
|
+
|
|
144
|
+
const firstObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, firstObject.objType);
|
|
145
|
+
const secondObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, secondObject.objType);
|
|
146
|
+
|
|
143
147
|
if (!links.length) {
|
|
144
148
|
errorsFound.push(`not found link between ${JSON.stringify({ firstObject: firstObject.objType })} ${JSON.stringify({ secondObject: secondObject.objType })}`)
|
|
145
149
|
};
|
|
@@ -149,8 +153,8 @@ export default async function <%- functionName %> (
|
|
|
149
153
|
const { serviceTag: fromServiceTag, objectType: fromObjectType } = link.from.objType;
|
|
150
154
|
const { serviceTag: toServiceTag, objectType: toObjType } = link.to.objType;
|
|
151
155
|
|
|
152
|
-
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObject.objType
|
|
153
|
-
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObject.objType
|
|
156
|
+
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObjectHie.extendObjType || firstObject.objType
|
|
157
|
+
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObjectHie.extendObjType || secondObject.objType
|
|
154
158
|
|
|
155
159
|
const matchFromTo = fromServiceTag === firstServiceTag && fromObjectType === firstObjectType &&
|
|
156
160
|
toServiceTag === secondServiceTag && toObjType === secondObjectType;
|
|
@@ -178,8 +182,8 @@ export default async function <%- functionName %> (
|
|
|
178
182
|
const { serviceTag: fromServiceTag, objectType: fromObjectType } = from.objType
|
|
179
183
|
const { serviceTag: toServiceTag, objectType: toObjectType } = to.objType
|
|
180
184
|
|
|
181
|
-
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObject.objType;
|
|
182
|
-
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObject.objType;
|
|
185
|
+
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObjectHie.extendObjType || firstObject.objType;
|
|
186
|
+
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObjectHie.extendObjType || secondObject.objType;
|
|
183
187
|
|
|
184
188
|
// find exists link
|
|
185
189
|
if (
|
|
@@ -25,7 +25,7 @@ import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Mai
|
|
|
25
25
|
// validate event params in middlewareHandler before into function
|
|
26
26
|
let basicValidatorSchema = {
|
|
27
27
|
type: "object",
|
|
28
|
-
required: ["
|
|
28
|
+
required: ["relType", 'relId'],
|
|
29
29
|
properties: {
|
|
30
30
|
firstObject: {
|
|
31
31
|
type: "object",
|
|
@@ -43,7 +43,7 @@ middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
|
43
43
|
// validate event params in middlewware before into function.
|
|
44
44
|
let basicValidatorSchema = {
|
|
45
45
|
type: "object",
|
|
46
|
-
required: ["
|
|
46
|
+
required: ["relType", 'relId'],
|
|
47
47
|
properties: {
|
|
48
48
|
firstObject: {
|
|
49
49
|
type: "object",
|
|
@@ -28,7 +28,7 @@ import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Mai
|
|
|
28
28
|
// validate event params in middleware before into function.
|
|
29
29
|
let basicValidatorSchema = {
|
|
30
30
|
type: "object",
|
|
31
|
-
required: ["
|
|
31
|
+
required: ["relType", 'relId'],
|
|
32
32
|
properties: {
|
|
33
33
|
firstObject: {
|
|
34
34
|
type: "object",
|
|
@@ -33,7 +33,7 @@ middlewareHandler.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
|
33
33
|
// validate event params in middlewareHandler before into function
|
|
34
34
|
let basicValidatorSchema = {
|
|
35
35
|
type: "object",
|
|
36
|
-
required: ["
|
|
36
|
+
required: ["relType", 'relId'],
|
|
37
37
|
properties: {
|
|
38
38
|
firstObject: {
|
|
39
39
|
type: "object",
|
|
@@ -117,12 +117,15 @@ export default async function updateRelationship(
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
if (firstObject && Object.values(firstObject).length > 0) {
|
|
123
|
+
await validateIdentifiersExists(_izContext, firstObject.objType, firstObject.identifiers);
|
|
124
|
+
};
|
|
121
125
|
|
|
122
|
-
await validateIdentifiersExists(_izContext, firstObject.objType, firstObject.identifiers);
|
|
123
126
|
if (secondObject && Object.values(secondObject).length > 0) {
|
|
124
127
|
await validateIdentifiersExists(_izContext, secondObject.objType, secondObject.identifiers);
|
|
125
|
-
}
|
|
128
|
+
};
|
|
126
129
|
// finished validate object and identifiers
|
|
127
130
|
|
|
128
131
|
//(<afterValidateUpdateRel>)
|
|
@@ -136,48 +139,61 @@ export default async function updateRelationship(
|
|
|
136
139
|
let targetStorageResources = [];
|
|
137
140
|
|
|
138
141
|
if (relationshipSchema) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
relationshipSchema.links.map(async ({ from, to, storageResourceTags }) => {
|
|
142
|
-
const { serviceTag: fromServiceTag, objectType: fromObjectType } = from.objType
|
|
143
|
-
const { serviceTag: toServiceTag, objectType: toObjectType } = to.objType
|
|
142
|
+
let firstObjectHie;
|
|
143
|
+
let secondObjectHie;
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
if (firstObject && Object.values(firstObject).length > 0) {
|
|
146
|
+
firstObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, firstObject.objType);
|
|
147
|
+
};
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
(firstServiceTag === fromServiceTag && firstObjectType === fromObjectType) &&
|
|
152
|
-
(secondServiceTag === toServiceTag && secondObjectType === toObjectType)
|
|
153
|
-
) ||
|
|
154
|
-
(
|
|
155
|
-
(firstServiceTag === toServiceTag && firstObjectType === toObjectType) &&
|
|
156
|
-
(secondServiceTag === fromServiceTag && secondObjectType === fromObjectType)
|
|
157
|
-
)
|
|
158
|
-
) {
|
|
149
|
+
if (secondObject && Object.values(secondObject).length > 0) {
|
|
150
|
+
secondObjectHie = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, secondObject.objType);
|
|
151
|
+
};
|
|
159
152
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
if (firstObjectHie || firstObject || secondObjectHie || secondObject) {
|
|
154
|
+
// find targetStorageResources and validate each storageResources
|
|
155
|
+
await Promise.all(
|
|
156
|
+
relationshipSchema.links.map(async ({ from, to, storageResourceTags }) => {
|
|
157
|
+
const { serviceTag: fromServiceTag, objectType: fromObjectType } = from.objType
|
|
158
|
+
const { serviceTag: toServiceTag, objectType: toObjectType } = to.objType
|
|
159
|
+
|
|
160
|
+
const { serviceTag: firstServiceTag, objectType: firstObjectType } = firstObjectHie.extendObjType || firstObject.objType;
|
|
161
|
+
const { serviceTag: secondServiceTag, objectType: secondObjectType } = secondObjectHie.extendObjType || secondObject.objType;
|
|
162
|
+
|
|
163
|
+
// find exists link
|
|
164
|
+
if (
|
|
165
|
+
(
|
|
166
|
+
(firstServiceTag === fromServiceTag && firstObjectType === fromObjectType) &&
|
|
167
|
+
(secondServiceTag === toServiceTag && secondObjectType === toObjectType)
|
|
168
|
+
) ||
|
|
169
|
+
(
|
|
170
|
+
(firstServiceTag === toServiceTag && firstObjectType === toObjectType) &&
|
|
171
|
+
(secondServiceTag === fromServiceTag && secondObjectType === fromObjectType)
|
|
172
|
+
)
|
|
173
|
+
) {
|
|
163
174
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
errorsFound.push(`storageResourceTag:${storageResourceTag} invalid, not found graph serviceTag from graphServerTag:${usedStorageResource.graphServerTag}`)
|
|
168
|
-
}
|
|
175
|
+
// check founded storageResource of link and collect used storageResources
|
|
176
|
+
await Promise.all(storageResourceTags.map(async storageResourceTag => {
|
|
177
|
+
const usedStorageResource = relationshipSchema.storageResources[storageResourceTag];
|
|
169
178
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
graphServiceTag
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
if (usedStorageResource.storageType === consts.STORAGE_TYPES.graph) {
|
|
180
|
+
const graphServiceTag = await getGraphServiceTagWithCache(_izContext, usedStorageResource.graphServerTag);
|
|
181
|
+
if (!graphServiceTag) {
|
|
182
|
+
errorsFound.push(`storageResourceTag:${storageResourceTag} invalid, not found graph serviceTag from graphServerTag:${usedStorageResource.graphServerTag}`)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
targetStorageResources.push({
|
|
186
|
+
...usedStorageResource,
|
|
187
|
+
graphServiceTag: graphServiceTag
|
|
188
|
+
});
|
|
189
|
+
} else {
|
|
190
|
+
targetStorageResources.push(usedStorageResource);
|
|
191
|
+
}
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
})
|
|
195
|
+
);
|
|
196
|
+
}
|
|
181
197
|
//(<afterGetRelUpdateRel>)
|
|
182
198
|
//(</afterGetRelUpdateRel>)
|
|
183
199
|
_izContext.logger.debug("targetStorageResources: ", targetStorageResources);
|
|
@@ -206,179 +222,179 @@ export default async function updateRelationship(
|
|
|
206
222
|
}
|
|
207
223
|
|
|
208
224
|
|
|
209
|
-
|
|
210
|
-
|
|
225
|
+
// if found errors will stop processing
|
|
226
|
+
if (errorsFound.length) {
|
|
211
227
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
let updateCompleteMsg = {
|
|
229
|
+
firstObject: firstObject,
|
|
230
|
+
secondObject: secondObject,
|
|
231
|
+
relId: relId,
|
|
232
|
+
relType: relType,
|
|
233
|
+
relationshipDirection,
|
|
234
|
+
status: 'error',
|
|
235
|
+
errorsFound: errorsFound
|
|
236
|
+
//(<inUpdateCompleteMsgUpdateRel>)
|
|
237
|
+
//(</inUpdateCompleteMsgUpdateRel>)
|
|
238
|
+
};
|
|
223
239
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
// if have callingFlow will send to message complete
|
|
241
|
+
if (callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOW_PROPERTYNAME]) {
|
|
242
|
+
_izContext.logger.debug("HAVE CallingFlow");
|
|
227
243
|
|
|
228
|
-
|
|
229
|
-
|
|
244
|
+
updateCompleteMsg = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, updateCompleteMsg);
|
|
245
|
+
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
230
246
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
247
|
+
let messageParams = {
|
|
248
|
+
Message: JSON.stringify(updateCompleteMsg),
|
|
249
|
+
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
250
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateRelComplete),
|
|
251
|
+
};
|
|
236
252
|
|
|
237
|
-
|
|
238
|
-
|
|
253
|
+
_izContext.logger.debug("messageParams OutUpdateRelationshipComplete ::::::: ", messageParams);
|
|
254
|
+
await sns.publishAsync(_izContext, messageParams);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return updateCompleteMsg;
|
|
239
258
|
}
|
|
240
259
|
|
|
241
|
-
return updateCompleteMsg;
|
|
242
|
-
}
|
|
243
260
|
|
|
261
|
+
// before create awaitingStepId per graph storageResource
|
|
262
|
+
const linkTypeId = createLinkTypeId(_izContext, firstObject.objType, secondObject.objType, relType, relationshipDirection);
|
|
244
263
|
|
|
245
|
-
|
|
246
|
-
|
|
264
|
+
let usedGraphServiceTag = []; // collect used graph serviceName, use to check duplicate graph serviceName across graph serverTag
|
|
265
|
+
let targetGraphStorageResources = []; // collect used graph storageResources, filtered duplicate graphServiceTag from graphServerTag out
|
|
266
|
+
let awaitingStepIds = [];
|
|
247
267
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
268
|
+
for (const targetStorageResource of targetStorageResources) {
|
|
269
|
+
if (targetStorageResource.storageType === consts.STORAGE_TYPES.graph &&
|
|
270
|
+
!usedGraphServiceTag.includes(targetStorageResource.graphServiceTag)
|
|
271
|
+
) {
|
|
272
|
+
usedGraphServiceTag.push(targetStorageResource.graphServiceTag);
|
|
273
|
+
targetGraphStorageResources.push(targetStorageResource);
|
|
251
274
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
275
|
+
// awaitingStepId per graphServiceTag
|
|
276
|
+
awaitingStepIds.push(
|
|
277
|
+
asyncFlowSharedLib.createAwaitingStepId(
|
|
278
|
+
hash({ linkTypeId, relId, relationshipProperties, graphServiceTag: targetStorageResource.graphServiceTag }), // hash id
|
|
279
|
+
PREFIX.updateRel // prefix, use constant further
|
|
280
|
+
)
|
|
281
|
+
);
|
|
282
|
+
} else if (storageResource.storageType === consts.STORAGE_TYPES.dynamoDB) {
|
|
283
|
+
let tableNameFrom = `${firstObject.objType.serviceTag}_${firstObject.objType.objectType}__${relType.relationshipTag}__${secondObject.objType.serviceTag}_${secondObject.objType.objectType}`;
|
|
284
|
+
let tableNameTo = `${secondObject.objType.serviceTag}_${secondObject.objType.objectType}__${relType.relationshipTag}__${firstObject.objType.serviceTag}_${firstObject.objType.objectType}`;
|
|
285
|
+
|
|
286
|
+
let identifiersConcatFirstObject = await identifiersObject.identifiersConcatFromIdentifiers(_izContext, firstObject.objType, firstObject.identifiers);
|
|
287
|
+
let identifiersConcatSecondObject = await identifiersObject.identifiersConcatFromIdentifiers(_izContext, secondObject.objType, secondObject.identifiers);
|
|
288
|
+
const firstObjectIdentifiersConcat = `${firstObject.objType.serviceTag}_${firstObject.objType.objectType}__identifiersConcat`;
|
|
289
|
+
const secondObjectIdentifiersConcat = `${secondObject.objType.serviceTag}_${secondObject.objType.objectType}__identifiersConcat`;
|
|
290
|
+
|
|
291
|
+
await dynamodbSharedLib.updateItem(_izContext,
|
|
292
|
+
await dynamodbSharedLib.tableName(_izContext, tableNameFrom),
|
|
293
|
+
{
|
|
294
|
+
[identifiersConcatFirstObject]: firstObjectIdentifiersConcat,
|
|
295
|
+
[identifiersConcatSecondObject]: secondObjectIdentifiersConcat
|
|
296
|
+
}
|
|
297
|
+
)
|
|
258
298
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
299
|
+
await dynamodbSharedLib.updateItem(_izContext,
|
|
300
|
+
await dynamodbSharedLib.tableName(_izContext, tableNameTo),
|
|
301
|
+
{
|
|
302
|
+
[identifiersConcatSecondObject]: secondObjectIdentifiersConcat,
|
|
303
|
+
[identifiersConcatFirstObject]: firstObjectIdentifiersConcat
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (awaitingStepIds.length) {
|
|
310
|
+
// save awaiting
|
|
311
|
+
await asyncFlowSharedLib.createAwaitingMultipleSteps(
|
|
312
|
+
_izContext,
|
|
313
|
+
awaitingStepIds, // awaitingStepIds
|
|
314
|
+
asyncFlowSharedLib.createPendingStepId( // pendingStepId
|
|
315
|
+
hash({ linkTypeId, relId, relationshipProperties, correlationId: _izContext.correlationIds.get("id") }), // hash id
|
|
263
316
|
PREFIX.updateRel // prefix, use constant further
|
|
264
317
|
)
|
|
265
318
|
);
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
let
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
319
|
+
|
|
320
|
+
// prepare message body
|
|
321
|
+
let updateRelMessageBody = {
|
|
322
|
+
firstObject,
|
|
323
|
+
secondObject,
|
|
324
|
+
relId,
|
|
325
|
+
relType: relType,
|
|
326
|
+
relationshipProperties,
|
|
327
|
+
relationshipDirection
|
|
328
|
+
//(<inUpdateRelMessageBodyUpdateRel>)
|
|
329
|
+
//(</inUpdateRelMessageBodyUpdateRel>)
|
|
330
|
+
}
|
|
331
|
+
_izContext.logger.debug('updateRelMessageBody: ', updateRelMessageBody);
|
|
332
|
+
|
|
333
|
+
await Promise.all(
|
|
334
|
+
targetGraphStorageResources.map(async (storageResource) => {
|
|
335
|
+
if (storageResource.storageType === consts.STORAGE_TYPES.graph) {
|
|
336
|
+
|
|
337
|
+
updateRelMessageBody = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
338
|
+
updateRelMessageBody,
|
|
339
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
340
|
+
callingFlowConfig, // receive parent callingFlowConfig.
|
|
341
|
+
callingFlowSharedLib.createCallingFlowConfig( // callingFlow own service
|
|
342
|
+
//(<callingFlowProperties>)
|
|
343
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.updateRelComplete),
|
|
344
|
+
//(</callingFlowProperties>)
|
|
345
|
+
{
|
|
346
|
+
graphServiceTag: storageResource.graphServiceTag
|
|
347
|
+
}
|
|
348
|
+
)
|
|
349
|
+
)
|
|
350
|
+
);
|
|
351
|
+
_izContext.logger.debug("messageObject before send message:", updateRelMessageBody)
|
|
352
|
+
|
|
353
|
+
let messageToInUpdateRelationship = {
|
|
354
|
+
Message: JSON.stringify(updateRelMessageBody),
|
|
355
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inUpdateRel, storageResource.graphServiceTag),
|
|
356
|
+
};
|
|
357
|
+
_izContext.logger.debug("RequestParams before send to sqs messageToInUpdateRelationship ::::::: ", messageToInUpdateRelationship);
|
|
358
|
+
await sns.publishAsync(_izContext, messageToInUpdateRelationship);
|
|
359
|
+
}
|
|
360
|
+
})
|
|
281
361
|
)
|
|
282
362
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
363
|
+
} else if (!awaitingStepIds.length) {
|
|
364
|
+
_izContext.logger.debug("dynamoDb storageResourceTag")
|
|
365
|
+
let messageObject = {
|
|
366
|
+
firstObject: firstObject,
|
|
367
|
+
secondObject: secondObject,
|
|
368
|
+
relType: relType,
|
|
369
|
+
relationshipDirection,
|
|
370
|
+
relationshipProperties
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
if (callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOW_PROPERTYNAME]) {
|
|
374
|
+
_izContext.logger.debug("have callingFlow");
|
|
375
|
+
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
376
|
+
|
|
377
|
+
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
378
|
+
let sendMessageToOutCreateRelComplete = {
|
|
379
|
+
Message: JSON.stringify(messageObject),
|
|
380
|
+
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
381
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateRelComplete)
|
|
288
382
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
383
|
+
_izContext.logger.debug("send Message to outCreateRelationshipComplete :::", sendMessageToOutCreateRelComplete);
|
|
384
|
+
await sns.publishAsync(_izContext, sendMessageToOutCreateRelComplete);
|
|
385
|
+
}
|
|
292
386
|
|
|
293
|
-
|
|
294
|
-
// save awaiting
|
|
295
|
-
await asyncFlowSharedLib.createAwaitingMultipleSteps(
|
|
296
|
-
_izContext,
|
|
297
|
-
awaitingStepIds, // awaitingStepIds
|
|
298
|
-
asyncFlowSharedLib.createPendingStepId( // pendingStepId
|
|
299
|
-
hash({ linkTypeId, relId, relationshipProperties, correlationId: _izContext.correlationIds.get("id") }), // hash id
|
|
300
|
-
PREFIX.updateRel // prefix, use constant further
|
|
301
|
-
)
|
|
302
|
-
);
|
|
387
|
+
}
|
|
303
388
|
|
|
304
|
-
|
|
305
|
-
let updateRelMessageBody = {
|
|
389
|
+
return {
|
|
306
390
|
firstObject,
|
|
307
391
|
secondObject,
|
|
308
|
-
relId,
|
|
309
|
-
relType: relType,
|
|
310
|
-
relationshipProperties,
|
|
311
|
-
relationshipDirection
|
|
312
|
-
//(<inUpdateRelMessageBodyUpdateRel>)
|
|
313
|
-
//(</inUpdateRelMessageBodyUpdateRel>)
|
|
314
|
-
}
|
|
315
|
-
_izContext.logger.debug('updateRelMessageBody: ', updateRelMessageBody);
|
|
316
|
-
|
|
317
|
-
await Promise.all(
|
|
318
|
-
targetGraphStorageResources.map(async (storageResource) => {
|
|
319
|
-
if (storageResource.storageType === consts.STORAGE_TYPES.graph) {
|
|
320
|
-
|
|
321
|
-
updateRelMessageBody = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
322
|
-
updateRelMessageBody,
|
|
323
|
-
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
324
|
-
callingFlowConfig, // receive parent callingFlowConfig.
|
|
325
|
-
callingFlowSharedLib.createCallingFlowConfig( // callingFlow own service
|
|
326
|
-
//(<callingFlowProperties>)
|
|
327
|
-
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.updateRelComplete),
|
|
328
|
-
//(</callingFlowProperties>)
|
|
329
|
-
{
|
|
330
|
-
graphServiceTag: storageResource.graphServiceTag
|
|
331
|
-
}
|
|
332
|
-
)
|
|
333
|
-
)
|
|
334
|
-
);
|
|
335
|
-
_izContext.logger.debug("messageObject before send message:", updateRelMessageBody)
|
|
336
|
-
|
|
337
|
-
let messageToInUpdateRelationship = {
|
|
338
|
-
Message: JSON.stringify(updateRelMessageBody),
|
|
339
|
-
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inUpdateRel, storageResource.graphServiceTag),
|
|
340
|
-
};
|
|
341
|
-
_izContext.logger.debug("RequestParams before send to sqs messageToInUpdateRelationship ::::::: ", messageToInUpdateRelationship);
|
|
342
|
-
await sns.publishAsync(_izContext, messageToInUpdateRelationship);
|
|
343
|
-
}
|
|
344
|
-
})
|
|
345
|
-
)
|
|
346
|
-
|
|
347
|
-
} else if (!awaitingStepIds.length) {
|
|
348
|
-
_izContext.logger.debug("dynamoDb storageResourceTag")
|
|
349
|
-
let messageObject = {
|
|
350
|
-
firstObject: firstObject,
|
|
351
|
-
secondObject: secondObject,
|
|
392
|
+
relId: relId,
|
|
352
393
|
relType: relType,
|
|
353
394
|
relationshipDirection,
|
|
354
|
-
|
|
395
|
+
errorsFound
|
|
355
396
|
};
|
|
356
|
-
|
|
357
|
-
if (callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOW_PROPERTYNAME]) {
|
|
358
|
-
_izContext.logger.debug("have callingFlow");
|
|
359
|
-
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
360
|
-
|
|
361
|
-
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
362
|
-
let sendMessageToOutCreateRelComplete = {
|
|
363
|
-
Message: JSON.stringify(messageObject),
|
|
364
|
-
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
365
|
-
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateRelComplete)
|
|
366
|
-
}
|
|
367
|
-
_izContext.logger.debug("send Message to outCreateRelationshipComplete :::", sendMessageToOutCreateRelComplete);
|
|
368
|
-
await sns.publishAsync(_izContext, sendMessageToOutCreateRelComplete);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
397
|
}
|
|
372
|
-
|
|
373
|
-
return {
|
|
374
|
-
firstObject,
|
|
375
|
-
secondObject,
|
|
376
|
-
relId: relId,
|
|
377
|
-
relType: relType,
|
|
378
|
-
relationshipDirection,
|
|
379
|
-
errorsFound
|
|
380
|
-
};
|
|
381
|
-
|
|
382
398
|
} catch (err) {
|
|
383
399
|
_izContext.logger.error('error updateRelationship: ', err)
|
|
384
400
|
throw (err)
|
package/src/libs/Consts.js
CHANGED
|
@@ -161,7 +161,7 @@ const SAVE_FILE_NAME = {
|
|
|
161
161
|
refObjectRelationship: 'RefObjectRelationships',
|
|
162
162
|
objectSchema: 'ObjectFieldSchema',
|
|
163
163
|
roleNameConfig: 'RoleNameConfig',
|
|
164
|
-
systemTextSchema: '
|
|
164
|
+
systemTextSchema: 'SystemTextSchemas'
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
const FUNCTION_NAME = {
|