@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,16 +0,0 @@
|
|
|
1
|
-
import NodeInstance from './NodeInstance';
|
|
2
|
-
import Flow from './Flow';
|
|
3
|
-
import { PxpEntity } from '@pxp-nd/common';
|
|
4
|
-
export default class FlowInstance extends PxpEntity {
|
|
5
|
-
flowInstanceId: number;
|
|
6
|
-
flowId: number;
|
|
7
|
-
dataId: number;
|
|
8
|
-
actionId: number;
|
|
9
|
-
originName: string;
|
|
10
|
-
status: string;
|
|
11
|
-
originKey: string;
|
|
12
|
-
processNumber: string;
|
|
13
|
-
resultFromOrigen: string;
|
|
14
|
-
nodeInstances: NodeInstance[];
|
|
15
|
-
flow: Flow;
|
|
16
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
const NodeInstance_1 = __importDefault(require("./NodeInstance"));
|
|
17
|
-
const Flow_1 = __importDefault(require("./Flow"));
|
|
18
|
-
const common_1 = require("@pxp-nd/common");
|
|
19
|
-
let FlowInstance = class FlowInstance extends common_1.PxpEntity {
|
|
20
|
-
};
|
|
21
|
-
__decorate([
|
|
22
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'flow_instance_id' }),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], FlowInstance.prototype, "flowInstanceId", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
typeorm_1.Column({ name: 'flow_id', type: 'numeric', nullable: false }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], FlowInstance.prototype, "flowId", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
typeorm_1.Column({ name: 'data_id', type: 'numeric', nullable: false }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], FlowInstance.prototype, "dataId", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
typeorm_1.Column({ name: 'action_id', type: 'numeric', nullable: false }),
|
|
35
|
-
__metadata("design:type", Number)
|
|
36
|
-
], FlowInstance.prototype, "actionId", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
typeorm_1.Column({ name: 'origin_name', type: 'varchar', length: 100 }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], FlowInstance.prototype, "originName", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
typeorm_1.Column({ name: 'status', type: 'varchar', length: 100 }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], FlowInstance.prototype, "status", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
typeorm_1.Column({ name: 'origin_key', type: 'varchar', length: 100 }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], FlowInstance.prototype, "originKey", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
typeorm_1.Column({ name: 'process_number', type: 'varchar', nullable: false, length: 50 }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], FlowInstance.prototype, "processNumber", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
typeorm_1.Column({ name: 'result_from_origen', type: 'text', nullable: false }),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], FlowInstance.prototype, "resultFromOrigen", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
typeorm_1.OneToMany(() => NodeInstance_1.default, (nodeInstance) => nodeInstance.flowInstance, { eager: true }),
|
|
59
|
-
__metadata("design:type", Array)
|
|
60
|
-
], FlowInstance.prototype, "nodeInstances", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
typeorm_1.ManyToOne(() => Flow_1.default, flow => flow.instances),
|
|
63
|
-
typeorm_1.JoinColumn({ name: 'flow_id' }),
|
|
64
|
-
__metadata("design:type", Flow_1.default)
|
|
65
|
-
], FlowInstance.prototype, "flow", void 0);
|
|
66
|
-
FlowInstance = __decorate([
|
|
67
|
-
typeorm_1.Entity({ name: 'twf_flow_instance' })
|
|
68
|
-
], FlowInstance);
|
|
69
|
-
exports.default = FlowInstance;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Action from './Action';
|
|
2
|
-
import NodeConnection from './NodeConnection';
|
|
3
|
-
import NodeInstance from './NodeInstance';
|
|
4
|
-
import Flow from './Flow';
|
|
5
|
-
import { PxpEntity } from '@pxp-nd/common';
|
|
6
|
-
export default class Node extends PxpEntity {
|
|
7
|
-
nodeId: number;
|
|
8
|
-
flowId: number;
|
|
9
|
-
actionId: number;
|
|
10
|
-
isInit: string;
|
|
11
|
-
statusEvent: string;
|
|
12
|
-
isEnd: string;
|
|
13
|
-
actionConfigJson: string;
|
|
14
|
-
approvalConfig: string;
|
|
15
|
-
typeDelay: string;
|
|
16
|
-
delay: number;
|
|
17
|
-
flow: Flow;
|
|
18
|
-
action: Action;
|
|
19
|
-
actionEvent: Action;
|
|
20
|
-
masterConnections: NodeConnection[];
|
|
21
|
-
childConnections: NodeConnection[];
|
|
22
|
-
nodeInstances: NodeInstance[];
|
|
23
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
const Action_1 = __importDefault(require("./Action"));
|
|
17
|
-
const NodeConnection_1 = __importDefault(require("./NodeConnection"));
|
|
18
|
-
const NodeInstance_1 = __importDefault(require("./NodeInstance"));
|
|
19
|
-
const Flow_1 = __importDefault(require("./Flow"));
|
|
20
|
-
const common_1 = require("@pxp-nd/common");
|
|
21
|
-
let Node = class Node extends common_1.PxpEntity {
|
|
22
|
-
};
|
|
23
|
-
__decorate([
|
|
24
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'node_id' }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], Node.prototype, "nodeId", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
typeorm_1.Column({ name: 'flow_id', type: 'numeric', nullable: false }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], Node.prototype, "flowId", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
typeorm_1.Column({ name: 'action_id', type: 'numeric', nullable: true }),
|
|
33
|
-
__metadata("design:type", Number)
|
|
34
|
-
], Node.prototype, "actionId", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
typeorm_1.Column({ name: 'is_init', type: 'varchar', nullable: false, length: 1 }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], Node.prototype, "isInit", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
typeorm_1.Column({ name: 'status_event', type: 'varchar', length: 50 }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], Node.prototype, "statusEvent", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
typeorm_1.Column({ name: 'is_end', type: 'varchar', nullable: false, length: 1 }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], Node.prototype, "isEnd", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
typeorm_1.Column({ name: 'action_config_json', type: 'text' }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], Node.prototype, "actionConfigJson", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
typeorm_1.Column({ name: 'approval_config', type: 'text' }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], Node.prototype, "approvalConfig", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
typeorm_1.Column({ name: 'type_delay', type: 'varchar' }),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], Node.prototype, "typeDelay", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
typeorm_1.Column({ name: 'delay', type: 'numeric' }),
|
|
61
|
-
__metadata("design:type", Number)
|
|
62
|
-
], Node.prototype, "delay", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
typeorm_1.ManyToOne(() => Flow_1.default, flow => flow.nodes),
|
|
65
|
-
typeorm_1.JoinColumn({ name: 'flow_id' }),
|
|
66
|
-
__metadata("design:type", Flow_1.default)
|
|
67
|
-
], Node.prototype, "flow", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
typeorm_1.ManyToOne(() => Action_1.default, action => action.nodes, { eager: true }),
|
|
70
|
-
typeorm_1.JoinColumn({ name: 'action_id' }),
|
|
71
|
-
__metadata("design:type", Action_1.default)
|
|
72
|
-
], Node.prototype, "action", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
typeorm_1.ManyToOne(() => Action_1.default, actionEvent => actionEvent.eventNodes),
|
|
75
|
-
typeorm_1.JoinColumn({ name: 'action_id_listening_event' }),
|
|
76
|
-
__metadata("design:type", Action_1.default)
|
|
77
|
-
], Node.prototype, "actionEvent", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
typeorm_1.OneToMany(() => NodeConnection_1.default, nodeConnection => nodeConnection.masterNode),
|
|
80
|
-
__metadata("design:type", Array)
|
|
81
|
-
], Node.prototype, "masterConnections", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
typeorm_1.OneToMany(() => NodeConnection_1.default, nodeConnection => nodeConnection.childNode),
|
|
84
|
-
__metadata("design:type", Array)
|
|
85
|
-
], Node.prototype, "childConnections", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
typeorm_1.OneToMany(() => NodeInstance_1.default, (nodeInstance) => nodeInstance.node),
|
|
88
|
-
__metadata("design:type", Array)
|
|
89
|
-
], Node.prototype, "nodeInstances", void 0);
|
|
90
|
-
Node = __decorate([
|
|
91
|
-
typeorm_1.Entity({ name: 'twf_node' })
|
|
92
|
-
], Node);
|
|
93
|
-
exports.default = Node;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Node from './Node';
|
|
2
|
-
import { PxpEntity } from '@pxp-nd/common';
|
|
3
|
-
export default class NodeConnection extends PxpEntity {
|
|
4
|
-
nodeConnectionId: number;
|
|
5
|
-
condition: string;
|
|
6
|
-
nodeIdMaster: number;
|
|
7
|
-
nodeIdChild: number;
|
|
8
|
-
masterNode: Node;
|
|
9
|
-
childNode: Node;
|
|
10
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
const Node_1 = __importDefault(require("./Node"));
|
|
17
|
-
const common_1 = require("@pxp-nd/common");
|
|
18
|
-
let NodeConnection = class NodeConnection extends common_1.PxpEntity {
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'node_connection_id' }),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], NodeConnection.prototype, "nodeConnectionId", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 200 }),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], NodeConnection.prototype, "condition", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
typeorm_1.Column({ name: 'node_id_master', type: 'int', nullable: false }),
|
|
30
|
-
__metadata("design:type", Number)
|
|
31
|
-
], NodeConnection.prototype, "nodeIdMaster", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
typeorm_1.Column({ name: 'node_id_child', type: 'int', nullable: false }),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], NodeConnection.prototype, "nodeIdChild", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
typeorm_1.ManyToOne(() => Node_1.default, node => node.masterConnections),
|
|
38
|
-
typeorm_1.JoinColumn({ name: 'node_id_master' }),
|
|
39
|
-
__metadata("design:type", Node_1.default)
|
|
40
|
-
], NodeConnection.prototype, "masterNode", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
typeorm_1.ManyToOne(() => Node_1.default, node => node.childConnections),
|
|
43
|
-
typeorm_1.JoinColumn({ name: 'node_id_child' }),
|
|
44
|
-
__metadata("design:type", Node_1.default)
|
|
45
|
-
], NodeConnection.prototype, "childNode", void 0);
|
|
46
|
-
NodeConnection = __decorate([
|
|
47
|
-
typeorm_1.Entity({ name: 'twf_node_connection' })
|
|
48
|
-
], NodeConnection);
|
|
49
|
-
exports.default = NodeConnection;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import FlowInstance from './FlowInstance';
|
|
2
|
-
import Node from './Node';
|
|
3
|
-
import { PxpEntity } from '@pxp-nd/common';
|
|
4
|
-
export default class NodeInstance extends PxpEntity {
|
|
5
|
-
nodeInstanceId: number;
|
|
6
|
-
nodeId: number;
|
|
7
|
-
flowInstanceId: number;
|
|
8
|
-
runTime: Date;
|
|
9
|
-
schedule: Date;
|
|
10
|
-
status: string;
|
|
11
|
-
flowInstance: FlowInstance;
|
|
12
|
-
node: Node;
|
|
13
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
const FlowInstance_1 = __importDefault(require("./FlowInstance"));
|
|
17
|
-
const Node_1 = __importDefault(require("./Node"));
|
|
18
|
-
const common_1 = require("@pxp-nd/common");
|
|
19
|
-
let NodeInstance = class NodeInstance extends common_1.PxpEntity {
|
|
20
|
-
};
|
|
21
|
-
__decorate([
|
|
22
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'node_instance_id' }),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], NodeInstance.prototype, "nodeInstanceId", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
typeorm_1.Column({ name: 'node_id', type: 'numeric', nullable: true }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], NodeInstance.prototype, "nodeId", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
typeorm_1.Column({ name: 'flow_instance_id', type: 'numeric', nullable: true }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], NodeInstance.prototype, "flowInstanceId", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
typeorm_1.Column({ name: 'run_time', type: 'timestamp', nullable: false }),
|
|
35
|
-
__metadata("design:type", Date)
|
|
36
|
-
], NodeInstance.prototype, "runTime", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
typeorm_1.Column({ name: 'schedule', type: 'timestamp', nullable: false }),
|
|
39
|
-
__metadata("design:type", Date)
|
|
40
|
-
], NodeInstance.prototype, "schedule", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
typeorm_1.Column({ name: 'status', type: 'varchar', nullable: false, length: 50 }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], NodeInstance.prototype, "status", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
typeorm_1.ManyToOne(() => FlowInstance_1.default, flowInstance => flowInstance.nodeInstances),
|
|
47
|
-
typeorm_1.JoinColumn({ name: 'flow_instance_id' }),
|
|
48
|
-
__metadata("design:type", FlowInstance_1.default)
|
|
49
|
-
], NodeInstance.prototype, "flowInstance", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
typeorm_1.ManyToOne(() => Node_1.default, node => node.nodeInstances, { eager: true }),
|
|
52
|
-
typeorm_1.JoinColumn({ name: 'node_id' }),
|
|
53
|
-
__metadata("design:type", Node_1.default)
|
|
54
|
-
], NodeInstance.prototype, "node", void 0);
|
|
55
|
-
NodeInstance = __decorate([
|
|
56
|
-
typeorm_1.Entity({ name: 'twf_node_instance' })
|
|
57
|
-
], NodeInstance);
|
|
58
|
-
exports.default = NodeInstance;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
const FieldMap_1 = __importDefault(require("./FieldMap"));
|
|
17
|
-
const common_1 = require("@pxp-nd/common");
|
|
18
|
-
let OriginName = class OriginName extends common_1.PxpEntity {
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'origin_name_id' }),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], OriginName.prototype, "originNameId", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], OriginName.prototype, "name", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
typeorm_1.Column({ type: 'text', nullable: false }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], OriginName.prototype, "description", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 150 }),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], OriginName.prototype, "originKey", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
typeorm_1.OneToMany(() => FieldMap_1.default, (fieldMap) => fieldMap.originName),
|
|
38
|
-
__metadata("design:type", Array)
|
|
39
|
-
], OriginName.prototype, "fields", void 0);
|
|
40
|
-
OriginName = __decorate([
|
|
41
|
-
typeorm_1.Entity({ name: 'twf_origin_name' })
|
|
42
|
-
], OriginName);
|
|
43
|
-
exports.default = OriginName;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Action from './Action';
|
|
2
|
-
import ActionType from './ActionType';
|
|
3
|
-
import Event from './Event';
|
|
4
|
-
import FieldMap from './FieldMap';
|
|
5
|
-
import Flow from './Flow';
|
|
6
|
-
import FlowInstance from './FlowInstance';
|
|
7
|
-
import Node from './Node';
|
|
8
|
-
import NodeConnection from './NodeConnection';
|
|
9
|
-
import NodeInstance from './NodeInstance';
|
|
10
|
-
import OriginName from './OriginName';
|
|
11
|
-
export { Action, ActionType, Event, FieldMap, Flow, FlowInstance, Node, NodeConnection, NodeInstance, OriginName };
|
|
12
|
-
export declare const entities: {
|
|
13
|
-
Action: typeof Action;
|
|
14
|
-
ActionType: typeof ActionType;
|
|
15
|
-
Event: typeof Event;
|
|
16
|
-
FieldMap: typeof FieldMap;
|
|
17
|
-
Flow: typeof Flow;
|
|
18
|
-
FlowInstance: typeof FlowInstance;
|
|
19
|
-
Node: typeof Node;
|
|
20
|
-
NodeConnection: typeof NodeConnection;
|
|
21
|
-
NodeInstance: typeof NodeInstance;
|
|
22
|
-
OriginName: typeof OriginName;
|
|
23
|
-
};
|
|
@@ -1,27 +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.entities = exports.OriginName = exports.NodeInstance = exports.NodeConnection = exports.Node = exports.FlowInstance = exports.Flow = exports.FieldMap = exports.Event = exports.ActionType = exports.Action = void 0;
|
|
7
|
-
const Action_1 = __importDefault(require("./Action"));
|
|
8
|
-
exports.Action = Action_1.default;
|
|
9
|
-
const ActionType_1 = __importDefault(require("./ActionType"));
|
|
10
|
-
exports.ActionType = ActionType_1.default;
|
|
11
|
-
const Event_1 = __importDefault(require("./Event"));
|
|
12
|
-
exports.Event = Event_1.default;
|
|
13
|
-
const FieldMap_1 = __importDefault(require("./FieldMap"));
|
|
14
|
-
exports.FieldMap = FieldMap_1.default;
|
|
15
|
-
const Flow_1 = __importDefault(require("./Flow"));
|
|
16
|
-
exports.Flow = Flow_1.default;
|
|
17
|
-
const FlowInstance_1 = __importDefault(require("./FlowInstance"));
|
|
18
|
-
exports.FlowInstance = FlowInstance_1.default;
|
|
19
|
-
const Node_1 = __importDefault(require("./Node"));
|
|
20
|
-
exports.Node = Node_1.default;
|
|
21
|
-
const NodeConnection_1 = __importDefault(require("./NodeConnection"));
|
|
22
|
-
exports.NodeConnection = NodeConnection_1.default;
|
|
23
|
-
const NodeInstance_1 = __importDefault(require("./NodeInstance"));
|
|
24
|
-
exports.NodeInstance = NodeInstance_1.default;
|
|
25
|
-
const OriginName_1 = __importDefault(require("./OriginName"));
|
|
26
|
-
exports.OriginName = OriginName_1.default;
|
|
27
|
-
exports.entities = { Action: Action_1.default, ActionType: ActionType_1.default, Event: Event_1.default, FieldMap: FieldMap_1.default, Flow: Flow_1.default, FlowInstance: FlowInstance_1.default, Node: Node_1.default, NodeConnection: NodeConnection_1.default, NodeInstance: NodeInstance_1.default, OriginName: OriginName_1.default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./entity"), exports);
|
|
14
|
-
__exportStar(require("./controllers"), exports);
|
|
15
|
-
__exportStar(require("./subscribers"), exports);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kplian 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Member Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Event Subscriber
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
* Jaime Rivera
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
import { EntitySubscriberInterface, InsertEvent } from 'typeorm';
|
|
16
|
-
import EventModel from '../entity/Event';
|
|
17
|
-
export declare class Event implements EntitySubscriberInterface<EventModel> {
|
|
18
|
-
listenTo(): typeof EventModel;
|
|
19
|
-
afterInsert(event: InsertEvent<EventModel>): Promise<void>;
|
|
20
|
-
checkConditions(viewData: Record<string, any>, flowId: number, actionId: number): Promise<boolean>;
|
|
21
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Event = void 0;
|
|
13
|
-
/**
|
|
14
|
-
* Kplian 2021
|
|
15
|
-
*
|
|
16
|
-
* MIT
|
|
17
|
-
*
|
|
18
|
-
* Member Controller
|
|
19
|
-
*
|
|
20
|
-
* @summary Event Subscriber
|
|
21
|
-
* @author Favio Figueroa
|
|
22
|
-
* Jaime Rivera
|
|
23
|
-
*
|
|
24
|
-
* Created at : 2021-07-08 12:55:38
|
|
25
|
-
* Last modified :
|
|
26
|
-
*/
|
|
27
|
-
const typeorm_1 = require("typeorm");
|
|
28
|
-
const Event_1 = __importDefault(require("../entity/Event"));
|
|
29
|
-
const Node_1 = __importDefault(require("../entity/Node"));
|
|
30
|
-
const Action_1 = __importDefault(require("../entity/Action"));
|
|
31
|
-
const Flow_1 = __importDefault(require("../entity/Flow"));
|
|
32
|
-
const core_1 = require("@pxp-nd/core");
|
|
33
|
-
const FlowInstance_1 = __importDefault(require("../entity/FlowInstance"));
|
|
34
|
-
let Event = class Event {
|
|
35
|
-
listenTo() {
|
|
36
|
-
return Event_1.default;
|
|
37
|
-
}
|
|
38
|
-
async afterInsert(event) {
|
|
39
|
-
console.log('entra');
|
|
40
|
-
//todo investigate replace variables into condition
|
|
41
|
-
const newEvent = event.entity;
|
|
42
|
-
const node = await core_1.__(Node_1.default.find({ where: { actionId: newEvent.actionId } }));
|
|
43
|
-
for (const n of node) {
|
|
44
|
-
//get data of view
|
|
45
|
-
const { action: { originName, originKey } } = n;
|
|
46
|
-
const executeView = `select * from ${originName} where ${originKey} = ${newEvent.dataId}`;
|
|
47
|
-
const resExecuteView = await typeorm_1.getManager().query(executeView);
|
|
48
|
-
const flow = await core_1.__(Flow_1.default.findOne({ where: { flowId: n.flowId } }));
|
|
49
|
-
if (flow.vendorId == resExecuteView[0].vendor_id && this.checkConditions(resExecuteView[0], n.flowId, newEvent.actionId)) {
|
|
50
|
-
//now check all conditions
|
|
51
|
-
let flowInstance = new FlowInstance_1.default();
|
|
52
|
-
flowInstance.flowId = n.flowId;
|
|
53
|
-
flowInstance.dataId = newEvent.dataId;
|
|
54
|
-
flowInstance.originName = originName;
|
|
55
|
-
flowInstance.originKey = originKey;
|
|
56
|
-
flowInstance.actionId = newEvent.actionId;
|
|
57
|
-
flowInstance.status = 'pending';
|
|
58
|
-
flowInstance = await event.manager.save(FlowInstance_1.default, flowInstance);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
async checkConditions(viewData, flowId, actionId) {
|
|
63
|
-
const action = await Action_1.default.findOne(actionId);
|
|
64
|
-
const node = await Node_1.default.findOne({ where: { actionId, flowId } });
|
|
65
|
-
const actionConfigJson = JSON.parse(node.actionConfigJson);
|
|
66
|
-
let res = true;
|
|
67
|
-
if (action.eventConfig) {
|
|
68
|
-
const eventConfig = JSON.parse(action.eventConfig);
|
|
69
|
-
if (eventConfig.filters) {
|
|
70
|
-
eventConfig.filters.forEach((filter) => {
|
|
71
|
-
if (actionConfigJson[filter.nodeField] && viewData[filter.originField] != actionConfigJson[filter.nodeField]) {
|
|
72
|
-
res = false;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return res;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
Event = __decorate([
|
|
81
|
-
typeorm_1.EventSubscriber()
|
|
82
|
-
], Event);
|
|
83
|
-
exports.Event = Event;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.subscribers = exports.EventSubscriber = void 0;
|
|
4
|
-
const Event_1 = require("./Event");
|
|
5
|
-
Object.defineProperty(exports, "EventSubscriber", { enumerable: true, get: function () { return Event_1.Event; } });
|
|
6
|
-
exports.subscribers = [Event_1.Event];
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pxp-nd/flow",
|
|
3
|
-
"version": "1.0.25",
|
|
4
|
-
"description": "Workflow module for pxp-nd framework",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"prepublish": "tsc",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
-
"build": "rimraf ./dist && tsc",
|
|
11
|
-
"dev:publish": "yalc publish",
|
|
12
|
-
"prod:publish": "npm publish",
|
|
13
|
-
"dev": "tsc-watch --target es2017 --outDir ./dist --onSuccess \"node .\"",
|
|
14
|
-
"start": "npm run build && node dist/index.js"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/kplian/flow-nd.git"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"flow",
|
|
22
|
-
"pxp",
|
|
23
|
-
"pxp-nd"
|
|
24
|
-
],
|
|
25
|
-
"author": "Kplian",
|
|
26
|
-
"license": "ISC",
|
|
27
|
-
"bugs": {
|
|
28
|
-
"url": "https://github.com/kplian/flow-nd/issues"
|
|
29
|
-
},
|
|
30
|
-
"homepage": "https://github.com/kplian/flow-nd#readme",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@pxp-nd/common": "^1.1.4",
|
|
33
|
-
"@pxp-nd/core": "^1.1.13",
|
|
34
|
-
"axios": "^0.21.1",
|
|
35
|
-
"lodash": "^4.17.21",
|
|
36
|
-
"typeorm": "^0.2.36"
|
|
37
|
-
},
|
|
38
|
-
"yalcSig": "422e0ce2e6378fafb43bcb62bcff57f5"
|
|
39
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2019",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"allowJs": false,
|
|
6
|
-
"outDir": "dist",
|
|
7
|
-
"rootDir": "src",
|
|
8
|
-
"strict": false,
|
|
9
|
-
"noImplicitAny": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"resolveJsonModule": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"forceConsistentCasingInFileNames": true,
|
|
14
|
-
"emitDecoratorMetadata": true,
|
|
15
|
-
"experimentalDecorators": true,
|
|
16
|
-
"moduleResolution": "node",
|
|
17
|
-
"declaration": true,
|
|
18
|
-
"isolatedModules": true,
|
|
19
|
-
"strictPropertyInitialization": false,
|
|
20
|
-
},
|
|
21
|
-
"include": [
|
|
22
|
-
"custom.d.ts",
|
|
23
|
-
"src/**/*.ts"
|
|
24
|
-
],
|
|
25
|
-
"exclude": [
|
|
26
|
-
"node_modules",
|
|
27
|
-
"dist"
|
|
28
|
-
]
|
|
29
|
-
}
|