@pxp-nd/flow 1.0.42 → 1.0.45
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/dist/controllers/Action.js +10 -10
- package/dist/controllers/ActionType.js +1 -1
- package/dist/controllers/Event.js +1 -1
- package/dist/controllers/FieldMap.js +1 -1
- package/dist/controllers/Flow.d.ts +2 -1
- package/dist/controllers/Flow.js +162 -142
- package/dist/controllers/FlowInstance.js +7 -7
- package/dist/controllers/Node.js +28 -28
- package/dist/controllers/NodeInstance.js +21 -21
- package/dist/controllers/OriginName.js +1 -1
- package/dist/entity/Action.js +17 -17
- package/dist/entity/ActionType.js +13 -13
- package/dist/entity/Event.js +7 -7
- package/dist/entity/FieldMap.js +9 -9
- package/dist/entity/Flow.js +10 -10
- package/dist/entity/FlowInstance.js +13 -13
- package/dist/entity/Node.js +20 -20
- package/dist/entity/NodeConnection.js +9 -9
- package/dist/entity/NodeInstance.js +11 -11
- package/dist/entity/OriginName.js +6 -6
- package/dist/index.js +5 -1
- package/dist/subscribers/Event.js +4 -4
- package/package.json +1 -1
package/dist/controllers/Node.js
CHANGED
|
@@ -37,7 +37,7 @@ let Node = class Node extends core_1.Controller {
|
|
|
37
37
|
async getNodeData(node, dataId, manager) {
|
|
38
38
|
const { action: { originName, originKey } } = node;
|
|
39
39
|
const executeView = `select * from ${originName} where ${originKey} = ${dataId}`;
|
|
40
|
-
const resExecuteView = await core_1.__(manager.query(executeView));
|
|
40
|
+
const resExecuteView = await (0, core_1.__)(manager.query(executeView));
|
|
41
41
|
return JSON.stringify(resExecuteView[0]);
|
|
42
42
|
}
|
|
43
43
|
async add(params, manager) {
|
|
@@ -70,7 +70,7 @@ let Node = class Node extends core_1.Controller {
|
|
|
70
70
|
Object.entries(params.__metadata).forEach(([nameKey, values]) => {
|
|
71
71
|
actionConfigJson[nameKey] = `{{ ${values.name} }}`;
|
|
72
72
|
});
|
|
73
|
-
const upd = await core_1.__(manager.update(Node_1.default, params.nodeId, {
|
|
73
|
+
const upd = await (0, core_1.__)(manager.update(Node_1.default, params.nodeId, {
|
|
74
74
|
actionConfigJson: JSON.stringify(actionConfigJson),
|
|
75
75
|
}));
|
|
76
76
|
return {
|
|
@@ -83,18 +83,18 @@ let Node = class Node extends core_1.Controller {
|
|
|
83
83
|
async getParameterizedNode(params, manager) {
|
|
84
84
|
lodash_1.default.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
|
|
85
85
|
const { nodeId, flowId, substitutionsSchemaJson = {} } = params;
|
|
86
|
-
const tNodeOrigin = await core_1.__(Node_1.default.findOne({
|
|
86
|
+
const tNodeOrigin = await (0, core_1.__)(Node_1.default.findOne({
|
|
87
87
|
relations: ['action'],
|
|
88
88
|
where: {
|
|
89
89
|
flowId: flowId,
|
|
90
90
|
isInit: 'Y',
|
|
91
91
|
action: {
|
|
92
|
-
originName: typeorm_1.Not(typeorm_1.IsNull())
|
|
92
|
+
originName: (0, typeorm_1.Not)((0, typeorm_1.IsNull)())
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}));
|
|
96
|
-
const tNodeData = core_1.__(Node_1.default.findOne(nodeId));
|
|
97
|
-
const tFieldMapData = core_1.__(manager.createQueryBuilder(FieldMap_1.default, 'fm')
|
|
96
|
+
const tNodeData = (0, core_1.__)(Node_1.default.findOne(nodeId));
|
|
97
|
+
const tFieldMapData = (0, core_1.__)(manager.createQueryBuilder(FieldMap_1.default, 'fm')
|
|
98
98
|
.innerJoin(OriginName_1.default, 'on', 'on.originNameId = fm.originNameId')
|
|
99
99
|
.where("on.name = :n ", { n: tNodeOrigin.action.originName })
|
|
100
100
|
.getMany());
|
|
@@ -160,7 +160,7 @@ let Node = class Node extends core_1.Controller {
|
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
162
|
// @ts-ignore
|
|
163
|
-
const resControllerAxios = await core_1.__(axios_1.default(config));
|
|
163
|
+
const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
|
|
164
164
|
const desc = resControllerAxios.data.data[descDD];
|
|
165
165
|
return desc;
|
|
166
166
|
}
|
|
@@ -178,7 +178,7 @@ let Node = class Node extends core_1.Controller {
|
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
180
|
// @ts-ignore
|
|
181
|
-
const resControllerAxios = await core_1.__(axios_1.default(config));
|
|
181
|
+
const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
|
|
182
182
|
const desc = resControllerAxios.data.data[descColumn];
|
|
183
183
|
return desc;
|
|
184
184
|
}
|
|
@@ -186,7 +186,7 @@ let Node = class Node extends core_1.Controller {
|
|
|
186
186
|
};
|
|
187
187
|
for (const [nameKey, value] of Object.entries(mergeValues)) {
|
|
188
188
|
if (schemaJsonObject[nameKey]) {
|
|
189
|
-
const descValue = await core_1.__(findFieldInConfigForComponent(schemaJsonObject[nameKey], value));
|
|
189
|
+
const descValue = await (0, core_1.__)(findFieldInConfigForComponent(schemaJsonObject[nameKey], value));
|
|
190
190
|
schemaJsonObject[nameKey] = {
|
|
191
191
|
...schemaJsonObject[nameKey],
|
|
192
192
|
initialValue: value,
|
|
@@ -217,13 +217,13 @@ let Node = class Node extends core_1.Controller {
|
|
|
217
217
|
async executeActionJson(params, manager) {
|
|
218
218
|
const { nodeId, originName, originKey, fromValues } = params;
|
|
219
219
|
// we need to get the value from merge values with originKey
|
|
220
|
-
const getParameterizedNodeData = await core_1.__(this.getParameterizedNode({ nodeId: nodeId }, manager));
|
|
220
|
+
const getParameterizedNodeData = await (0, core_1.__)(this.getParameterizedNode({ nodeId: nodeId }, manager));
|
|
221
221
|
const { mergeValues } = getParameterizedNodeData;
|
|
222
222
|
const findOriginValue = Object.entries(mergeValues).find(([nameValue]) => fromValues === nameValue);
|
|
223
223
|
const resValueObject = Object.fromEntries([findOriginValue]);
|
|
224
224
|
const originValue = resValueObject[fromValues];
|
|
225
225
|
const executeViewString = `select * from ${originName} where ${originKey} = ${originValue}`;
|
|
226
|
-
const resExecuteView = await typeorm_1.getManager().query(executeViewString);
|
|
226
|
+
const resExecuteView = await (0, typeorm_1.getManager)().query(executeViewString);
|
|
227
227
|
/*const executeView = `select * from ${originName} where ${originKey} = ${newEvent.dataId}`;
|
|
228
228
|
const resExecuteView = await getManager().query(executeView);*/
|
|
229
229
|
return {
|
|
@@ -232,42 +232,42 @@ let Node = class Node extends core_1.Controller {
|
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
234
|
__decorate([
|
|
235
|
-
core_1.Post(),
|
|
236
|
-
core_1.DbSettings('Orm'),
|
|
237
|
-
core_1.ReadOnly(false),
|
|
238
|
-
core_1.Log(true),
|
|
235
|
+
(0, core_1.Post)(),
|
|
236
|
+
(0, core_1.DbSettings)('Orm'),
|
|
237
|
+
(0, core_1.ReadOnly)(false),
|
|
238
|
+
(0, core_1.Log)(true),
|
|
239
239
|
__metadata("design:type", Function),
|
|
240
240
|
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
241
241
|
__metadata("design:returntype", Promise)
|
|
242
242
|
], Node.prototype, "add", null);
|
|
243
243
|
__decorate([
|
|
244
|
-
core_1.Post(),
|
|
245
|
-
core_1.DbSettings('Orm'),
|
|
246
|
-
core_1.ReadOnly(false),
|
|
247
|
-
core_1.Log(true),
|
|
244
|
+
(0, core_1.Post)(),
|
|
245
|
+
(0, core_1.DbSettings)('Orm'),
|
|
246
|
+
(0, core_1.ReadOnly)(false),
|
|
247
|
+
(0, core_1.Log)(true),
|
|
248
248
|
__metadata("design:type", Function),
|
|
249
249
|
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
250
250
|
__metadata("design:returntype", Promise)
|
|
251
251
|
], Node.prototype, "AddActionConfigJson", null);
|
|
252
252
|
__decorate([
|
|
253
|
-
core_1.Post(),
|
|
254
|
-
core_1.DbSettings('Orm'),
|
|
255
|
-
core_1.ReadOnly(false),
|
|
256
|
-
core_1.Log(true),
|
|
253
|
+
(0, core_1.Post)(),
|
|
254
|
+
(0, core_1.DbSettings)('Orm'),
|
|
255
|
+
(0, core_1.ReadOnly)(false),
|
|
256
|
+
(0, core_1.Log)(true),
|
|
257
257
|
__metadata("design:type", Function),
|
|
258
258
|
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
259
259
|
__metadata("design:returntype", Promise)
|
|
260
260
|
], Node.prototype, "getParameterizedNode", null);
|
|
261
261
|
__decorate([
|
|
262
|
-
core_1.Post(),
|
|
263
|
-
core_1.DbSettings('Orm'),
|
|
264
|
-
core_1.ReadOnly(false),
|
|
265
|
-
core_1.Log(true),
|
|
262
|
+
(0, core_1.Post)(),
|
|
263
|
+
(0, core_1.DbSettings)('Orm'),
|
|
264
|
+
(0, core_1.ReadOnly)(false),
|
|
265
|
+
(0, core_1.Log)(true),
|
|
266
266
|
__metadata("design:type", Function),
|
|
267
267
|
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
268
268
|
__metadata("design:returntype", Promise)
|
|
269
269
|
], Node.prototype, "executeActionJson", null);
|
|
270
270
|
Node = __decorate([
|
|
271
|
-
core_1.Model('flow-nd/Node')
|
|
271
|
+
(0, core_1.Model)('flow-nd/Node')
|
|
272
272
|
], Node);
|
|
273
273
|
exports.default = Node;
|
|
@@ -46,7 +46,7 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
46
46
|
//todo after this we need to get the json variables and execute the view and conditions configured in the database
|
|
47
47
|
const { node, flowInstance, eventNode } = params;
|
|
48
48
|
const executeView = `select * from ${flowInstance.originName} where ${flowInstance.originKey} = ${flowInstance.dataId}`;
|
|
49
|
-
const resExecuteView = await core_1.__(typeorm_1.getManager().query(executeView));
|
|
49
|
+
const resExecuteView = await (0, core_1.__)((0, typeorm_1.getManager)().query(executeView));
|
|
50
50
|
const resultFromOrigin = resExecuteView[0];
|
|
51
51
|
let mergeJson = {};
|
|
52
52
|
const { actionConfigJson, action: { configJsonTemplate, actionType: { schemaJson }, }, } = node;
|
|
@@ -69,9 +69,9 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
69
69
|
if (node.action.actionType.isDelay === "Y") {
|
|
70
70
|
const delay = node.delay;
|
|
71
71
|
const typeDelay = node.typeDelay;
|
|
72
|
-
nodeInstance.schedule = moment_1.default().add(delay, typeDelay).toDate();
|
|
72
|
+
nodeInstance.schedule = (0, moment_1.default)().add(delay, typeDelay).toDate();
|
|
73
73
|
nodeInstance.status = "WAIT";
|
|
74
|
-
await typeorm_1.getManager().save(NodeInstance_1.default, nodeInstance);
|
|
74
|
+
await (0, typeorm_1.getManager)().save(NodeInstance_1.default, nodeInstance);
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
77
|
if (node.action.actionType.controller) {
|
|
@@ -86,16 +86,16 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
86
86
|
data: mergeJson,
|
|
87
87
|
};
|
|
88
88
|
// @ts-ignore
|
|
89
|
-
const resControllerAxios = await core_1.__(axios_1.default(config));
|
|
89
|
+
const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
|
|
90
90
|
}
|
|
91
|
-
await typeorm_1.getManager().save(NodeInstance_1.default, nodeInstance);
|
|
91
|
+
await (0, typeorm_1.getManager)().save(NodeInstance_1.default, nodeInstance);
|
|
92
92
|
// @ts-ignore
|
|
93
|
-
const nodeConnectionList = await core_1.__(NodeConnection_1.default.find({ where: { nodeIdMaster: node.nodeId } }));
|
|
93
|
+
const nodeConnectionList = await (0, core_1.__)(NodeConnection_1.default.find({ where: { nodeIdMaster: node.nodeId } }));
|
|
94
94
|
for (const nodeConnection of nodeConnectionList) {
|
|
95
95
|
const condition = lodash_1.default.template(nodeConnection.condition)(resultFromOrigin);
|
|
96
96
|
const evalCondition = eval(condition);
|
|
97
97
|
if (evalCondition) {
|
|
98
|
-
const nodeRes = await core_1.__(Node_1.default.findOne(nodeConnection.nodeIdChild));
|
|
98
|
+
const nodeRes = await (0, core_1.__)(Node_1.default.findOne(nodeConnection.nodeIdChild));
|
|
99
99
|
await this.RecursiveInstance({
|
|
100
100
|
node: nodeRes,
|
|
101
101
|
flowInstance,
|
|
@@ -115,13 +115,13 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
115
115
|
throw new core_1.PxpError(400, "Already processing pending flows");
|
|
116
116
|
}
|
|
117
117
|
flag.value = "true";
|
|
118
|
-
await typeorm_1.getManager().save(flag);
|
|
118
|
+
await (0, typeorm_1.getManager)().save(flag);
|
|
119
119
|
let nodeInstanceIdProcessing = -1;
|
|
120
120
|
try {
|
|
121
121
|
const maxNodes = await common_1.GlobalData.findOne({
|
|
122
122
|
data: "wf_max_concurrent_delay_process",
|
|
123
123
|
});
|
|
124
|
-
const nodeInstanceDelayData = await core_1.__(manager
|
|
124
|
+
const nodeInstanceDelayData = await (0, core_1.__)(manager
|
|
125
125
|
.createQueryBuilder(NodeInstance_1.default, "ni")
|
|
126
126
|
.innerJoin(Node_1.default, "n", "n.nodeId = ni.nodeId")
|
|
127
127
|
.innerJoin(Action_1.default, "a", "a.actionId = n.actionId")
|
|
@@ -133,18 +133,18 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
133
133
|
.getMany());
|
|
134
134
|
for (const nodeInstance of nodeInstanceDelayData) {
|
|
135
135
|
//update status from wait to executing
|
|
136
|
-
await core_1.__(manager.update(NodeInstance_1.default, nodeInstance.nodeInstanceId, {
|
|
136
|
+
await (0, core_1.__)(manager.update(NodeInstance_1.default, nodeInstance.nodeInstanceId, {
|
|
137
137
|
status: "EXECUTING",
|
|
138
138
|
}));
|
|
139
|
-
const nodeConnectionList = await core_1.__(NodeConnection_1.default.find({
|
|
139
|
+
const nodeConnectionList = await (0, core_1.__)(NodeConnection_1.default.find({
|
|
140
140
|
where: { nodeIdMaster: nodeInstance.nodeId },
|
|
141
141
|
}));
|
|
142
|
-
const flowInstance = await core_1.__(FlowInstance_1.default.findOne(nodeInstance.flowInstanceId));
|
|
142
|
+
const flowInstance = await (0, core_1.__)(FlowInstance_1.default.findOne(nodeInstance.flowInstanceId));
|
|
143
143
|
const resultFromOrigin = JSON.parse(flowInstance.resultFromOrigen);
|
|
144
144
|
// todo if in some transaction there is an error we need to put in some log to error and not try only some times
|
|
145
145
|
for (const nodeConnection of nodeConnectionList) {
|
|
146
146
|
// todo create transaction for own node
|
|
147
|
-
const nodeRes = await core_1.__(Node_1.default.findOne(nodeConnection.nodeIdChild));
|
|
147
|
+
const nodeRes = await (0, core_1.__)(Node_1.default.findOne(nodeConnection.nodeIdChild));
|
|
148
148
|
try {
|
|
149
149
|
await this.RecursiveInstance({
|
|
150
150
|
node: nodeRes,
|
|
@@ -152,7 +152,7 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
152
152
|
resultFromOrigin,
|
|
153
153
|
});
|
|
154
154
|
//update status from wait to executed
|
|
155
|
-
await core_1.__(manager.update(NodeInstance_1.default, nodeInstance.nodeInstanceId, {
|
|
155
|
+
await (0, core_1.__)(manager.update(NodeInstance_1.default, nodeInstance.nodeInstanceId, {
|
|
156
156
|
status: "EXECUTED",
|
|
157
157
|
}));
|
|
158
158
|
}
|
|
@@ -167,25 +167,25 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
167
167
|
}
|
|
168
168
|
catch (error) {
|
|
169
169
|
flag.value = "false";
|
|
170
|
-
await typeorm_1.getManager().save(flag);
|
|
170
|
+
await (0, typeorm_1.getManager)().save(flag);
|
|
171
171
|
throw new core_1.PxpError(400, "Error processing node: " + nodeInstanceIdProcessing);
|
|
172
172
|
}
|
|
173
173
|
flag.value = "false";
|
|
174
|
-
await typeorm_1.getManager().save(flag);
|
|
174
|
+
await (0, typeorm_1.getManager)().save(flag);
|
|
175
175
|
}
|
|
176
176
|
return { success: true };
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
__decorate([
|
|
180
|
-
core_1.Post(),
|
|
181
|
-
core_1.DbSettings("Orm"),
|
|
182
|
-
core_1.ReadOnly(false),
|
|
183
|
-
core_1.Log(true),
|
|
180
|
+
(0, core_1.Post)(),
|
|
181
|
+
(0, core_1.DbSettings)("Orm"),
|
|
182
|
+
(0, core_1.ReadOnly)(false),
|
|
183
|
+
(0, core_1.Log)(true),
|
|
184
184
|
__metadata("design:type", Function),
|
|
185
185
|
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
186
186
|
__metadata("design:returntype", Promise)
|
|
187
187
|
], NodeInstance.prototype, "ProcessDelay", null);
|
|
188
188
|
NodeInstance = __decorate([
|
|
189
|
-
core_1.Model("flow-nd/NodeInstance")
|
|
189
|
+
(0, core_1.Model)("flow-nd/NodeInstance")
|
|
190
190
|
], NodeInstance);
|
|
191
191
|
exports.default = NodeInstance;
|
|
@@ -23,6 +23,6 @@ const core_1 = require("@pxp-nd/core");
|
|
|
23
23
|
let OriginName = class OriginName extends core_1.Controller {
|
|
24
24
|
};
|
|
25
25
|
OriginName = __decorate([
|
|
26
|
-
core_1.Model('flow-nd/OriginName')
|
|
26
|
+
(0, core_1.Model)('flow-nd/OriginName')
|
|
27
27
|
], OriginName);
|
|
28
28
|
exports.default = OriginName;
|
package/dist/entity/Action.js
CHANGED
|
@@ -19,67 +19,67 @@ const common_1 = require("@pxp-nd/common");
|
|
|
19
19
|
let Action = class Action extends common_1.PxpEntity {
|
|
20
20
|
};
|
|
21
21
|
__decorate([
|
|
22
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'action_id' }),
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'action_id' }),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], Action.prototype, "actionId", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
typeorm_1.Column({ name: 'action_type_id', type: 'numeric', nullable: true }),
|
|
26
|
+
(0, typeorm_1.Column)({ name: 'action_type_id', type: 'numeric', nullable: true }),
|
|
27
27
|
__metadata("design:type", Number)
|
|
28
28
|
], Action.prototype, "actionTypeId", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 50 }),
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 50 }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], Action.prototype, "code", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
36
|
], Action.prototype, "name", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
typeorm_1.Column({ type: 'text' }),
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], Action.prototype, "description", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
typeorm_1.Column({ name: 'origin_name', type: 'varchar', length: 100 }),
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'origin_name', type: 'varchar', length: 100 }),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
44
|
], Action.prototype, "originName", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
typeorm_1.Column({ name: 'origin_key', type: 'varchar', length: 100 }),
|
|
46
|
+
(0, typeorm_1.Column)({ name: 'origin_key', type: 'varchar', length: 100 }),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], Action.prototype, "originKey", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
typeorm_1.Column({ name: 'controller_function', type: 'varchar', length: 100 }),
|
|
50
|
+
(0, typeorm_1.Column)({ name: 'controller_function', type: 'varchar', length: 100 }),
|
|
51
51
|
__metadata("design:type", String)
|
|
52
52
|
], Action.prototype, "controllerFunction", void 0);
|
|
53
53
|
__decorate([
|
|
54
|
-
typeorm_1.Column({ name: 'config_json_template', type: 'text' }),
|
|
54
|
+
(0, typeorm_1.Column)({ name: 'config_json_template', type: 'text' }),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], Action.prototype, "configJsonTemplate", void 0);
|
|
57
57
|
__decorate([
|
|
58
|
-
typeorm_1.Column({ name: 'event_config', type: 'text' }),
|
|
58
|
+
(0, typeorm_1.Column)({ name: 'event_config', type: 'text' }),
|
|
59
59
|
__metadata("design:type", String)
|
|
60
60
|
], Action.prototype, "eventConfig", void 0);
|
|
61
61
|
__decorate([
|
|
62
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
63
63
|
__metadata("design:type", String)
|
|
64
64
|
], Action.prototype, "hidden", void 0);
|
|
65
65
|
__decorate([
|
|
66
|
-
typeorm_1.Column({ name: 'schema_json', type: 'text' }),
|
|
66
|
+
(0, typeorm_1.Column)({ name: 'schema_json', type: 'text' }),
|
|
67
67
|
__metadata("design:type", String)
|
|
68
68
|
], Action.prototype, "schemaJson", void 0);
|
|
69
69
|
__decorate([
|
|
70
|
-
typeorm_1.ManyToOne(() => ActionType_1.default, actionType => actionType.actions, { eager: true }),
|
|
71
|
-
typeorm_1.JoinColumn({ name: 'action_type_id' }),
|
|
70
|
+
(0, typeorm_1.ManyToOne)(() => ActionType_1.default, actionType => actionType.actions, { eager: true }),
|
|
71
|
+
(0, typeorm_1.JoinColumn)({ name: 'action_type_id' }),
|
|
72
72
|
__metadata("design:type", ActionType_1.default)
|
|
73
73
|
], Action.prototype, "actionType", void 0);
|
|
74
74
|
__decorate([
|
|
75
|
-
typeorm_1.OneToMany(() => Node_1.default, node => node.action),
|
|
75
|
+
(0, typeorm_1.OneToMany)(() => Node_1.default, node => node.action),
|
|
76
76
|
__metadata("design:type", Array)
|
|
77
77
|
], Action.prototype, "nodes", void 0);
|
|
78
78
|
__decorate([
|
|
79
|
-
typeorm_1.OneToMany(() => Node_1.default, eventNode => eventNode.actionEvent),
|
|
79
|
+
(0, typeorm_1.OneToMany)(() => Node_1.default, eventNode => eventNode.actionEvent),
|
|
80
80
|
__metadata("design:type", Array)
|
|
81
81
|
], Action.prototype, "eventNodes", void 0);
|
|
82
82
|
Action = __decorate([
|
|
83
|
-
typeorm_1.Entity({ name: 'twf_action' })
|
|
83
|
+
(0, typeorm_1.Entity)({ name: 'twf_action' })
|
|
84
84
|
], Action);
|
|
85
85
|
exports.default = Action;
|
|
@@ -18,54 +18,54 @@ const common_1 = require("@pxp-nd/common");
|
|
|
18
18
|
let ActionType = class ActionType extends common_1.PxpEntity {
|
|
19
19
|
};
|
|
20
20
|
__decorate([
|
|
21
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'action_type_id' }),
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'action_type_id' }),
|
|
22
22
|
__metadata("design:type", Number)
|
|
23
23
|
], ActionType.prototype, "actionTypeId", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], ActionType.prototype, "name", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
typeorm_1.Column({ type: 'text', nullable: false }),
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], ActionType.prototype, "description", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
typeorm_1.Column({ name: 'schema_json', type: 'text' }),
|
|
33
|
+
(0, typeorm_1.Column)({ name: 'schema_json', type: 'text' }),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
35
|
], ActionType.prototype, "schemaJson", void 0);
|
|
36
36
|
__decorate([
|
|
37
|
-
typeorm_1.Column({ name: 'is_start', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
37
|
+
(0, typeorm_1.Column)({ name: 'is_start', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], ActionType.prototype, "isStart", void 0);
|
|
40
40
|
__decorate([
|
|
41
|
-
typeorm_1.Column({ name: 'is_delay', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
41
|
+
(0, typeorm_1.Column)({ name: 'is_delay', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
42
42
|
__metadata("design:type", String)
|
|
43
43
|
], ActionType.prototype, "isDelay", void 0);
|
|
44
44
|
__decorate([
|
|
45
|
-
typeorm_1.Column({ name: 'have_condition', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
45
|
+
(0, typeorm_1.Column)({ name: 'have_condition', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
46
46
|
__metadata("design:type", String)
|
|
47
47
|
], ActionType.prototype, "haveCondition", void 0);
|
|
48
48
|
__decorate([
|
|
49
|
-
typeorm_1.Column({ name: 'hidden', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
49
|
+
(0, typeorm_1.Column)({ name: 'hidden', type: 'varchar', nullable: false, length: 1, default: 'N' }),
|
|
50
50
|
__metadata("design:type", String)
|
|
51
51
|
], ActionType.prototype, "hidden", void 0);
|
|
52
52
|
__decorate([
|
|
53
|
-
typeorm_1.Column({ type: 'varchar', length: 100 }),
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], ActionType.prototype, "controller", void 0);
|
|
56
56
|
__decorate([
|
|
57
|
-
typeorm_1.Column({ name: 'extra_schema_json', type: 'text' }),
|
|
57
|
+
(0, typeorm_1.Column)({ name: 'extra_schema_json', type: 'text' }),
|
|
58
58
|
__metadata("design:type", String)
|
|
59
59
|
], ActionType.prototype, "extraSchemaJson", void 0);
|
|
60
60
|
__decorate([
|
|
61
|
-
typeorm_1.Column({ name: 'actions_json', type: 'text' }),
|
|
61
|
+
(0, typeorm_1.Column)({ name: 'actions_json', type: 'text' }),
|
|
62
62
|
__metadata("design:type", String)
|
|
63
63
|
], ActionType.prototype, "actionsJson", void 0);
|
|
64
64
|
__decorate([
|
|
65
|
-
typeorm_1.OneToMany(() => Action_1.default, (action) => action.actionType),
|
|
65
|
+
(0, typeorm_1.OneToMany)(() => Action_1.default, (action) => action.actionType),
|
|
66
66
|
__metadata("design:type", Array)
|
|
67
67
|
], ActionType.prototype, "actions", void 0);
|
|
68
68
|
ActionType = __decorate([
|
|
69
|
-
typeorm_1.Entity({ name: 'twf_action_type' })
|
|
69
|
+
(0, typeorm_1.Entity)({ name: 'twf_action_type' })
|
|
70
70
|
], ActionType);
|
|
71
71
|
exports.default = ActionType;
|
package/dist/entity/Event.js
CHANGED
|
@@ -18,27 +18,27 @@ const common_1 = require("@pxp-nd/common");
|
|
|
18
18
|
let Event = class Event extends common_1.PxpEntity {
|
|
19
19
|
};
|
|
20
20
|
__decorate([
|
|
21
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'event_id' }),
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'event_id' }),
|
|
22
22
|
__metadata("design:type", Number)
|
|
23
23
|
], Event.prototype, "eventId", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
typeorm_1.Column({ name: 'action_id', type: 'int', nullable: false }),
|
|
25
|
+
(0, typeorm_1.Column)({ name: 'action_id', type: 'int', nullable: false }),
|
|
26
26
|
__metadata("design:type", Number)
|
|
27
27
|
], Event.prototype, "actionId", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
typeorm_1.Column({ name: 'desc_job_name', type: 'varchar', nullable: false, length: 200 }),
|
|
29
|
+
(0, typeorm_1.Column)({ name: 'desc_job_name', type: 'varchar', nullable: false, length: 200 }),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], Event.prototype, "descJobName", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
typeorm_1.Column({ name: 'data_id', type: 'int', nullable: false }),
|
|
33
|
+
(0, typeorm_1.Column)({ name: 'data_id', type: 'int', nullable: false }),
|
|
34
34
|
__metadata("design:type", Number)
|
|
35
35
|
], Event.prototype, "dataId", void 0);
|
|
36
36
|
__decorate([
|
|
37
|
-
typeorm_1.ManyToOne(() => Action_1.default, action => action.nodes),
|
|
38
|
-
typeorm_1.JoinColumn({ name: 'action_id' }),
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => Action_1.default, action => action.nodes),
|
|
38
|
+
(0, typeorm_1.JoinColumn)({ name: 'action_id' }),
|
|
39
39
|
__metadata("design:type", Action_1.default)
|
|
40
40
|
], Event.prototype, "action", void 0);
|
|
41
41
|
Event = __decorate([
|
|
42
|
-
typeorm_1.Entity({ name: 'twf_event' })
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'twf_event' })
|
|
43
43
|
], Event);
|
|
44
44
|
exports.default = Event;
|
package/dist/entity/FieldMap.js
CHANGED
|
@@ -18,35 +18,35 @@ const common_1 = require("@pxp-nd/common");
|
|
|
18
18
|
let FieldMap = class FieldMap extends common_1.PxpEntity {
|
|
19
19
|
};
|
|
20
20
|
__decorate([
|
|
21
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'field_map_id' }),
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'field_map_id' }),
|
|
22
22
|
__metadata("design:type", Number)
|
|
23
23
|
], FieldMap.prototype, "fieldMapId", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], FieldMap.prototype, "name", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], FieldMap.prototype, "alias", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
35
|
], FieldMap.prototype, "type", void 0);
|
|
36
36
|
__decorate([
|
|
37
|
-
typeorm_1.Column({ name: 'origin_name_id', type: 'integer', nullable: false }),
|
|
37
|
+
(0, typeorm_1.Column)({ name: 'origin_name_id', type: 'integer', nullable: false }),
|
|
38
38
|
__metadata("design:type", Number)
|
|
39
39
|
], FieldMap.prototype, "originNameId", void 0);
|
|
40
40
|
__decorate([
|
|
41
|
-
typeorm_1.Column({ type: 'text', nullable: false }),
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
42
42
|
__metadata("design:type", String)
|
|
43
43
|
], FieldMap.prototype, "description", void 0);
|
|
44
44
|
__decorate([
|
|
45
|
-
typeorm_1.ManyToOne(() => OriginName_1.default, originName => originName.fields),
|
|
46
|
-
typeorm_1.JoinColumn({ name: 'origin_name_id' }),
|
|
45
|
+
(0, typeorm_1.ManyToOne)(() => OriginName_1.default, originName => originName.fields),
|
|
46
|
+
(0, typeorm_1.JoinColumn)({ name: 'origin_name_id' }),
|
|
47
47
|
__metadata("design:type", OriginName_1.default)
|
|
48
48
|
], FieldMap.prototype, "originName", void 0);
|
|
49
49
|
FieldMap = __decorate([
|
|
50
|
-
typeorm_1.Entity({ name: 'twf_field_map' })
|
|
50
|
+
(0, typeorm_1.Entity)({ name: 'twf_field_map' })
|
|
51
51
|
], FieldMap);
|
|
52
52
|
exports.default = FieldMap;
|
package/dist/entity/Flow.js
CHANGED
|
@@ -19,42 +19,42 @@ const common_1 = require("@pxp-nd/common");
|
|
|
19
19
|
let Flow = class Flow extends common_1.PxpEntity {
|
|
20
20
|
};
|
|
21
21
|
__decorate([
|
|
22
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'flow_id' }),
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'flow_id' }),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], Flow.prototype, "flowId", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
typeorm_1.Column({ name: 'vendor_id', type: 'int', nullable: false }),
|
|
26
|
+
(0, typeorm_1.Column)({ name: 'vendor_id', type: 'int', nullable: false }),
|
|
27
27
|
__metadata("design:type", Number)
|
|
28
28
|
], Flow.prototype, "vendorId", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
typeorm_1.Column({ type: 'int', nullable: false }),
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
31
31
|
__metadata("design:type", Number)
|
|
32
32
|
], Flow.prototype, "code", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
36
|
], Flow.prototype, "name", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
typeorm_1.Column({ type: 'text', nullable: false }),
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], Flow.prototype, "description", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
44
|
], Flow.prototype, "enabled", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], Flow.prototype, "type", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
typeorm_1.OneToMany(() => FlowInstance_1.default, flowInstance => flowInstance.flow),
|
|
50
|
+
(0, typeorm_1.OneToMany)(() => FlowInstance_1.default, flowInstance => flowInstance.flow),
|
|
51
51
|
__metadata("design:type", Array)
|
|
52
52
|
], Flow.prototype, "instances", void 0);
|
|
53
53
|
__decorate([
|
|
54
|
-
typeorm_1.OneToMany(() => Node_1.default, node => node.flow
|
|
54
|
+
(0, typeorm_1.OneToMany)(() => Node_1.default, node => node.flow),
|
|
55
55
|
__metadata("design:type", Array)
|
|
56
56
|
], Flow.prototype, "nodes", void 0);
|
|
57
57
|
Flow = __decorate([
|
|
58
|
-
typeorm_1.Entity({ name: 'twf_flow' })
|
|
58
|
+
(0, typeorm_1.Entity)({ name: 'twf_flow' })
|
|
59
59
|
], Flow);
|
|
60
60
|
exports.default = Flow;
|
|
@@ -19,51 +19,51 @@ const common_1 = require("@pxp-nd/common");
|
|
|
19
19
|
let FlowInstance = class FlowInstance extends common_1.PxpEntity {
|
|
20
20
|
};
|
|
21
21
|
__decorate([
|
|
22
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'flow_instance_id' }),
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'flow_instance_id' }),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], FlowInstance.prototype, "flowInstanceId", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
typeorm_1.Column({ name: 'flow_id', type: 'numeric', nullable: false }),
|
|
26
|
+
(0, typeorm_1.Column)({ name: 'flow_id', type: 'numeric', nullable: false }),
|
|
27
27
|
__metadata("design:type", Number)
|
|
28
28
|
], FlowInstance.prototype, "flowId", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
typeorm_1.Column({ name: 'data_id', type: 'numeric', nullable: false }),
|
|
30
|
+
(0, typeorm_1.Column)({ name: 'data_id', type: 'numeric', nullable: false }),
|
|
31
31
|
__metadata("design:type", Number)
|
|
32
32
|
], FlowInstance.prototype, "dataId", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
typeorm_1.Column({ name: 'action_id', type: 'numeric', nullable: false }),
|
|
34
|
+
(0, typeorm_1.Column)({ name: 'action_id', type: 'numeric', nullable: false }),
|
|
35
35
|
__metadata("design:type", Number)
|
|
36
36
|
], FlowInstance.prototype, "actionId", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
typeorm_1.Column({ name: 'origin_name', type: 'varchar', length: 100 }),
|
|
38
|
+
(0, typeorm_1.Column)({ name: 'origin_name', type: 'varchar', length: 100 }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], FlowInstance.prototype, "originName", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
typeorm_1.Column({ name: 'status', type: 'varchar', length: 100 }),
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'status', type: 'varchar', length: 100 }),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
44
|
], FlowInstance.prototype, "status", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
typeorm_1.Column({ name: 'origin_key', type: 'varchar', length: 100 }),
|
|
46
|
+
(0, typeorm_1.Column)({ name: 'origin_key', type: 'varchar', length: 100 }),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], FlowInstance.prototype, "originKey", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
typeorm_1.Column({ name: 'process_number', type: 'varchar', nullable: false, length: 50 }),
|
|
50
|
+
(0, typeorm_1.Column)({ name: 'process_number', type: 'varchar', nullable: false, length: 50 }),
|
|
51
51
|
__metadata("design:type", String)
|
|
52
52
|
], FlowInstance.prototype, "processNumber", void 0);
|
|
53
53
|
__decorate([
|
|
54
|
-
typeorm_1.Column({ name: 'result_from_origen', type: 'text', nullable: false }),
|
|
54
|
+
(0, typeorm_1.Column)({ name: 'result_from_origen', type: 'text', nullable: false }),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], FlowInstance.prototype, "resultFromOrigen", void 0);
|
|
57
57
|
__decorate([
|
|
58
|
-
typeorm_1.OneToMany(() => NodeInstance_1.default, (nodeInstance) => nodeInstance.flowInstance, { eager: true }),
|
|
58
|
+
(0, typeorm_1.OneToMany)(() => NodeInstance_1.default, (nodeInstance) => nodeInstance.flowInstance, { eager: true }),
|
|
59
59
|
__metadata("design:type", Array)
|
|
60
60
|
], FlowInstance.prototype, "nodeInstances", void 0);
|
|
61
61
|
__decorate([
|
|
62
|
-
typeorm_1.ManyToOne(() => Flow_1.default, flow => flow.instances),
|
|
63
|
-
typeorm_1.JoinColumn({ name: 'flow_id' }),
|
|
62
|
+
(0, typeorm_1.ManyToOne)(() => Flow_1.default, flow => flow.instances),
|
|
63
|
+
(0, typeorm_1.JoinColumn)({ name: 'flow_id' }),
|
|
64
64
|
__metadata("design:type", Flow_1.default)
|
|
65
65
|
], FlowInstance.prototype, "flow", void 0);
|
|
66
66
|
FlowInstance = __decorate([
|
|
67
|
-
typeorm_1.Entity({ name: 'twf_flow_instance' })
|
|
67
|
+
(0, typeorm_1.Entity)({ name: 'twf_flow_instance' })
|
|
68
68
|
], FlowInstance);
|
|
69
69
|
exports.default = FlowInstance;
|