@pxp-nd/flow 1.1.22 → 1.1.24
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.
|
@@ -52,6 +52,7 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
52
52
|
const resExecuteView = await (0, core_1.__)((0, typeorm_1.getManager)().query(executeView));
|
|
53
53
|
const resultFromOrigin = resExecuteView[0];
|
|
54
54
|
console.log("**** resultFromOrigin:", resultFromOrigin);
|
|
55
|
+
//let mergeJson = {};
|
|
55
56
|
let mergeJson = {};
|
|
56
57
|
const { actionConfigJson, action: { configJsonTemplate, actionType: { schemaJson }, }, } = node;
|
|
57
58
|
if (configJsonTemplate !== "" || actionConfigJson !== "") {
|
|
@@ -86,6 +87,13 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
86
87
|
else {
|
|
87
88
|
if (node.action.actionType.controller) {
|
|
88
89
|
const data = "";
|
|
90
|
+
const res = await manager.save(NodeInstance_1.default, nodeInstance);
|
|
91
|
+
const nodeInstanceId = res.nodeInstanceId;
|
|
92
|
+
console.log("el id q tenemos q mandarrrrrr:::", nodeInstanceId);
|
|
93
|
+
if (nodeInstanceId) {
|
|
94
|
+
mergeJson.nodeInstanceId = nodeInstanceId;
|
|
95
|
+
}
|
|
96
|
+
console.log("ladata q se manda para el correo::", mergeJson);
|
|
89
97
|
const config = {
|
|
90
98
|
method: "post",
|
|
91
99
|
url: `http://localhost:${process.env.PORT}/api/${node.action.actionType.controller}`,
|
|
@@ -97,8 +105,15 @@ let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
|
97
105
|
};
|
|
98
106
|
// @ts-ignore
|
|
99
107
|
const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
|
|
108
|
+
if ('data' in resControllerAxios && resControllerAxios.data) {
|
|
109
|
+
const response = resControllerAxios.data;
|
|
110
|
+
if ('tokenId' in response && response.tokenId) {
|
|
111
|
+
nodeInstance.extraArgs = { tokenId: response.tokenId };
|
|
112
|
+
await manager.save(NodeInstance_1.default, nodeInstance);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
console.log("la respuesta del Axiossss:", resControllerAxios.data);
|
|
100
116
|
}
|
|
101
|
-
await manager.save(NodeInstance_1.default, nodeInstance);
|
|
102
117
|
// @ts-ignore
|
|
103
118
|
const nodeConnectionList = await (0, core_1.__)(NodeConnection_1.default.find({ where: { nodeIdMaster: node.nodeId } }));
|
|
104
119
|
for (const nodeConnection of nodeConnectionList) {
|
|
@@ -42,6 +42,10 @@ __decorate([
|
|
|
42
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
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ name: 'extra_args', type: 'json', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], NodeInstance.prototype, "extraArgs", void 0);
|
|
45
49
|
__decorate([
|
|
46
50
|
(0, typeorm_1.ManyToOne)(() => FlowInstance_1.default, flowInstance => flowInstance.nodeInstances),
|
|
47
51
|
(0, typeorm_1.JoinColumn)({ name: 'flow_instance_id' }),
|