@pxp-nd/flow 1.0.42 → 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.
@@ -33,7 +33,7 @@ const OriginName_1 = __importDefault(require("../entity/OriginName"));
33
33
  let Action = class Action extends core_1.Controller {
34
34
  async getFieldMapByAction(params, manager) {
35
35
  const { originName } = params;
36
- const fieldMapData = await core_1.__(manager.createQueryBuilder(FieldMap_1.default, 'fm')
36
+ const fieldMapData = await (0, core_1.__)(manager.createQueryBuilder(FieldMap_1.default, 'fm')
37
37
  .innerJoin(OriginName_1.default, 'on', 'on.originNameId = fm.originNameId')
38
38
  .where("on.name = :n ", { n: originName })
39
39
  .getMany());
@@ -59,24 +59,24 @@ let Action = class Action extends core_1.Controller {
59
59
  }
60
60
  };
61
61
  __decorate([
62
- core_1.Get(),
63
- core_1.DbSettings('Orm'),
64
- core_1.ReadOnly(false),
65
- core_1.Log(true),
62
+ (0, core_1.Get)(),
63
+ (0, core_1.DbSettings)('Orm'),
64
+ (0, core_1.ReadOnly)(false),
65
+ (0, core_1.Log)(true),
66
66
  __metadata("design:type", Function),
67
67
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
68
68
  __metadata("design:returntype", Promise)
69
69
  ], Action.prototype, "getFieldMapByAction", null);
70
70
  __decorate([
71
- core_1.Get(),
72
- core_1.DbSettings('Orm'),
73
- core_1.ReadOnly(true),
74
- core_1.Log(true),
71
+ (0, core_1.Get)(),
72
+ (0, core_1.DbSettings)('Orm'),
73
+ (0, core_1.ReadOnly)(true),
74
+ (0, core_1.Log)(true),
75
75
  __metadata("design:type", Function),
76
76
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
77
77
  __metadata("design:returntype", Promise)
78
78
  ], Action.prototype, "getActions", null);
79
79
  Action = __decorate([
80
- core_1.Model('flow-nd/Action')
80
+ (0, core_1.Model)('flow-nd/Action')
81
81
  ], Action);
82
82
  exports.default = Action;
@@ -23,6 +23,6 @@ const core_1 = require("@pxp-nd/core");
23
23
  let ActionType = class ActionType extends core_1.Controller {
24
24
  };
25
25
  ActionType = __decorate([
26
- core_1.Model('flow-nd/ActionType')
26
+ (0, core_1.Model)('flow-nd/ActionType')
27
27
  ], ActionType);
28
28
  exports.default = ActionType;
@@ -23,6 +23,6 @@ const core_1 = require("@pxp-nd/core");
23
23
  let Event = class Event extends core_1.Controller {
24
24
  };
25
25
  Event = __decorate([
26
- core_1.Model('flow-nd/Event')
26
+ (0, core_1.Model)('flow-nd/Event')
27
27
  ], Event);
28
28
  exports.default = Event;
@@ -23,6 +23,6 @@ const core_1 = require("@pxp-nd/core");
23
23
  let FieldMap = class FieldMap extends core_1.Controller {
24
24
  };
25
25
  FieldMap = __decorate([
26
- core_1.Model('flow-nd/FieldMap')
26
+ (0, core_1.Model)('flow-nd/FieldMap')
27
27
  ], FieldMap);
28
28
  exports.default = FieldMap;
@@ -57,7 +57,7 @@ let Flow = class Flow extends core_1.Controller {
57
57
  return restNodes;
58
58
  }
59
59
  async copyNodeConnections(nodeId, newNodeId, newFlowId, manager) {
60
- const connections = await core_1.__(NodeConnection_1.default.find({ nodeIdMaster: nodeId }));
60
+ const connections = await (0, core_1.__)(NodeConnection_1.default.find({ nodeIdMaster: nodeId }));
61
61
  for (let connection of connections) {
62
62
  const newNodeConnection = new NodeConnection_1.default();
63
63
  const { nodeConnectionId, nodeIdMaster, nodeIdChild, createdAt, modifiedAt, ...nodeConnectionToCopy } = connection;
@@ -65,7 +65,7 @@ let Flow = class Flow extends core_1.Controller {
65
65
  const dataNodeChild = await Node_1.default.findOne({ nodeId: connection.nodeIdChild });
66
66
  const { nodeId: newNodeIdChild } = await this.copyNode(dataNodeChild, newFlowId, manager);
67
67
  Object.assign(newNodeConnection, { ...nodeConnectionToCopy, nodeIdMaster: newNodeId, nodeIdChild: newNodeIdChild });
68
- const insertNewNodeConnection = await core_1.__(manager.save(NodeConnection_1.default, newNodeConnection));
68
+ const insertNewNodeConnection = await (0, core_1.__)(manager.save(NodeConnection_1.default, newNodeConnection));
69
69
  }
70
70
  }
71
71
  async copyNode(node, newFlowId, manager) {
@@ -73,20 +73,20 @@ let Flow = class Flow extends core_1.Controller {
73
73
  const newNode = new Node_1.default();
74
74
  const { nodeId, flowId, createdAt, modifiedAt, actionConfigJson, ...nodeToCopy } = node;
75
75
  Object.assign(newNode, { ...nodeToCopy, flowId: newFlowId });
76
- const insertNewNode = await core_1.__(manager.save(Node_1.default, newNode));
76
+ const insertNewNode = await (0, core_1.__)(manager.save(Node_1.default, newNode));
77
77
  // insert connection
78
78
  await this.copyNodeConnections(node.nodeId, insertNewNode.nodeId, newFlowId, manager);
79
79
  return { nodeId: insertNewNode.nodeId };
80
80
  }
81
81
  async createFlowFromFlow(params, manager) {
82
82
  // we need clone the flow selected
83
- const dataFlow = await core_1.__(Flow_1.default.findOne(params.flowId));
83
+ const dataFlow = await (0, core_1.__)(Flow_1.default.findOne(params.flowId));
84
84
  const { flowId, createdAt, modifiedAt, nodes, ...flowToCopy } = dataFlow;
85
85
  const newFlow = new Flow_1.default();
86
86
  Object.assign(newFlow, flowToCopy);
87
87
  newFlow.name = params.name;
88
88
  newFlow.description = params.description;
89
- const insertNewFlow = await core_1.__(manager.save(Flow_1.default, newFlow));
89
+ const insertNewFlow = await (0, core_1.__)(manager.save(Flow_1.default, newFlow));
90
90
  // create the nodes
91
91
  // get the first node "the trigger node"
92
92
  const dataNode = await Node_1.default.findOne({ where: { flowId: params.flowId }, order: { nodeId: "ASC" } });
@@ -94,11 +94,11 @@ let Flow = class Flow extends core_1.Controller {
94
94
  return { flowId: insertNewFlow.flowId };
95
95
  }
96
96
  async deleteFlow(params, manager) {
97
- let dataFlow = await core_1.__(Flow_1.default.findOne(params.flowId));
97
+ let dataFlow = await (0, core_1.__)(Flow_1.default.findOne(params.flowId));
98
98
  if (dataFlow) {
99
99
  dataFlow.isActive = 0;
100
100
  dataFlow.enabled = 'N';
101
- const updFlow = await core_1.__(manager.save(dataFlow));
101
+ const updFlow = await (0, core_1.__)(manager.save(dataFlow));
102
102
  if (updFlow) {
103
103
  let flowInstance = `UPDATE twf_flow_instance SET
104
104
  is_active = 'N' WHERE flow_id = ${updFlow.flowId}`;
@@ -109,7 +109,7 @@ let Flow = class Flow extends core_1.Controller {
109
109
  const nodesToInact = await manager.find(Node_1.default, { flowId: updFlow.flowId });
110
110
  const originalNodeIds = nodesToInact.map((node) => node.nodeId);
111
111
  const connectionsToInact = await manager.find(NodeConnection_1.default, {
112
- where: { nodeIdChild: typeorm_1.In(originalNodeIds) } // Suponiendo que originalNodeIds contiene los IDs de los nodos originales que deseas duplicar
112
+ where: { nodeIdChild: (0, typeorm_1.In)(originalNodeIds) } // Suponiendo que originalNodeIds contiene los IDs de los nodos originales que deseas duplicar
113
113
  });
114
114
  const originalNodeCIds = connectionsToInact.map((node) => node.nodeConnectionId);
115
115
  let flowNodeC = `UPDATE twf_node_connection SET
@@ -126,10 +126,10 @@ let Flow = class Flow extends core_1.Controller {
126
126
  }
127
127
  }
128
128
  async saveFlowName(params, manager) {
129
- let dataFlow = await core_1.__(Flow_1.default.findOne(params.flowId));
129
+ let dataFlow = await (0, core_1.__)(Flow_1.default.findOne(params.flowId));
130
130
  if (dataFlow) {
131
131
  dataFlow.name = params.name;
132
- const updFlow = await core_1.__(manager.save(dataFlow));
132
+ const updFlow = await (0, core_1.__)(manager.save(dataFlow));
133
133
  return { success: true };
134
134
  }
135
135
  else {
@@ -157,7 +157,7 @@ let Flow = class Flow extends core_1.Controller {
157
157
  const savedNodes = await manager.save(duplicatedNodes);
158
158
  const newNodeIds = savedNodes.map((node) => node.nodeId);
159
159
  const connectionsToDuplicate = await manager.find(NodeConnection_1.default, {
160
- where: { nodeIdChild: typeorm_1.In(originalNodeIds) }
160
+ where: { nodeIdChild: (0, typeorm_1.In)(originalNodeIds) }
161
161
  });
162
162
  const duplicatedConnections = newNodeIds.map((nodeId, index) => {
163
163
  const duplicatedConnection = manager.create(NodeConnection_1.default, {
@@ -176,7 +176,7 @@ let Flow = class Flow extends core_1.Controller {
176
176
  }
177
177
  }
178
178
  async getFlowRender(params) {
179
- let actions = await typeorm_1.getManager()
179
+ let actions = await (0, typeorm_1.getManager)()
180
180
  .createQueryBuilder(Action_1.default, "a")
181
181
  .select([
182
182
  "a.actionId",
@@ -188,16 +188,16 @@ let Flow = class Flow extends core_1.Controller {
188
188
  .innerJoin("a.actionType", "at")
189
189
  .where(`a.isActive = 1 and a.hidden = 'N'`)
190
190
  .getMany();
191
- const connections = await typeorm_1.getManager()
191
+ const connections = await (0, typeorm_1.getManager)()
192
192
  .createQueryBuilder(NodeConnection_1.default, "nc")
193
193
  .select([
194
194
  "nc.nodeIdMaster",
195
195
  "nc.nodeIdChild",
196
196
  ])
197
197
  .innerJoin("nc.childNode", "cn")
198
- .where(`cn.flowId = :flowId`, { flowId: params.flowId })
198
+ .where(`cn.isActive = 1 and cn.flowId = :flowId`, { flowId: params.flowId })
199
199
  .getMany();
200
- const nodes = await typeorm_1.getManager()
200
+ const nodes = await (0, typeorm_1.getManager)()
201
201
  .createQueryBuilder(Node_1.default, "n")
202
202
  .select([
203
203
  "n.nodeId",
@@ -207,7 +207,7 @@ let Flow = class Flow extends core_1.Controller {
207
207
  "a.description",
208
208
  ])
209
209
  .innerJoin("n.action", "a")
210
- .where(`n.flowId = :flowId`, { flowId: params.flowId })
210
+ .where(`n.isActive = 1 and n.flowId = :flowId`, { flowId: params.flowId })
211
211
  .getMany();
212
212
  let sortedNodes = this.sortNodesByConnections(nodes, connections);
213
213
  actions.forEach((item) => {
@@ -302,7 +302,7 @@ let Flow = class Flow extends core_1.Controller {
302
302
  //console.log("hay para eliminar---->", connectionsToDel);
303
303
  const originalNodeCIds = connectionsToDel.map((node) => node.nodeConnectionId);
304
304
  //console.log("eliminando: ", originalNodeCIds);
305
- let flowNodeC = await typeorm_1.getManager().query(`DELETE
305
+ let flowNodeC = await (0, typeorm_1.getManager)().query(`DELETE
306
306
  from twf_node_connection
307
307
  WHERE node_connection_id = ${originalNodeCIds}`);
308
308
  }
@@ -311,7 +311,7 @@ let Flow = class Flow extends core_1.Controller {
311
311
  }
312
312
  }
313
313
  //If there are some nodes in node_connections after delete all records sent, to inactive node
314
- let connectNoDel = await typeorm_1.getManager().query(`SELECT n.node_id
314
+ let connectNoDel = await (0, typeorm_1.getManager)().query(`SELECT n.node_id
315
315
  from twf_node_connection nd
316
316
  inner join twf_node n on n.node_id = nd.node_id_child
317
317
  WHERE n.flow_id= ${flowId}`);
@@ -363,69 +363,69 @@ let Flow = class Flow extends core_1.Controller {
363
363
  }
364
364
  };
365
365
  __decorate([
366
- core_1.Get(),
367
- core_1.DbSettings('Orm'),
368
- core_1.ReadOnly(true),
369
- core_1.Log(true),
366
+ (0, core_1.Get)(),
367
+ (0, core_1.DbSettings)('Orm'),
368
+ (0, core_1.ReadOnly)(true),
369
+ (0, core_1.Log)(true),
370
370
  __metadata("design:type", Function),
371
371
  __metadata("design:paramtypes", [Object]),
372
372
  __metadata("design:returntype", Promise)
373
373
  ], Flow.prototype, "get", null);
374
374
  __decorate([
375
- core_1.Post(),
376
- core_1.DbSettings('Orm'),
377
- core_1.ReadOnly(false),
378
- core_1.Log(true),
375
+ (0, core_1.Post)(),
376
+ (0, core_1.DbSettings)('Orm'),
377
+ (0, core_1.ReadOnly)(false),
378
+ (0, core_1.Log)(true),
379
379
  __metadata("design:type", Function),
380
380
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
381
381
  __metadata("design:returntype", Promise)
382
382
  ], Flow.prototype, "createFlowFromFlow", null);
383
383
  __decorate([
384
- core_1.Post(),
385
- core_1.DbSettings('Orm'),
386
- core_1.ReadOnly(false),
387
- core_1.Log(true),
384
+ (0, core_1.Post)(),
385
+ (0, core_1.DbSettings)('Orm'),
386
+ (0, core_1.ReadOnly)(false),
387
+ (0, core_1.Log)(true),
388
388
  __metadata("design:type", Function),
389
389
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
390
390
  __metadata("design:returntype", Promise)
391
391
  ], Flow.prototype, "deleteFlow", null);
392
392
  __decorate([
393
- core_1.Post(),
394
- core_1.DbSettings('Orm'),
395
- core_1.ReadOnly(false),
396
- core_1.Log(true),
393
+ (0, core_1.Post)(),
394
+ (0, core_1.DbSettings)('Orm'),
395
+ (0, core_1.ReadOnly)(false),
396
+ (0, core_1.Log)(true),
397
397
  __metadata("design:type", Function),
398
398
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
399
399
  __metadata("design:returntype", Promise)
400
400
  ], Flow.prototype, "saveFlowName", null);
401
401
  __decorate([
402
- core_1.Post(),
403
- core_1.DbSettings('Orm'),
404
- core_1.ReadOnly(false),
405
- core_1.Log(true),
402
+ (0, core_1.Post)(),
403
+ (0, core_1.DbSettings)('Orm'),
404
+ (0, core_1.ReadOnly)(false),
405
+ (0, core_1.Log)(true),
406
406
  __metadata("design:type", Function),
407
407
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
408
408
  __metadata("design:returntype", Promise)
409
409
  ], Flow.prototype, "duplicateFlow", null);
410
410
  __decorate([
411
- core_1.Get(),
412
- core_1.DbSettings('Orm'),
413
- core_1.ReadOnly(true),
414
- core_1.Log(true),
411
+ (0, core_1.Get)(),
412
+ (0, core_1.DbSettings)('Orm'),
413
+ (0, core_1.ReadOnly)(true),
414
+ (0, core_1.Log)(true),
415
415
  __metadata("design:type", Function),
416
416
  __metadata("design:paramtypes", [Object]),
417
417
  __metadata("design:returntype", Promise)
418
418
  ], Flow.prototype, "getFlowRender", null);
419
419
  __decorate([
420
- core_1.Post(),
421
- core_1.DbSettings('Orm'),
422
- core_1.ReadOnly(false),
423
- core_1.Log(true),
420
+ (0, core_1.Post)(),
421
+ (0, core_1.DbSettings)('Orm'),
422
+ (0, core_1.ReadOnly)(false),
423
+ (0, core_1.Log)(true),
424
424
  __metadata("design:type", Function),
425
425
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
426
426
  __metadata("design:returntype", Promise)
427
427
  ], Flow.prototype, "saveFlow", null);
428
428
  Flow = __decorate([
429
- core_1.Model('flow-nd/Flow')
429
+ (0, core_1.Model)('flow-nd/Flow')
430
430
  ], Flow);
431
431
  exports.default = Flow;
@@ -42,7 +42,7 @@ class FlowInstance extends core_1.Controller {
42
42
  }
43
43
  flag.value = 'true';
44
44
  let flowInstanceIdProcessing = -1;
45
- await typeorm_1.getManager().save(flag);
45
+ await (0, typeorm_1.getManager)().save(flag);
46
46
  try {
47
47
  const maxFlows = await common_1.GlobalData.findOne({ data: 'wf_max_concurrent_flows_process' });
48
48
  const flowInstances = await FlowInstance_1.default.find({ take: (maxFlows && maxFlows.value), where: [{ status: 'pending' }], order: { flowInstanceId: "ASC" } });
@@ -63,20 +63,20 @@ class FlowInstance extends core_1.Controller {
63
63
  }
64
64
  catch (error) {
65
65
  flag.value = 'false';
66
- await typeorm_1.getManager().save(flag);
66
+ await (0, typeorm_1.getManager)().save(flag);
67
67
  throw new core_1.PxpError(400, 'Error processing flow: ' + flowInstanceIdProcessing);
68
68
  }
69
69
  flag.value = 'false';
70
- await typeorm_1.getManager().save(flag);
70
+ await (0, typeorm_1.getManager)().save(flag);
71
71
  }
72
72
  return { success: true };
73
73
  }
74
74
  }
75
75
  __decorate([
76
- core_1.Post(),
77
- core_1.DbSettings('Orm'),
78
- core_1.ReadOnly(false),
79
- core_1.Log(true),
76
+ (0, core_1.Post)(),
77
+ (0, core_1.DbSettings)('Orm'),
78
+ (0, core_1.ReadOnly)(false),
79
+ (0, core_1.Log)(true),
80
80
  __metadata("design:type", Function),
81
81
  __metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
82
82
  __metadata("design:returntype", Promise)
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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, { eager: true }),
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;
@@ -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;
@@ -19,40 +19,40 @@ const common_1 = require("@pxp-nd/common");
19
19
  let NodeInstance = class NodeInstance extends common_1.PxpEntity {
20
20
  };
21
21
  __decorate([
22
- typeorm_1.PrimaryGeneratedColumn({ name: 'node_instance_id' }),
22
+ (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'node_instance_id' }),
23
23
  __metadata("design:type", Number)
24
24
  ], NodeInstance.prototype, "nodeInstanceId", void 0);
25
25
  __decorate([
26
- typeorm_1.Column({ name: 'node_id', type: 'numeric', nullable: true }),
26
+ (0, typeorm_1.Column)({ name: 'node_id', type: 'numeric', nullable: true }),
27
27
  __metadata("design:type", Number)
28
28
  ], NodeInstance.prototype, "nodeId", void 0);
29
29
  __decorate([
30
- typeorm_1.Column({ name: 'flow_instance_id', type: 'numeric', nullable: true }),
30
+ (0, typeorm_1.Column)({ name: 'flow_instance_id', type: 'numeric', nullable: true }),
31
31
  __metadata("design:type", Number)
32
32
  ], NodeInstance.prototype, "flowInstanceId", void 0);
33
33
  __decorate([
34
- typeorm_1.Column({ name: 'run_time', type: 'timestamp', nullable: false }),
34
+ (0, typeorm_1.Column)({ name: 'run_time', type: 'timestamp', nullable: false }),
35
35
  __metadata("design:type", Date)
36
36
  ], NodeInstance.prototype, "runTime", void 0);
37
37
  __decorate([
38
- typeorm_1.Column({ name: 'schedule', type: 'timestamp', nullable: false }),
38
+ (0, typeorm_1.Column)({ name: 'schedule', type: 'timestamp', nullable: false }),
39
39
  __metadata("design:type", Date)
40
40
  ], NodeInstance.prototype, "schedule", void 0);
41
41
  __decorate([
42
- typeorm_1.Column({ name: 'status', type: 'varchar', nullable: false, length: 50 }),
42
+ (0, typeorm_1.Column)({ name: 'status', type: 'varchar', nullable: false, length: 50 }),
43
43
  __metadata("design:type", String)
44
44
  ], NodeInstance.prototype, "status", void 0);
45
45
  __decorate([
46
- typeorm_1.ManyToOne(() => FlowInstance_1.default, flowInstance => flowInstance.nodeInstances),
47
- typeorm_1.JoinColumn({ name: 'flow_instance_id' }),
46
+ (0, typeorm_1.ManyToOne)(() => FlowInstance_1.default, flowInstance => flowInstance.nodeInstances),
47
+ (0, typeorm_1.JoinColumn)({ name: 'flow_instance_id' }),
48
48
  __metadata("design:type", FlowInstance_1.default)
49
49
  ], NodeInstance.prototype, "flowInstance", void 0);
50
50
  __decorate([
51
- typeorm_1.ManyToOne(() => Node_1.default, node => node.nodeInstances, { eager: true }),
52
- typeorm_1.JoinColumn({ name: 'node_id' }),
51
+ (0, typeorm_1.ManyToOne)(() => Node_1.default, node => node.nodeInstances, { eager: true }),
52
+ (0, typeorm_1.JoinColumn)({ name: 'node_id' }),
53
53
  __metadata("design:type", Node_1.default)
54
54
  ], NodeInstance.prototype, "node", void 0);
55
55
  NodeInstance = __decorate([
56
- typeorm_1.Entity({ name: 'twf_node_instance' })
56
+ (0, typeorm_1.Entity)({ name: 'twf_node_instance' })
57
57
  ], NodeInstance);
58
58
  exports.default = NodeInstance;
@@ -18,26 +18,26 @@ const common_1 = require("@pxp-nd/common");
18
18
  let OriginName = class OriginName extends common_1.PxpEntity {
19
19
  };
20
20
  __decorate([
21
- typeorm_1.PrimaryGeneratedColumn({ name: 'origin_name_id' }),
21
+ (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'origin_name_id' }),
22
22
  __metadata("design:type", Number)
23
23
  ], OriginName.prototype, "originNameId", 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
  ], OriginName.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
  ], OriginName.prototype, "description", void 0);
32
32
  __decorate([
33
- typeorm_1.Column({ type: 'varchar', nullable: false, length: 150 }),
33
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 150 }),
34
34
  __metadata("design:type", String)
35
35
  ], OriginName.prototype, "originKey", void 0);
36
36
  __decorate([
37
- typeorm_1.OneToMany(() => FieldMap_1.default, (fieldMap) => fieldMap.originName),
37
+ (0, typeorm_1.OneToMany)(() => FieldMap_1.default, (fieldMap) => fieldMap.originName),
38
38
  __metadata("design:type", Array)
39
39
  ], OriginName.prototype, "fields", void 0);
40
40
  OriginName = __decorate([
41
- typeorm_1.Entity({ name: 'twf_origin_name' })
41
+ (0, typeorm_1.Entity)({ name: 'twf_origin_name' })
42
42
  ], OriginName);
43
43
  exports.default = OriginName;
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -38,13 +38,13 @@ let Event = class Event {
38
38
  async afterInsert(event) {
39
39
  //todo investigate replace variables into condition
40
40
  const newEvent = event.entity;
41
- const node = await core_1.__(Node_1.default.find({ where: { actionId: newEvent.actionId, isActive: 1 } }));
41
+ const node = await (0, core_1.__)(Node_1.default.find({ where: { actionId: newEvent.actionId, isActive: 1 } }));
42
42
  for (const n of node) {
43
43
  //get data of view
44
44
  const { action: { originName, originKey }, } = n;
45
45
  const executeView = `select * from ${originName} where ${originKey} = ${newEvent.dataId}`;
46
- const resExecuteView = await typeorm_1.getManager().query(executeView);
47
- const flow = await core_1.__(Flow_1.default.findOne({ where: { flowId: n.flowId, isActive: 1 } }));
46
+ const resExecuteView = await (0, typeorm_1.getManager)().query(executeView);
47
+ const flow = await (0, core_1.__)(Flow_1.default.findOne({ where: { flowId: n.flowId, isActive: 1 } }));
48
48
  if (flow && flow.vendorId == resExecuteView[0].vendor_id &&
49
49
  (await this.checkConditions(resExecuteView[0], n.flowId, newEvent.actionId))) {
50
50
  //now check all conditions
@@ -79,6 +79,6 @@ let Event = class Event {
79
79
  }
80
80
  };
81
81
  Event = __decorate([
82
- typeorm_1.EventSubscriber()
82
+ (0, typeorm_1.EventSubscriber)()
83
83
  ], Event);
84
84
  exports.Event = Event;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pxp-nd/flow",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "Workflow module for pxp-nd framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",