@pxp-nd/flow 1.0.58 → 1.0.59
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/FlowInstance.d.ts +2 -0
- package/dist/controllers/FlowInstance.js +66 -2
- package/dist/controllers/NodeInstance.d.ts +1 -1
- package/dist/controllers/NodeInstance.js +65 -55
- package/dist/entity/Event.d.ts +1 -0
- package/dist/entity/Event.js +4 -0
- package/dist/entity/FlowLog.d.ts +7 -0
- package/{.yalc/@pxp-nd/flow/dist/entity/OriginName.js → dist/entity/FlowLog.js} +13 -21
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +1 -1
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/README.md +0 -1
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Action.js +0 -82
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/ActionType.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/ActionType.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Event.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Event.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Flow.d.ts +0 -24
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Flow.js +0 -116
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.js +0 -78
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Node.js +0 -273
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.js +0 -165
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/OriginName.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/OriginName.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/index.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/index.js +0 -25
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Action.js +0 -85
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/ActionType.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/ActionType.js +0 -71
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Event.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Event.js +0 -44
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FieldMap.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FieldMap.js +0 -52
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Flow.d.ts +0 -14
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Flow.js +0 -60
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.js +0 -69
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Node.js +0 -93
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.d.ts +0 -10
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.js +0 -49
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.d.ts +0 -13
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.js +0 -58
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/OriginName.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/OriginName.js +0 -43
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/index.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/index.js +0 -27
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/index.js +0 -15
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/Event.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/Event.js +0 -83
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/index.js +0 -6
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/package.json +0 -39
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/tsconfig.json +0 -29
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/yalc.sig +0 -1
- package/.yalc/@pxp-nd/flow/README.md +0 -1
- package/.yalc/@pxp-nd/flow/dist/controllers/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/dist/controllers/Action.js +0 -82
- package/.yalc/@pxp-nd/flow/dist/controllers/ActionType.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/ActionType.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/Event.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/Event.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/Flow.d.ts +0 -33
- package/.yalc/@pxp-nd/flow/dist/controllers/Flow.js +0 -469
- package/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.js +0 -84
- package/.yalc/@pxp-nd/flow/dist/controllers/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/dist/controllers/Node.js +0 -273
- package/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.js +0 -191
- package/.yalc/@pxp-nd/flow/dist/controllers/OriginName.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/OriginName.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/index.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/dist/controllers/index.js +0 -25
- package/.yalc/@pxp-nd/flow/dist/entity/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/dist/entity/Action.js +0 -85
- package/.yalc/@pxp-nd/flow/dist/entity/ActionType.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/dist/entity/ActionType.js +0 -71
- package/.yalc/@pxp-nd/flow/dist/entity/Event.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/dist/entity/Event.js +0 -44
- package/.yalc/@pxp-nd/flow/dist/entity/FieldMap.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/dist/entity/FieldMap.js +0 -52
- package/.yalc/@pxp-nd/flow/dist/entity/Flow.d.ts +0 -14
- package/.yalc/@pxp-nd/flow/dist/entity/Flow.js +0 -60
- package/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.js +0 -69
- package/.yalc/@pxp-nd/flow/dist/entity/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/dist/entity/Node.js +0 -93
- package/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.d.ts +0 -10
- package/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.js +0 -49
- package/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.d.ts +0 -13
- package/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.js +0 -58
- package/.yalc/@pxp-nd/flow/dist/entity/OriginName.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/dist/entity/index.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/dist/entity/index.js +0 -27
- package/.yalc/@pxp-nd/flow/dist/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/dist/index.js +0 -19
- package/.yalc/@pxp-nd/flow/dist/subscribers/Event.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/dist/subscribers/Event.js +0 -84
- package/.yalc/@pxp-nd/flow/dist/subscribers/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/dist/subscribers/index.js +0 -6
- package/.yalc/@pxp-nd/flow/package.json +0 -39
- package/.yalc/@pxp-nd/flow/tsconfig.json +0 -29
- package/.yalc/@pxp-nd/flow/yalc.lock +0 -9
- package/.yalc/@pxp-nd/flow/yalc.sig +0 -1
- package/dist/subscribers/Event.d.ts +0 -21
- package/dist/subscribers/Event.js +0 -84
- package/dist/subscribers/index.d.ts +0 -3
- package/dist/subscribers/index.js +0 -6
- package/yalc.lock +0 -9
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Effex 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* Member Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
22
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
const typeorm_1 = require("typeorm");
|
|
29
|
-
const Node_1 = __importDefault(require("../entity/Node"));
|
|
30
|
-
const NodeConnection_1 = __importDefault(require("../entity/NodeConnection"));
|
|
31
|
-
const core_1 = require("@pxp-nd/core");
|
|
32
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
33
|
-
const FieldMap_1 = __importDefault(require("../entity/FieldMap"));
|
|
34
|
-
const OriginName_1 = __importDefault(require("../entity/OriginName"));
|
|
35
|
-
const axios_1 = __importDefault(require("axios"));
|
|
36
|
-
let Node = class Node extends core_1.Controller {
|
|
37
|
-
async getNodeData(node, dataId, manager) {
|
|
38
|
-
const { action: { originName, originKey } } = node;
|
|
39
|
-
const executeView = `select * from ${originName} where ${originKey} = ${dataId}`;
|
|
40
|
-
const resExecuteView = await (0, core_1.__)(manager.query(executeView));
|
|
41
|
-
return JSON.stringify(resExecuteView[0]);
|
|
42
|
-
}
|
|
43
|
-
async add(params, manager) {
|
|
44
|
-
let node = new Node_1.default();
|
|
45
|
-
node.isInit = params.isInit;
|
|
46
|
-
node.isEnd = params.isEnd;
|
|
47
|
-
node.actionId = params.actionId;
|
|
48
|
-
node.flowId = params.flowId;
|
|
49
|
-
node = await manager.save(node);
|
|
50
|
-
if (params.parents) {
|
|
51
|
-
for (let parent of params.parents) {
|
|
52
|
-
const nc = await NodeConnection_1.default.find({ nodeIdMaster: parent.parentId });
|
|
53
|
-
for (let connection of nc) {
|
|
54
|
-
connection.nodeIdMaster = node.nodeId;
|
|
55
|
-
await manager.save(connection);
|
|
56
|
-
}
|
|
57
|
-
let nodeConnection = new NodeConnection_1.default();
|
|
58
|
-
nodeConnection.nodeIdChild = node.nodeId;
|
|
59
|
-
nodeConnection.nodeIdMaster = parent.parentId;
|
|
60
|
-
nodeConnection.condition = parent.condition;
|
|
61
|
-
nodeConnection = await manager.save(nodeConnection);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
const { nodeId } = node;
|
|
65
|
-
const nodeData = await manager.findOne(Node_1.default, nodeId);
|
|
66
|
-
return nodeData;
|
|
67
|
-
}
|
|
68
|
-
async AddActionConfigJson(params, manager) {
|
|
69
|
-
let { nodeId: removed, __metadata: removed2, ...actionConfigJson } = params;
|
|
70
|
-
Object.entries(params.__metadata).forEach(([nameKey, values]) => {
|
|
71
|
-
actionConfigJson[nameKey] = `{{ ${values.name} }}`;
|
|
72
|
-
});
|
|
73
|
-
const upd = await (0, core_1.__)(manager.update(Node_1.default, params.nodeId, {
|
|
74
|
-
actionConfigJson: JSON.stringify(actionConfigJson),
|
|
75
|
-
}));
|
|
76
|
-
return {
|
|
77
|
-
actionConfigJson,
|
|
78
|
-
success: true,
|
|
79
|
-
nodeId: params.nodeId,
|
|
80
|
-
upd
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
async getParameterizedNode(params, manager) {
|
|
84
|
-
lodash_1.default.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
|
|
85
|
-
const { nodeId, flowId, substitutionsSchemaJson = {} } = params;
|
|
86
|
-
const tNodeOrigin = await (0, core_1.__)(Node_1.default.findOne({
|
|
87
|
-
relations: ['action'],
|
|
88
|
-
where: {
|
|
89
|
-
flowId: flowId,
|
|
90
|
-
isInit: 'Y',
|
|
91
|
-
action: {
|
|
92
|
-
originName: (0, typeorm_1.Not)((0, typeorm_1.IsNull)())
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}));
|
|
96
|
-
const tNodeData = (0, core_1.__)(Node_1.default.findOne(nodeId));
|
|
97
|
-
const tFieldMapData = (0, core_1.__)(manager.createQueryBuilder(FieldMap_1.default, 'fm')
|
|
98
|
-
.innerJoin(OriginName_1.default, 'on', 'on.originNameId = fm.originNameId')
|
|
99
|
-
.where("on.name = :n ", { n: tNodeOrigin.action.originName })
|
|
100
|
-
.getMany());
|
|
101
|
-
//const nodeOrigin = await tNodeOrigin; todo
|
|
102
|
-
const nodeData = await tNodeData;
|
|
103
|
-
const fieldMapData = await tFieldMapData;
|
|
104
|
-
/*const [nodeData, fieldMapData] = await Promise.all([
|
|
105
|
-
tNodeData,
|
|
106
|
-
tFieldMapData
|
|
107
|
-
]);*/
|
|
108
|
-
const { actionConfigJson, action: { schemaJson, configJsonTemplate, actionType: { schemaJson: schemaJsonFromActionType } } } = nodeData;
|
|
109
|
-
const actionConfigJsonObject = actionConfigJson ? JSON.parse(actionConfigJson) : {};
|
|
110
|
-
const configJsonTemplateObject = configJsonTemplate ? JSON.parse(configJsonTemplate) : {};
|
|
111
|
-
let schemaJsonFromActionTypeObject = schemaJsonFromActionType ? JSON.parse(lodash_1.default.template(schemaJsonFromActionType)(substitutionsSchemaJson)) : {};
|
|
112
|
-
let schemaJsonFromActionObject = schemaJson ? JSON.parse(lodash_1.default.template(schemaJson)(substitutionsSchemaJson)) : {};
|
|
113
|
-
let schemaJsonObject = { ...schemaJsonFromActionTypeObject, ...schemaJsonFromActionObject };
|
|
114
|
-
const mergeValues = {
|
|
115
|
-
...configJsonTemplateObject,
|
|
116
|
-
...actionConfigJsonObject
|
|
117
|
-
};
|
|
118
|
-
const verifyIfValueFromFieldMap = (str) => {
|
|
119
|
-
if (/^{{/.test(str) && /}}$/.test(str)) {
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
return false;
|
|
123
|
-
};
|
|
124
|
-
const findFieldMapAndMetaData = (value) => {
|
|
125
|
-
const found = fieldMapData.find((fmd) => `{{ ${fmd.name} }}` === value) || {};
|
|
126
|
-
return {
|
|
127
|
-
initialValue: found.alias || value,
|
|
128
|
-
metadata: found
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
const findFieldMapUniqueByType = (fieldMappingType) => {
|
|
132
|
-
const filtered = fieldMapData.filter((fmd) => fmd.type === fieldMappingType);
|
|
133
|
-
if (filtered && filtered.length === 1) {
|
|
134
|
-
const [found] = filtered;
|
|
135
|
-
return {
|
|
136
|
-
initialValue: found.alias,
|
|
137
|
-
metadata: found
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
return undefined;
|
|
141
|
-
};
|
|
142
|
-
// this logic is for autocomplete for moment
|
|
143
|
-
const findFieldInConfigForComponent = async (json, value) => {
|
|
144
|
-
if (json.formComponent && json.formComponent.type === 'AutoComplete') {
|
|
145
|
-
const url = json.formComponent.store.axios.url;
|
|
146
|
-
const method = json.formComponent.store.axios.method;
|
|
147
|
-
const data = json.formComponent.store.axios.data;
|
|
148
|
-
const idDD = json.formComponent.store.idDD;
|
|
149
|
-
const descDD = json.formComponent.store.descDD;
|
|
150
|
-
const config = {
|
|
151
|
-
method: method,
|
|
152
|
-
url: url,
|
|
153
|
-
headers: {
|
|
154
|
-
'Authorization': '' + process.env.TOKEN_PXP_ND + '',
|
|
155
|
-
'Content-Type': 'application/json'
|
|
156
|
-
},
|
|
157
|
-
data: {
|
|
158
|
-
...data,
|
|
159
|
-
[idDD]: value
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
// @ts-ignore
|
|
163
|
-
const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
|
|
164
|
-
const desc = resControllerAxios.data.data[descDD];
|
|
165
|
-
return desc;
|
|
166
|
-
}
|
|
167
|
-
else if (json.formComponentTemplate && json.configGetDescValue) { // todo we need to see how works here
|
|
168
|
-
const { controller, storeId, descColumn } = json.configGetDescValue;
|
|
169
|
-
const config = {
|
|
170
|
-
method: "get",
|
|
171
|
-
url: `http://localhost:${process.env.PORT}/api/${controller}`,
|
|
172
|
-
headers: {
|
|
173
|
-
'Authorization': '' + process.env.TOKEN_PXP_ND + '',
|
|
174
|
-
'Content-Type': 'application/json'
|
|
175
|
-
},
|
|
176
|
-
data: {
|
|
177
|
-
[storeId]: value
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
// @ts-ignore
|
|
181
|
-
const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
|
|
182
|
-
const desc = resControllerAxios.data.data[descColumn];
|
|
183
|
-
return desc;
|
|
184
|
-
}
|
|
185
|
-
return undefined;
|
|
186
|
-
};
|
|
187
|
-
for (const [nameKey, value] of Object.entries(mergeValues)) {
|
|
188
|
-
if (schemaJsonObject[nameKey]) {
|
|
189
|
-
const descValue = await (0, core_1.__)(findFieldInConfigForComponent(schemaJsonObject[nameKey], value));
|
|
190
|
-
schemaJsonObject[nameKey] = {
|
|
191
|
-
...schemaJsonObject[nameKey],
|
|
192
|
-
initialValue: value,
|
|
193
|
-
...(descValue && { descValue: descValue }),
|
|
194
|
-
...(verifyIfValueFromFieldMap(value) && { fromFieldMap: true, ...findFieldMapAndMetaData(value) }),
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
Object.entries(schemaJsonObject)
|
|
199
|
-
.filter(([, value]) => value.initialValue === undefined && value.fromFieldMap === undefined && value.fieldMappingType)
|
|
200
|
-
.forEach(([nameKey]) => {
|
|
201
|
-
const hasUniqueByTypeInMappingData = findFieldMapUniqueByType(schemaJsonObject[nameKey].fieldMappingType);
|
|
202
|
-
schemaJsonObject[nameKey] = {
|
|
203
|
-
...schemaJsonObject[nameKey],
|
|
204
|
-
...(hasUniqueByTypeInMappingData && { fromFieldMap: true, ...hasUniqueByTypeInMappingData }),
|
|
205
|
-
};
|
|
206
|
-
});
|
|
207
|
-
return {
|
|
208
|
-
actionConfigJsonObject,
|
|
209
|
-
configJsonTemplateObject,
|
|
210
|
-
mergeValues,
|
|
211
|
-
schemaJsonObject,
|
|
212
|
-
schemaJson,
|
|
213
|
-
node: nodeData,
|
|
214
|
-
fieldMapData,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
async executeActionJson(params, manager) {
|
|
218
|
-
const { nodeId, originName, originKey, fromValues } = params;
|
|
219
|
-
// we need to get the value from merge values with originKey
|
|
220
|
-
const getParameterizedNodeData = await (0, core_1.__)(this.getParameterizedNode({ nodeId: nodeId }, manager));
|
|
221
|
-
const { mergeValues } = getParameterizedNodeData;
|
|
222
|
-
const findOriginValue = Object.entries(mergeValues).find(([nameValue]) => fromValues === nameValue);
|
|
223
|
-
const resValueObject = Object.fromEntries([findOriginValue]);
|
|
224
|
-
const originValue = resValueObject[fromValues];
|
|
225
|
-
const executeViewString = `select * from ${originName} where ${originKey} = ${originValue}`;
|
|
226
|
-
const resExecuteView = await (0, typeorm_1.getManager)().query(executeViewString);
|
|
227
|
-
/*const executeView = `select * from ${originName} where ${originKey} = ${newEvent.dataId}`;
|
|
228
|
-
const resExecuteView = await getManager().query(executeView);*/
|
|
229
|
-
return {
|
|
230
|
-
...resExecuteView[0]
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
__decorate([
|
|
235
|
-
(0, core_1.Post)(),
|
|
236
|
-
(0, core_1.DbSettings)('Orm'),
|
|
237
|
-
(0, core_1.ReadOnly)(false),
|
|
238
|
-
(0, core_1.Log)(true),
|
|
239
|
-
__metadata("design:type", Function),
|
|
240
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
241
|
-
__metadata("design:returntype", Promise)
|
|
242
|
-
], Node.prototype, "add", null);
|
|
243
|
-
__decorate([
|
|
244
|
-
(0, core_1.Post)(),
|
|
245
|
-
(0, core_1.DbSettings)('Orm'),
|
|
246
|
-
(0, core_1.ReadOnly)(false),
|
|
247
|
-
(0, core_1.Log)(true),
|
|
248
|
-
__metadata("design:type", Function),
|
|
249
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
250
|
-
__metadata("design:returntype", Promise)
|
|
251
|
-
], Node.prototype, "AddActionConfigJson", null);
|
|
252
|
-
__decorate([
|
|
253
|
-
(0, core_1.Post)(),
|
|
254
|
-
(0, core_1.DbSettings)('Orm'),
|
|
255
|
-
(0, core_1.ReadOnly)(false),
|
|
256
|
-
(0, core_1.Log)(true),
|
|
257
|
-
__metadata("design:type", Function),
|
|
258
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
259
|
-
__metadata("design:returntype", Promise)
|
|
260
|
-
], Node.prototype, "getParameterizedNode", null);
|
|
261
|
-
__decorate([
|
|
262
|
-
(0, core_1.Post)(),
|
|
263
|
-
(0, core_1.DbSettings)('Orm'),
|
|
264
|
-
(0, core_1.ReadOnly)(false),
|
|
265
|
-
(0, core_1.Log)(true),
|
|
266
|
-
__metadata("design:type", Function),
|
|
267
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
268
|
-
__metadata("design:returntype", Promise)
|
|
269
|
-
], Node.prototype, "executeActionJson", null);
|
|
270
|
-
Node = __decorate([
|
|
271
|
-
(0, core_1.Model)('flow-nd/Node')
|
|
272
|
-
], Node);
|
|
273
|
-
exports.default = Node;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kplian 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* NodeInstance Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
* Jaime Rivera
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
import { EntityManager } from "typeorm";
|
|
16
|
-
import { Controller } from "@pxp-nd/core";
|
|
17
|
-
declare class NodeInstance extends Controller {
|
|
18
|
-
RecursiveInstance(params: Record<string, any>): Promise<unknown>;
|
|
19
|
-
ProcessDelay(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
20
|
-
}
|
|
21
|
-
export default NodeInstance;
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Kplian 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* NodeInstance Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
* Jaime Rivera
|
|
12
|
-
*
|
|
13
|
-
* Created at : 2021-07-08 12:55:38
|
|
14
|
-
* Last modified :
|
|
15
|
-
*/
|
|
16
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
-
};
|
|
22
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
23
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const typeorm_1 = require("typeorm");
|
|
30
|
-
const moment_1 = __importDefault(require("moment"));
|
|
31
|
-
const core_1 = require("@pxp-nd/core");
|
|
32
|
-
const NodeConnection_1 = __importDefault(require("../entity/NodeConnection"));
|
|
33
|
-
const NodeInstance_1 = __importDefault(require("../entity/NodeInstance"));
|
|
34
|
-
const Node_1 = __importDefault(require("../entity/Node"));
|
|
35
|
-
const axios_1 = __importDefault(require("axios"));
|
|
36
|
-
const ActionType_1 = __importDefault(require("../entity/ActionType"));
|
|
37
|
-
const Action_1 = __importDefault(require("../entity/Action"));
|
|
38
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
39
|
-
const FlowInstance_1 = __importDefault(require("../entity/FlowInstance"));
|
|
40
|
-
//TODO replace this flow-nd need tobe independent library
|
|
41
|
-
const common_1 = require("@pxp-nd/common");
|
|
42
|
-
let NodeInstance = class NodeInstance extends core_1.Controller {
|
|
43
|
-
async RecursiveInstance(params) {
|
|
44
|
-
//https://lodash.com/docs/4.17.15#template
|
|
45
|
-
lodash_1.default.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
|
|
46
|
-
//todo after this we need to get the json variables and execute the view and conditions configured in the database
|
|
47
|
-
const { node, flowInstance, eventNode } = params;
|
|
48
|
-
const executeView = `select * from ${flowInstance.originName} where ${flowInstance.originKey} = ${flowInstance.dataId}`;
|
|
49
|
-
const resExecuteView = await (0, core_1.__)((0, typeorm_1.getManager)().query(executeView));
|
|
50
|
-
const resultFromOrigin = resExecuteView[0];
|
|
51
|
-
let mergeJson = {};
|
|
52
|
-
const { actionConfigJson, action: { configJsonTemplate, actionType: { schemaJson }, }, } = node;
|
|
53
|
-
if (configJsonTemplate !== "" || actionConfigJson !== "") {
|
|
54
|
-
const actionConfigJsonObject = actionConfigJson &&
|
|
55
|
-
JSON.parse(lodash_1.default.template(actionConfigJson)(resultFromOrigin));
|
|
56
|
-
const configJsonTemplateObject = configJsonTemplate &&
|
|
57
|
-
JSON.parse(lodash_1.default.template(configJsonTemplate)(resultFromOrigin));
|
|
58
|
-
mergeJson = {
|
|
59
|
-
...(configJsonTemplateObject || {}),
|
|
60
|
-
...(actionConfigJsonObject || {}),
|
|
61
|
-
__resultFromOrigin: resultFromOrigin,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
let nodeInstance = new NodeInstance_1.default();
|
|
65
|
-
nodeInstance.flowInstanceId = flowInstance.flowInstanceId;
|
|
66
|
-
// @ts-ignore
|
|
67
|
-
nodeInstance.nodeId = node.nodeId;
|
|
68
|
-
nodeInstance.runTime = new Date();
|
|
69
|
-
if (node.action.actionType.isDelay === "Y") {
|
|
70
|
-
const delay = node.delay;
|
|
71
|
-
const typeDelay = node.typeDelay;
|
|
72
|
-
nodeInstance.schedule = (0, moment_1.default)().add(delay, typeDelay).toDate();
|
|
73
|
-
nodeInstance.status = "WAIT";
|
|
74
|
-
await (0, typeorm_1.getManager)().save(NodeInstance_1.default, nodeInstance);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
if (node.action.actionType.controller) {
|
|
78
|
-
const data = "";
|
|
79
|
-
const config = {
|
|
80
|
-
method: "post",
|
|
81
|
-
url: `http://localhost:${process.env.PORT}/api/${node.action.actionType.controller}`,
|
|
82
|
-
headers: {
|
|
83
|
-
Authorization: "" + process.env.TOKEN_PXP_ND + "",
|
|
84
|
-
"Content-Type": "application/json",
|
|
85
|
-
},
|
|
86
|
-
data: mergeJson,
|
|
87
|
-
};
|
|
88
|
-
// @ts-ignore
|
|
89
|
-
const resControllerAxios = await (0, core_1.__)((0, axios_1.default)(config));
|
|
90
|
-
}
|
|
91
|
-
await (0, typeorm_1.getManager)().save(NodeInstance_1.default, nodeInstance);
|
|
92
|
-
// @ts-ignore
|
|
93
|
-
const nodeConnectionList = await (0, core_1.__)(NodeConnection_1.default.find({ where: { nodeIdMaster: node.nodeId } }));
|
|
94
|
-
for (const nodeConnection of nodeConnectionList) {
|
|
95
|
-
const condition = lodash_1.default.template(nodeConnection.condition)(resultFromOrigin);
|
|
96
|
-
const evalCondition = eval(condition);
|
|
97
|
-
if (evalCondition) {
|
|
98
|
-
const nodeRes = await (0, core_1.__)(Node_1.default.findOne(nodeConnection.nodeIdChild));
|
|
99
|
-
await this.RecursiveInstance({
|
|
100
|
-
node: nodeRes,
|
|
101
|
-
flowInstance,
|
|
102
|
-
resultFromOrigin,
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return {};
|
|
108
|
-
}
|
|
109
|
-
async ProcessDelay(params, manager) {
|
|
110
|
-
const flag = await common_1.GlobalData.findOne({
|
|
111
|
-
data: "wf_processing_delay_nodes_flag",
|
|
112
|
-
});
|
|
113
|
-
if (flag) {
|
|
114
|
-
if (flag.value == "true") {
|
|
115
|
-
throw new core_1.PxpError(400, "Already processing pending flows");
|
|
116
|
-
}
|
|
117
|
-
flag.value = "true";
|
|
118
|
-
await (0, typeorm_1.getManager)().save(flag);
|
|
119
|
-
let nodeInstanceIdProcessing = -1;
|
|
120
|
-
try {
|
|
121
|
-
const maxNodes = await common_1.GlobalData.findOne({
|
|
122
|
-
data: "wf_max_concurrent_delay_process",
|
|
123
|
-
});
|
|
124
|
-
const nodeInstanceDelayData = await (0, core_1.__)(manager
|
|
125
|
-
.createQueryBuilder(NodeInstance_1.default, "ni")
|
|
126
|
-
.innerJoin(Node_1.default, "n", "n.nodeId = ni.nodeId")
|
|
127
|
-
.innerJoin(Action_1.default, "a", "a.actionId = n.actionId")
|
|
128
|
-
.innerJoin(ActionType_1.default, "at", "at.actionTypeId = a.actionTypeId")
|
|
129
|
-
.where("at.isDelay = 'Y' ")
|
|
130
|
-
.andWhere("ni.schedule <= :start ", { start: new Date() })
|
|
131
|
-
.andWhere("ni.status = 'WAIT' ")
|
|
132
|
-
.limit((maxNodes && maxNodes.value))
|
|
133
|
-
.getMany());
|
|
134
|
-
for (const nodeInstance of nodeInstanceDelayData) {
|
|
135
|
-
//update status from wait to executing
|
|
136
|
-
await (0, core_1.__)(manager.update(NodeInstance_1.default, nodeInstance.nodeInstanceId, {
|
|
137
|
-
status: "EXECUTING",
|
|
138
|
-
}));
|
|
139
|
-
const nodeConnectionList = await (0, core_1.__)(NodeConnection_1.default.find({
|
|
140
|
-
where: { nodeIdMaster: nodeInstance.nodeId },
|
|
141
|
-
}));
|
|
142
|
-
const flowInstance = await (0, core_1.__)(FlowInstance_1.default.findOne(nodeInstance.flowInstanceId));
|
|
143
|
-
const resultFromOrigin = JSON.parse(flowInstance.resultFromOrigen);
|
|
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
|
-
for (const nodeConnection of nodeConnectionList) {
|
|
146
|
-
// todo create transaction for own node
|
|
147
|
-
const nodeRes = await (0, core_1.__)(Node_1.default.findOne(nodeConnection.nodeIdChild));
|
|
148
|
-
try {
|
|
149
|
-
await this.RecursiveInstance({
|
|
150
|
-
node: nodeRes,
|
|
151
|
-
flowInstance,
|
|
152
|
-
resultFromOrigin,
|
|
153
|
-
});
|
|
154
|
-
//update status from wait to executed
|
|
155
|
-
await (0, core_1.__)(manager.update(NodeInstance_1.default, nodeInstance.nodeInstanceId, {
|
|
156
|
-
status: "EXECUTED",
|
|
157
|
-
}));
|
|
158
|
-
}
|
|
159
|
-
catch (error) {
|
|
160
|
-
console.log(error);
|
|
161
|
-
await manager.update(NodeInstance_1.default, nodeInstance.nodeInstanceId, {
|
|
162
|
-
status: "ERROR",
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
catch (error) {
|
|
169
|
-
flag.value = "false";
|
|
170
|
-
await (0, typeorm_1.getManager)().save(flag);
|
|
171
|
-
throw new core_1.PxpError(400, "Error processing node: " + nodeInstanceIdProcessing);
|
|
172
|
-
}
|
|
173
|
-
flag.value = "false";
|
|
174
|
-
await (0, typeorm_1.getManager)().save(flag);
|
|
175
|
-
}
|
|
176
|
-
return { success: true };
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
__decorate([
|
|
180
|
-
(0, core_1.Post)(),
|
|
181
|
-
(0, core_1.DbSettings)("Orm"),
|
|
182
|
-
(0, core_1.ReadOnly)(false),
|
|
183
|
-
(0, core_1.Log)(true),
|
|
184
|
-
__metadata("design:type", Function),
|
|
185
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
186
|
-
__metadata("design:returntype", Promise)
|
|
187
|
-
], NodeInstance.prototype, "ProcessDelay", null);
|
|
188
|
-
NodeInstance = __decorate([
|
|
189
|
-
(0, core_1.Model)("flow-nd/NodeInstance")
|
|
190
|
-
], NodeInstance);
|
|
191
|
-
exports.default = NodeInstance;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effex 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Member Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2021-07-08 12:55:38
|
|
12
|
-
* Last modified :
|
|
13
|
-
*/
|
|
14
|
-
import { Controller } from '@pxp-nd/core';
|
|
15
|
-
declare class OriginName extends Controller {
|
|
16
|
-
}
|
|
17
|
-
export default OriginName;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Effex 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* Member Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const core_1 = require("@pxp-nd/core");
|
|
23
|
-
let OriginName = class OriginName extends core_1.Controller {
|
|
24
|
-
};
|
|
25
|
-
OriginName = __decorate([
|
|
26
|
-
(0, core_1.Model)('flow-nd/OriginName')
|
|
27
|
-
], OriginName);
|
|
28
|
-
exports.default = OriginName;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import ActionController from './Action';
|
|
2
|
-
import ActionTypeController from './ActionType';
|
|
3
|
-
import EventController from './Event';
|
|
4
|
-
import FieldMapController from './FieldMap';
|
|
5
|
-
import FlowController from './Flow';
|
|
6
|
-
import FlowInstanceController from './FlowInstance';
|
|
7
|
-
import NodeController from './Node';
|
|
8
|
-
import NodeInstanceController from './NodeInstance';
|
|
9
|
-
import OriginNameController from './OriginName';
|
|
10
|
-
export { ActionController, ActionTypeController, EventController, FieldMapController, FlowController, FlowInstanceController, NodeController, NodeInstanceController, OriginNameController };
|
|
11
|
-
export declare const controllers: (typeof ActionTypeController)[];
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.controllers = exports.OriginNameController = exports.NodeInstanceController = exports.NodeController = exports.FlowInstanceController = exports.FlowController = exports.FieldMapController = exports.EventController = exports.ActionTypeController = exports.ActionController = void 0;
|
|
7
|
-
const Action_1 = __importDefault(require("./Action"));
|
|
8
|
-
exports.ActionController = Action_1.default;
|
|
9
|
-
const ActionType_1 = __importDefault(require("./ActionType"));
|
|
10
|
-
exports.ActionTypeController = ActionType_1.default;
|
|
11
|
-
const Event_1 = __importDefault(require("./Event"));
|
|
12
|
-
exports.EventController = Event_1.default;
|
|
13
|
-
const FieldMap_1 = __importDefault(require("./FieldMap"));
|
|
14
|
-
exports.FieldMapController = FieldMap_1.default;
|
|
15
|
-
const Flow_1 = __importDefault(require("./Flow"));
|
|
16
|
-
exports.FlowController = Flow_1.default;
|
|
17
|
-
const FlowInstance_1 = __importDefault(require("./FlowInstance"));
|
|
18
|
-
exports.FlowInstanceController = FlowInstance_1.default;
|
|
19
|
-
const Node_1 = __importDefault(require("./Node"));
|
|
20
|
-
exports.NodeController = Node_1.default;
|
|
21
|
-
const NodeInstance_1 = __importDefault(require("./NodeInstance"));
|
|
22
|
-
exports.NodeInstanceController = NodeInstance_1.default;
|
|
23
|
-
const OriginName_1 = __importDefault(require("./OriginName"));
|
|
24
|
-
exports.OriginNameController = OriginName_1.default;
|
|
25
|
-
exports.controllers = [Action_1.default, ActionType_1.default, Event_1.default, FieldMap_1.default, Flow_1.default, FlowInstance_1.default, Node_1.default, NodeInstance_1.default, OriginName_1.default];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import ActionType from './ActionType';
|
|
2
|
-
import Node from './Node';
|
|
3
|
-
import { PxpEntity } from '@pxp-nd/common';
|
|
4
|
-
export default class Action extends PxpEntity {
|
|
5
|
-
actionId: number;
|
|
6
|
-
actionTypeId: number;
|
|
7
|
-
code: string;
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
originName: string;
|
|
11
|
-
originKey: string;
|
|
12
|
-
controllerFunction: string;
|
|
13
|
-
configJsonTemplate: string;
|
|
14
|
-
eventConfig: string;
|
|
15
|
-
hidden: string;
|
|
16
|
-
schemaJson: string;
|
|
17
|
-
actionType: ActionType;
|
|
18
|
-
nodes: Node[];
|
|
19
|
-
eventNodes: Node[];
|
|
20
|
-
}
|