@pxp-nd/flow 1.0.41 → 1.0.43
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.js +95 -86
- 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
|
@@ -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;
|
package/dist/entity/Node.js
CHANGED
|
@@ -21,73 +21,73 @@ const common_1 = require("@pxp-nd/common");
|
|
|
21
21
|
let Node = class Node extends common_1.PxpEntity {
|
|
22
22
|
};
|
|
23
23
|
__decorate([
|
|
24
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'node_id' }),
|
|
24
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'node_id' }),
|
|
25
25
|
__metadata("design:type", Number)
|
|
26
26
|
], Node.prototype, "nodeId", void 0);
|
|
27
27
|
__decorate([
|
|
28
|
-
typeorm_1.Column({ name: 'flow_id', type: 'numeric', nullable: false }),
|
|
28
|
+
(0, typeorm_1.Column)({ name: 'flow_id', type: 'numeric', nullable: false }),
|
|
29
29
|
__metadata("design:type", Number)
|
|
30
30
|
], Node.prototype, "flowId", void 0);
|
|
31
31
|
__decorate([
|
|
32
|
-
typeorm_1.Column({ name: 'action_id', type: 'numeric', nullable: true }),
|
|
32
|
+
(0, typeorm_1.Column)({ name: 'action_id', type: 'numeric', nullable: true }),
|
|
33
33
|
__metadata("design:type", Number)
|
|
34
34
|
], Node.prototype, "actionId", void 0);
|
|
35
35
|
__decorate([
|
|
36
|
-
typeorm_1.Column({ name: 'is_init', type: 'varchar', nullable: false, length: 1 }),
|
|
36
|
+
(0, typeorm_1.Column)({ name: 'is_init', type: 'varchar', nullable: false, length: 1 }),
|
|
37
37
|
__metadata("design:type", String)
|
|
38
38
|
], Node.prototype, "isInit", void 0);
|
|
39
39
|
__decorate([
|
|
40
|
-
typeorm_1.Column({ name: 'status_event', type: 'varchar', length: 50 }),
|
|
40
|
+
(0, typeorm_1.Column)({ name: 'status_event', type: 'varchar', length: 50 }),
|
|
41
41
|
__metadata("design:type", String)
|
|
42
42
|
], Node.prototype, "statusEvent", void 0);
|
|
43
43
|
__decorate([
|
|
44
|
-
typeorm_1.Column({ name: 'is_end', type: 'varchar', nullable: false, length: 1 }),
|
|
44
|
+
(0, typeorm_1.Column)({ name: 'is_end', type: 'varchar', nullable: false, length: 1 }),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], Node.prototype, "isEnd", void 0);
|
|
47
47
|
__decorate([
|
|
48
|
-
typeorm_1.Column({ name: 'action_config_json', type: 'text' }),
|
|
48
|
+
(0, typeorm_1.Column)({ name: 'action_config_json', type: 'text' }),
|
|
49
49
|
__metadata("design:type", String)
|
|
50
50
|
], Node.prototype, "actionConfigJson", void 0);
|
|
51
51
|
__decorate([
|
|
52
|
-
typeorm_1.Column({ name: 'approval_config', type: 'text' }),
|
|
52
|
+
(0, typeorm_1.Column)({ name: 'approval_config', type: 'text' }),
|
|
53
53
|
__metadata("design:type", String)
|
|
54
54
|
], Node.prototype, "approvalConfig", void 0);
|
|
55
55
|
__decorate([
|
|
56
|
-
typeorm_1.Column({ name: 'type_delay', type: 'varchar' }),
|
|
56
|
+
(0, typeorm_1.Column)({ name: 'type_delay', type: 'varchar' }),
|
|
57
57
|
__metadata("design:type", String)
|
|
58
58
|
], Node.prototype, "typeDelay", void 0);
|
|
59
59
|
__decorate([
|
|
60
|
-
typeorm_1.Column({ name: 'delay', type: 'numeric' }),
|
|
60
|
+
(0, typeorm_1.Column)({ name: 'delay', type: 'numeric' }),
|
|
61
61
|
__metadata("design:type", Number)
|
|
62
62
|
], Node.prototype, "delay", void 0);
|
|
63
63
|
__decorate([
|
|
64
|
-
typeorm_1.ManyToOne(() => Flow_1.default, flow => flow.nodes),
|
|
65
|
-
typeorm_1.JoinColumn({ name: 'flow_id' }),
|
|
64
|
+
(0, typeorm_1.ManyToOne)(() => Flow_1.default, flow => flow.nodes),
|
|
65
|
+
(0, typeorm_1.JoinColumn)({ name: 'flow_id' }),
|
|
66
66
|
__metadata("design:type", Flow_1.default)
|
|
67
67
|
], Node.prototype, "flow", void 0);
|
|
68
68
|
__decorate([
|
|
69
|
-
typeorm_1.ManyToOne(() => Action_1.default, action => action.nodes, { eager: true }),
|
|
70
|
-
typeorm_1.JoinColumn({ name: 'action_id' }),
|
|
69
|
+
(0, typeorm_1.ManyToOne)(() => Action_1.default, action => action.nodes, { eager: true }),
|
|
70
|
+
(0, typeorm_1.JoinColumn)({ name: 'action_id' }),
|
|
71
71
|
__metadata("design:type", Action_1.default)
|
|
72
72
|
], Node.prototype, "action", void 0);
|
|
73
73
|
__decorate([
|
|
74
|
-
typeorm_1.ManyToOne(() => Action_1.default, actionEvent => actionEvent.eventNodes),
|
|
75
|
-
typeorm_1.JoinColumn({ name: 'action_id_listening_event' }),
|
|
74
|
+
(0, typeorm_1.ManyToOne)(() => Action_1.default, actionEvent => actionEvent.eventNodes),
|
|
75
|
+
(0, typeorm_1.JoinColumn)({ name: 'action_id_listening_event' }),
|
|
76
76
|
__metadata("design:type", Action_1.default)
|
|
77
77
|
], Node.prototype, "actionEvent", void 0);
|
|
78
78
|
__decorate([
|
|
79
|
-
typeorm_1.OneToMany(() => NodeConnection_1.default, nodeConnection => nodeConnection.masterNode),
|
|
79
|
+
(0, typeorm_1.OneToMany)(() => NodeConnection_1.default, nodeConnection => nodeConnection.masterNode),
|
|
80
80
|
__metadata("design:type", Array)
|
|
81
81
|
], Node.prototype, "masterConnections", void 0);
|
|
82
82
|
__decorate([
|
|
83
|
-
typeorm_1.OneToMany(() => NodeConnection_1.default, nodeConnection => nodeConnection.childNode),
|
|
83
|
+
(0, typeorm_1.OneToMany)(() => NodeConnection_1.default, nodeConnection => nodeConnection.childNode),
|
|
84
84
|
__metadata("design:type", Array)
|
|
85
85
|
], Node.prototype, "childConnections", void 0);
|
|
86
86
|
__decorate([
|
|
87
|
-
typeorm_1.OneToMany(() => NodeInstance_1.default, (nodeInstance) => nodeInstance.node),
|
|
87
|
+
(0, typeorm_1.OneToMany)(() => NodeInstance_1.default, (nodeInstance) => nodeInstance.node),
|
|
88
88
|
__metadata("design:type", Array)
|
|
89
89
|
], Node.prototype, "nodeInstances", void 0);
|
|
90
90
|
Node = __decorate([
|
|
91
|
-
typeorm_1.Entity({ name: 'twf_node' })
|
|
91
|
+
(0, typeorm_1.Entity)({ name: 'twf_node' })
|
|
92
92
|
], Node);
|
|
93
93
|
exports.default = Node;
|
|
@@ -18,32 +18,32 @@ const common_1 = require("@pxp-nd/common");
|
|
|
18
18
|
let NodeConnection = class NodeConnection extends common_1.PxpEntity {
|
|
19
19
|
};
|
|
20
20
|
__decorate([
|
|
21
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'node_connection_id' }),
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: 'node_connection_id' }),
|
|
22
22
|
__metadata("design:type", Number)
|
|
23
23
|
], NodeConnection.prototype, "nodeConnectionId", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 200 }),
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 200 }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], NodeConnection.prototype, "condition", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
typeorm_1.Column({ name: 'node_id_master', type: 'int', nullable: false }),
|
|
29
|
+
(0, typeorm_1.Column)({ name: 'node_id_master', type: 'int', nullable: false }),
|
|
30
30
|
__metadata("design:type", Number)
|
|
31
31
|
], NodeConnection.prototype, "nodeIdMaster", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
typeorm_1.Column({ name: 'node_id_child', type: 'int', nullable: false }),
|
|
33
|
+
(0, typeorm_1.Column)({ name: 'node_id_child', type: 'int', nullable: false }),
|
|
34
34
|
__metadata("design:type", Number)
|
|
35
35
|
], NodeConnection.prototype, "nodeIdChild", void 0);
|
|
36
36
|
__decorate([
|
|
37
|
-
typeorm_1.ManyToOne(() => Node_1.default, node => node.masterConnections),
|
|
38
|
-
typeorm_1.JoinColumn({ name: 'node_id_master' }),
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => Node_1.default, node => node.masterConnections),
|
|
38
|
+
(0, typeorm_1.JoinColumn)({ name: 'node_id_master' }),
|
|
39
39
|
__metadata("design:type", Node_1.default)
|
|
40
40
|
], NodeConnection.prototype, "masterNode", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
typeorm_1.ManyToOne(() => Node_1.default, node => node.childConnections),
|
|
43
|
-
typeorm_1.JoinColumn({ name: 'node_id_child' }),
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => Node_1.default, node => node.childConnections),
|
|
43
|
+
(0, typeorm_1.JoinColumn)({ name: 'node_id_child' }),
|
|
44
44
|
__metadata("design:type", Node_1.default)
|
|
45
45
|
], NodeConnection.prototype, "childNode", void 0);
|
|
46
46
|
NodeConnection = __decorate([
|
|
47
|
-
typeorm_1.Entity({ name: 'twf_node_connection' })
|
|
47
|
+
(0, typeorm_1.Entity)({ name: 'twf_node_connection' })
|
|
48
48
|
], NodeConnection);
|
|
49
49
|
exports.default = NodeConnection;
|