@pxp-nd/flow 1.1.25 → 1.1.27

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.
@@ -11,6 +11,8 @@
11
11
  *
12
12
  * Created at : 2021-07-08 12:55:38
13
13
  * Last modified :
14
+ * ISSUE DATE NAME DESCRIPTION
15
+ * 9141239986 16-May-2025 Mercedes Zambrana Save flagName and FlagValue
14
16
  */
15
17
  import { EntityManager } from 'typeorm';
16
18
  import { Controller } from '@pxp-nd/core';
@@ -12,6 +12,8 @@
12
12
  *
13
13
  * Created at : 2021-07-08 12:55:38
14
14
  * Last modified :
15
+ * ISSUE DATE NAME DESCRIPTION
16
+ * 9141239986 16-May-2025 Mercedes Zambrana Save flagName and FlagValue
15
17
  */
16
18
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
17
19
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -136,7 +138,7 @@ class FlowInstance extends core_1.Controller {
136
138
  return res;
137
139
  }
138
140
  async insert(params, manager) {
139
- const { flowId, dataId, status, actionId, originName = '', originKey = '' } = params;
141
+ const { flowId, dataId, status, actionId, originName = '', originKey = '', flagName, flagValue } = params;
140
142
  let flowInstance = new FlowInstance_1.default();
141
143
  flowInstance.flowId = flowId;
142
144
  flowInstance.dataId = dataId;
@@ -144,6 +146,10 @@ class FlowInstance extends core_1.Controller {
144
146
  flowInstance.originKey = originKey;
145
147
  flowInstance.actionId = actionId;
146
148
  flowInstance.status = status;
149
+ if (flagName !== undefined && flagValue !== undefined) {
150
+ flowInstance.flagName = flagName;
151
+ flowInstance.flagValue = flagValue;
152
+ }
147
153
  flowInstance = await manager.save(FlowInstance_1.default, flowInstance);
148
154
  return flowInstance;
149
155
  }
@@ -45,7 +45,6 @@ const common_1 = require("@pxp-nd/common");
45
45
  let NodeInstance = class NodeInstance extends core_1.Controller {
46
46
  async RecursiveInstance(params, manager) {
47
47
  var _a;
48
- console.log("viene al nodeInstance");
49
48
  //https://lodash.com/docs/4.17.15#template
50
49
  lodash_1.default.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
51
50
  //todo after this we need to get the json variables and execute the view and conditions configured in the database
@@ -103,6 +102,14 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
103
102
  },
104
103
  data: mergeJson,
105
104
  };
105
+ const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
106
+ if ('data' in resControllerAxios && resControllerAxios.data) {
107
+ const response = resControllerAxios.data;
108
+ if ('tokenId' in response && response.tokenId) {
109
+ nodeInstance.extraArgs = { tokenId: response.tokenId };
110
+ await manager.save(NodeInstance_1.default, nodeInstance);
111
+ }
112
+ }
106
113
  }
107
114
  else {
108
115
  const config = {
@@ -114,14 +121,13 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
114
121
  },
115
122
  data: mergeJson,
116
123
  };
117
- }
118
- // @ts-ignore
119
- const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
120
- if ('data' in resControllerAxios && resControllerAxios.data) {
121
- const response = resControllerAxios.data;
122
- if ('tokenId' in response && response.tokenId) {
123
- nodeInstance.extraArgs = { tokenId: response.tokenId };
124
- await manager.save(NodeInstance_1.default, nodeInstance);
124
+ const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
125
+ if ('data' in resControllerAxios && resControllerAxios.data) {
126
+ const response = resControllerAxios.data;
127
+ if ('tokenId' in response && response.tokenId) {
128
+ nodeInstance.extraArgs = { tokenId: response.tokenId };
129
+ await manager.save(NodeInstance_1.default, nodeInstance);
130
+ }
125
131
  }
126
132
  }
127
133
  }
@@ -11,6 +11,8 @@ export default class FlowInstance extends PxpEntity {
11
11
  originKey: string;
12
12
  processNumber: string;
13
13
  resultFromOrigen: string;
14
+ flagName: string;
15
+ flagValue: number;
14
16
  nodeInstances: NodeInstance[];
15
17
  flow: Flow;
16
18
  }
@@ -12,6 +12,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ /*****************************************************************************
16
+ * Copyright(c) 2023 Qorus Inc
17
+ * All rights reserved
18
+ *****************************************************************************
19
+ * NAME: FlowListGridView.tsx
20
+ * DEVELOPER: Favio Figueroa
21
+ * DESCRIPTION:
22
+ * REVISIONS:
23
+ * Date Change ID Author Description
24
+ * ----------- ----------- -------------- ------------------------------------
25
+ * 14-May-2025 9141239986 Mercedes Zambrana add flag_name and flag_value
26
+ * ****************************************************************************/
15
27
  const typeorm_1 = require("typeorm");
16
28
  const NodeInstance_1 = __importDefault(require("./NodeInstance"));
17
29
  const Flow_1 = __importDefault(require("./Flow"));
@@ -54,6 +66,14 @@ __decorate([
54
66
  (0, typeorm_1.Column)({ name: 'result_from_origen', type: 'text', nullable: false }),
55
67
  __metadata("design:type", String)
56
68
  ], FlowInstance.prototype, "resultFromOrigen", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ name: 'flag_name', type: 'text', nullable: false }),
71
+ __metadata("design:type", String)
72
+ ], FlowInstance.prototype, "flagName", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ name: 'flag_value', type: 'numeric', nullable: false }),
75
+ __metadata("design:type", Number)
76
+ ], FlowInstance.prototype, "flagValue", void 0);
57
77
  __decorate([
58
78
  (0, typeorm_1.OneToMany)(() => NodeInstance_1.default, (nodeInstance) => nodeInstance.flowInstance, { eager: true }),
59
79
  __metadata("design:type", Array)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pxp-nd/flow",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "Workflow module for pxp-nd framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",