@pxp-nd/flow 1.0.25 → 1.0.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.
- package/README.md +1 -1
- package/dist/controllers/Action.d.ts +20 -20
- package/dist/controllers/Action.js +82 -82
- package/dist/controllers/ActionType.d.ts +17 -17
- package/dist/controllers/ActionType.js +28 -28
- package/dist/controllers/Event.d.ts +17 -17
- package/dist/controllers/Event.js +28 -28
- package/dist/controllers/FieldMap.d.ts +17 -17
- package/dist/controllers/FieldMap.js +28 -28
- package/dist/controllers/Flow.d.ts +24 -24
- package/dist/controllers/Flow.js +116 -116
- package/dist/controllers/FlowInstance.d.ts +20 -20
- package/dist/controllers/FlowInstance.js +84 -78
- package/dist/controllers/Node.d.ts +23 -23
- package/dist/controllers/Node.js +273 -273
- package/dist/controllers/NodeInstance.d.ts +21 -21
- package/dist/controllers/NodeInstance.js +172 -165
- package/dist/controllers/OriginName.d.ts +17 -17
- package/dist/controllers/OriginName.js +28 -28
- package/dist/controllers/index.d.ts +11 -11
- package/dist/controllers/index.js +25 -25
- package/dist/entity/Action.d.ts +20 -20
- package/dist/entity/Action.js +85 -85
- package/dist/entity/ActionType.d.ts +16 -16
- package/dist/entity/ActionType.js +71 -71
- package/dist/entity/Event.d.ts +9 -9
- package/dist/entity/Event.js +44 -44
- package/dist/entity/FieldMap.d.ts +11 -11
- package/dist/entity/FieldMap.js +52 -52
- package/dist/entity/Flow.d.ts +14 -14
- package/dist/entity/Flow.js +60 -60
- package/dist/entity/FlowInstance.d.ts +16 -16
- package/dist/entity/FlowInstance.js +69 -69
- package/dist/entity/Node.d.ts +23 -23
- package/dist/entity/Node.js +93 -93
- package/dist/entity/NodeConnection.d.ts +10 -10
- package/dist/entity/NodeConnection.js +49 -49
- package/dist/entity/NodeInstance.d.ts +13 -13
- package/dist/entity/NodeInstance.js +58 -58
- package/dist/entity/OriginName.d.ts +9 -9
- package/dist/entity/OriginName.js +43 -43
- package/dist/entity/index.d.ts +23 -23
- package/dist/entity/index.js +27 -27
- package/dist/index.d.ts +3 -3
- package/dist/index.js +15 -15
- package/dist/subscribers/Event.d.ts +21 -21
- package/dist/subscribers/Event.js +83 -83
- package/dist/subscribers/index.d.ts +3 -3
- package/dist/subscribers/index.js +6 -6
- package/package.json +45 -45
- package/tsconfig.json +29 -29
package/dist/entity/Flow.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
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 Flow = class Flow extends common_1.PxpEntity {
|
|
20
|
-
};
|
|
21
|
-
__decorate([
|
|
22
|
-
typeorm_1.PrimaryGeneratedColumn({ name: 'flow_id' }),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], Flow.prototype, "flowId", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
typeorm_1.Column({ name: 'vendor_id', type: 'int', nullable: false }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], Flow.prototype, "vendorId", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
typeorm_1.Column({ type: 'int', nullable: false }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], Flow.prototype, "code", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], Flow.prototype, "name", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
typeorm_1.Column({ type: 'text', nullable: false }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], Flow.prototype, "description", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], Flow.prototype, "enabled", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], Flow.prototype, "type", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
typeorm_1.OneToMany(() => FlowInstance_1.default, flowInstance => flowInstance.flow),
|
|
51
|
-
__metadata("design:type", Array)
|
|
52
|
-
], Flow.prototype, "instances", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
typeorm_1.OneToMany(() => Node_1.default, node => node.flow, { eager: true }),
|
|
55
|
-
__metadata("design:type", Array)
|
|
56
|
-
], Flow.prototype, "nodes", void 0);
|
|
57
|
-
Flow = __decorate([
|
|
58
|
-
typeorm_1.Entity({ name: 'twf_flow' })
|
|
59
|
-
], Flow);
|
|
60
|
-
exports.default = Flow;
|
|
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 Flow = class Flow extends common_1.PxpEntity {
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
typeorm_1.PrimaryGeneratedColumn({ name: 'flow_id' }),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], Flow.prototype, "flowId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
typeorm_1.Column({ name: 'vendor_id', type: 'int', nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], Flow.prototype, "vendorId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
typeorm_1.Column({ type: 'int', nullable: false }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Flow.prototype, "code", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Flow.prototype, "name", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
typeorm_1.Column({ type: 'text', nullable: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Flow.prototype, "description", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Flow.prototype, "enabled", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], Flow.prototype, "type", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
typeorm_1.OneToMany(() => FlowInstance_1.default, flowInstance => flowInstance.flow),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], Flow.prototype, "instances", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
typeorm_1.OneToMany(() => Node_1.default, node => node.flow, { eager: true }),
|
|
55
|
+
__metadata("design:type", Array)
|
|
56
|
+
], Flow.prototype, "nodes", void 0);
|
|
57
|
+
Flow = __decorate([
|
|
58
|
+
typeorm_1.Entity({ name: 'twf_flow' })
|
|
59
|
+
], Flow);
|
|
60
|
+
exports.default = Flow;
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
+
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 +1,69 @@
|
|
|
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
|
+
"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;
|
package/dist/entity/Node.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
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
|
+
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
|
+
}
|
package/dist/entity/Node.js
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
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
|
+
"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 +1,10 @@
|
|
|
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
|
+
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
|
+
}
|