@nocobase/plugin-workflow 0.12.0-alpha.2 → 0.12.0-alpha.4
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/client/components/DrawerDescription.d.ts +2 -0
- package/dist/client/components/ExecutionStatusSelect.d.ts +4 -0
- package/dist/client/components/StatusIcon.d.ts +2 -0
- package/dist/client/constants.d.ts +1 -0
- package/dist/client/index.js +2268 -319
- package/dist/client/nodes/create.d.ts +1 -0
- package/dist/client/nodes/query.d.ts +136 -2
- package/dist/client/schemas/collection.d.ts +112 -0
- package/dist/client/schemas/executions.d.ts +17 -2
- package/dist/client/style.d.ts +2 -0
- package/dist/client/triggers/collection.d.ts +2 -0
- package/dist/client/triggers/form.d.ts +50 -0
- package/dist/client/triggers/index.d.ts +1 -0
- package/dist/client/triggers/schedule/index.d.ts +2 -1
- package/dist/locale/zh-CN.d.ts +33 -0
- package/dist/locale/zh-CN.js +33 -0
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/server/Plugin.js +10 -2
- package/dist/server/Processor.js +6 -5
- package/dist/server/actions/executions.d.ts +2 -0
- package/dist/server/actions/executions.js +22 -0
- package/dist/server/actions/index.js +4 -1
- package/dist/server/actions/workflows.d.ts +1 -0
- package/dist/server/actions/workflows.js +19 -3
- package/dist/server/collections/workflows.js +5 -0
- package/dist/server/instructions/query.js +12 -1
- package/dist/server/migrations/20230809113132-workflow-options.d.ts +4 -0
- package/dist/server/migrations/20230809113132-workflow-options.js +34 -0
- package/dist/server/triggers/form.d.ts +11 -0
- package/dist/server/triggers/form.js +89 -0
- package/dist/server/triggers/index.js +2 -1
- package/package.json +2 -2
- package/dist/client/components/NodeDescription.d.ts +0 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { SchemaInitializerItemOptions, useCollectionDataSource } from '@nocobase/client';
|
|
2
3
|
import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
|
|
4
|
+
import { useWorkflowVariableOptions } from '../variable';
|
|
3
5
|
declare const _default: {
|
|
4
6
|
title: string;
|
|
5
7
|
type: string;
|
|
@@ -19,13 +21,14 @@ declare const _default: {
|
|
|
19
21
|
};
|
|
20
22
|
multiple: {
|
|
21
23
|
type: string;
|
|
22
|
-
title: string;
|
|
23
24
|
'x-decorator': string;
|
|
24
25
|
'x-component': string;
|
|
26
|
+
'x-content': string;
|
|
25
27
|
description: string;
|
|
26
28
|
};
|
|
27
29
|
params: {
|
|
28
30
|
type: string;
|
|
31
|
+
'x-component': string;
|
|
29
32
|
properties: {
|
|
30
33
|
filter: {
|
|
31
34
|
type: string;
|
|
@@ -40,6 +43,117 @@ declare const _default: {
|
|
|
40
43
|
dynamicComponent: string;
|
|
41
44
|
};
|
|
42
45
|
};
|
|
46
|
+
sort: {
|
|
47
|
+
type: string;
|
|
48
|
+
title: string;
|
|
49
|
+
'x-decorator': string;
|
|
50
|
+
'x-component': string;
|
|
51
|
+
items: {
|
|
52
|
+
type: string;
|
|
53
|
+
properties: {
|
|
54
|
+
space: {
|
|
55
|
+
type: string;
|
|
56
|
+
'x-component': string;
|
|
57
|
+
properties: {
|
|
58
|
+
sort: {
|
|
59
|
+
type: string;
|
|
60
|
+
'x-decorator': string;
|
|
61
|
+
'x-component': string;
|
|
62
|
+
};
|
|
63
|
+
field: {
|
|
64
|
+
type: string;
|
|
65
|
+
enum: string;
|
|
66
|
+
required: boolean;
|
|
67
|
+
'x-decorator': string;
|
|
68
|
+
'x-component': string;
|
|
69
|
+
'x-component-props': {
|
|
70
|
+
style: {
|
|
71
|
+
width: number;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
direction: {
|
|
76
|
+
type: string;
|
|
77
|
+
'x-decorator': string;
|
|
78
|
+
'x-component': string;
|
|
79
|
+
'x-component-props': {
|
|
80
|
+
optionType: string;
|
|
81
|
+
};
|
|
82
|
+
enum: {
|
|
83
|
+
label: string;
|
|
84
|
+
value: string;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
remove: {
|
|
88
|
+
type: string;
|
|
89
|
+
'x-decorator': string;
|
|
90
|
+
'x-component': string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
properties: {
|
|
97
|
+
add: {
|
|
98
|
+
type: string;
|
|
99
|
+
title: string;
|
|
100
|
+
'x-component': string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
pagination: {
|
|
105
|
+
type: string;
|
|
106
|
+
title: string;
|
|
107
|
+
'x-decorator': string;
|
|
108
|
+
'x-decorator-props': {
|
|
109
|
+
value: {
|
|
110
|
+
designable: boolean;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
'x-component': string;
|
|
114
|
+
properties: {
|
|
115
|
+
row: {
|
|
116
|
+
type: string;
|
|
117
|
+
'x-component': string;
|
|
118
|
+
properties: {
|
|
119
|
+
page: {
|
|
120
|
+
type: string;
|
|
121
|
+
'x-component': string;
|
|
122
|
+
properties: {
|
|
123
|
+
page: {
|
|
124
|
+
type: string;
|
|
125
|
+
title: string;
|
|
126
|
+
'x-decorator': string;
|
|
127
|
+
'x-component': string;
|
|
128
|
+
'x-component-props': {
|
|
129
|
+
scope: string;
|
|
130
|
+
useTypedConstant: string[];
|
|
131
|
+
};
|
|
132
|
+
default: number;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
pageSize: {
|
|
137
|
+
type: string;
|
|
138
|
+
'x-component': string;
|
|
139
|
+
properties: {
|
|
140
|
+
pageSize: {
|
|
141
|
+
type: string;
|
|
142
|
+
title: string;
|
|
143
|
+
'x-decorator': string;
|
|
144
|
+
'x-component': string;
|
|
145
|
+
'x-component-props': {
|
|
146
|
+
min: number;
|
|
147
|
+
max: number;
|
|
148
|
+
};
|
|
149
|
+
default: number;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
43
157
|
appends: {
|
|
44
158
|
type: string;
|
|
45
159
|
title: string;
|
|
@@ -47,6 +161,7 @@ declare const _default: {
|
|
|
47
161
|
'x-decorator': string;
|
|
48
162
|
'x-component': string;
|
|
49
163
|
'x-component-props': {
|
|
164
|
+
multiple: boolean;
|
|
50
165
|
useCollection(): any;
|
|
51
166
|
};
|
|
52
167
|
'x-reactions': {
|
|
@@ -59,20 +174,39 @@ declare const _default: {
|
|
|
59
174
|
}[];
|
|
60
175
|
};
|
|
61
176
|
};
|
|
177
|
+
'x-reactions': {
|
|
178
|
+
dependencies: string[];
|
|
179
|
+
fulfill: {
|
|
180
|
+
state: {
|
|
181
|
+
visible: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
}[];
|
|
62
185
|
};
|
|
63
186
|
failOnEmpty: {
|
|
64
187
|
type: string;
|
|
65
|
-
title: string;
|
|
66
188
|
'x-decorator': string;
|
|
67
189
|
'x-component': string;
|
|
190
|
+
'x-content': string;
|
|
68
191
|
};
|
|
69
192
|
};
|
|
70
193
|
view: {};
|
|
71
194
|
scope: {
|
|
72
195
|
useCollectionDataSource: typeof useCollectionDataSource;
|
|
196
|
+
useWorkflowVariableOptions: typeof useWorkflowVariableOptions;
|
|
197
|
+
useSortableFields(): {
|
|
198
|
+
value: any;
|
|
199
|
+
label: any;
|
|
200
|
+
}[];
|
|
73
201
|
};
|
|
74
202
|
components: {
|
|
203
|
+
ArrayItems: import("@formily/react").ReactFC<import("react").HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
|
|
204
|
+
Item: import("@formily/react").ReactFC<import("react").HTMLAttributes<HTMLDivElement> & {
|
|
205
|
+
type?: "divide" | "card";
|
|
206
|
+
}>;
|
|
207
|
+
};
|
|
75
208
|
FilterDynamicComponent: typeof FilterDynamicComponent;
|
|
209
|
+
SchemaComponentContext: import("react").Context<import("@nocobase/client").ISchemaComponentContext>;
|
|
76
210
|
};
|
|
77
211
|
useVariables({ id, title, config }: {
|
|
78
212
|
id: any;
|
|
@@ -33,6 +33,117 @@ export declare const filter: {
|
|
|
33
33
|
dynamicComponent: string;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
+
export declare const sort: {
|
|
37
|
+
type: string;
|
|
38
|
+
title: string;
|
|
39
|
+
'x-decorator': string;
|
|
40
|
+
'x-component': string;
|
|
41
|
+
items: {
|
|
42
|
+
type: string;
|
|
43
|
+
properties: {
|
|
44
|
+
space: {
|
|
45
|
+
type: string;
|
|
46
|
+
'x-component': string;
|
|
47
|
+
properties: {
|
|
48
|
+
sort: {
|
|
49
|
+
type: string;
|
|
50
|
+
'x-decorator': string;
|
|
51
|
+
'x-component': string;
|
|
52
|
+
};
|
|
53
|
+
field: {
|
|
54
|
+
type: string;
|
|
55
|
+
enum: string;
|
|
56
|
+
required: boolean;
|
|
57
|
+
'x-decorator': string;
|
|
58
|
+
'x-component': string;
|
|
59
|
+
'x-component-props': {
|
|
60
|
+
style: {
|
|
61
|
+
width: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
direction: {
|
|
66
|
+
type: string;
|
|
67
|
+
'x-decorator': string;
|
|
68
|
+
'x-component': string;
|
|
69
|
+
'x-component-props': {
|
|
70
|
+
optionType: string;
|
|
71
|
+
};
|
|
72
|
+
enum: {
|
|
73
|
+
label: string;
|
|
74
|
+
value: string;
|
|
75
|
+
}[];
|
|
76
|
+
};
|
|
77
|
+
remove: {
|
|
78
|
+
type: string;
|
|
79
|
+
'x-decorator': string;
|
|
80
|
+
'x-component': string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
properties: {
|
|
87
|
+
add: {
|
|
88
|
+
type: string;
|
|
89
|
+
title: string;
|
|
90
|
+
'x-component': string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare const pagination: {
|
|
95
|
+
type: string;
|
|
96
|
+
title: string;
|
|
97
|
+
'x-decorator': string;
|
|
98
|
+
'x-decorator-props': {
|
|
99
|
+
value: {
|
|
100
|
+
designable: boolean;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
'x-component': string;
|
|
104
|
+
properties: {
|
|
105
|
+
row: {
|
|
106
|
+
type: string;
|
|
107
|
+
'x-component': string;
|
|
108
|
+
properties: {
|
|
109
|
+
page: {
|
|
110
|
+
type: string;
|
|
111
|
+
'x-component': string;
|
|
112
|
+
properties: {
|
|
113
|
+
page: {
|
|
114
|
+
type: string;
|
|
115
|
+
title: string;
|
|
116
|
+
'x-decorator': string;
|
|
117
|
+
'x-component': string;
|
|
118
|
+
'x-component-props': {
|
|
119
|
+
scope: string;
|
|
120
|
+
useTypedConstant: string[];
|
|
121
|
+
};
|
|
122
|
+
default: number;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
pageSize: {
|
|
127
|
+
type: string;
|
|
128
|
+
'x-component': string;
|
|
129
|
+
properties: {
|
|
130
|
+
pageSize: {
|
|
131
|
+
type: string;
|
|
132
|
+
title: string;
|
|
133
|
+
'x-decorator': string;
|
|
134
|
+
'x-component': string;
|
|
135
|
+
'x-component-props': {
|
|
136
|
+
min: number;
|
|
137
|
+
max: number;
|
|
138
|
+
};
|
|
139
|
+
default: number;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
36
147
|
export declare const appends: {
|
|
37
148
|
type: string;
|
|
38
149
|
title: string;
|
|
@@ -40,6 +151,7 @@ export declare const appends: {
|
|
|
40
151
|
'x-decorator': string;
|
|
41
152
|
'x-component': string;
|
|
42
153
|
'x-component-props': {
|
|
154
|
+
multiple: boolean;
|
|
43
155
|
useCollection(): any;
|
|
44
156
|
};
|
|
45
157
|
'x-reactions': {
|
|
@@ -159,7 +159,22 @@ export declare const executionSchema: {
|
|
|
159
159
|
marginBottom: number;
|
|
160
160
|
};
|
|
161
161
|
};
|
|
162
|
-
properties: {
|
|
162
|
+
properties: {
|
|
163
|
+
clear: {
|
|
164
|
+
type: string;
|
|
165
|
+
title: string;
|
|
166
|
+
'x-component': string;
|
|
167
|
+
'x-component-props': {
|
|
168
|
+
useAction(): {
|
|
169
|
+
run(): Promise<void>;
|
|
170
|
+
};
|
|
171
|
+
confirm: {
|
|
172
|
+
title: string;
|
|
173
|
+
content: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
163
178
|
};
|
|
164
179
|
table: {
|
|
165
180
|
type: string;
|
|
@@ -220,7 +235,7 @@ export declare const executionSchema: {
|
|
|
220
235
|
split: string;
|
|
221
236
|
};
|
|
222
237
|
properties: {
|
|
223
|
-
|
|
238
|
+
link: {
|
|
224
239
|
type: string;
|
|
225
240
|
title: string;
|
|
226
241
|
'x-component': string;
|
package/dist/client/style.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
2
|
workflowPageClass: import("antd-style").SerializedStyles;
|
|
3
3
|
workflowVersionDropdownClass: import("antd-style").SerializedStyles;
|
|
4
|
+
executionsDropdownRowClass: import("antd-style").SerializedStyles;
|
|
4
5
|
branchBlockClass: import("antd-style").SerializedStyles;
|
|
5
6
|
branchClass: import("antd-style").SerializedStyles;
|
|
6
7
|
nodeBlockClass: import("antd-style").SerializedStyles;
|
|
@@ -11,6 +12,7 @@ declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<
|
|
|
11
12
|
nodeMetaClass: import("antd-style").SerializedStyles;
|
|
12
13
|
nodeTitleClass: import("antd-style").SerializedStyles;
|
|
13
14
|
nodeSubtreeClass: import("antd-style").SerializedStyles;
|
|
15
|
+
nodeJobResultClass: import("antd-style").SerializedStyles;
|
|
14
16
|
addButtonClass: import("antd-style").SerializedStyles;
|
|
15
17
|
conditionClass: import("antd-style").SerializedStyles;
|
|
16
18
|
loopLineClass: import("antd-style").SerializedStyles;
|
|
@@ -3,6 +3,7 @@ import { SchemaInitializerItemOptions, useCollectionDataSource } from '@nocobase
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
type: string;
|
|
6
|
+
description: string;
|
|
6
7
|
fieldset: {
|
|
7
8
|
collection: {
|
|
8
9
|
"x-reactions": any[];
|
|
@@ -94,6 +95,7 @@ declare const _default: {
|
|
|
94
95
|
'x-decorator': string;
|
|
95
96
|
'x-component': string;
|
|
96
97
|
'x-component-props': {
|
|
98
|
+
multiple: boolean;
|
|
97
99
|
useCollection(): any;
|
|
98
100
|
};
|
|
99
101
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { SchemaInitializerItemOptions, useCollectionDataSource } from '@nocobase/client';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
type: string;
|
|
5
|
+
description: string;
|
|
6
|
+
fieldset: {
|
|
7
|
+
collection: {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
"x-reactions": any[];
|
|
11
|
+
type: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
'x-decorator': string;
|
|
14
|
+
'x-component': string;
|
|
15
|
+
'x-component-props': {
|
|
16
|
+
className: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
appends: {
|
|
20
|
+
title: string;
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
'x-decorator': string;
|
|
24
|
+
'x-component': string;
|
|
25
|
+
'x-component-props': {
|
|
26
|
+
multiple: boolean;
|
|
27
|
+
useCollection(): any;
|
|
28
|
+
};
|
|
29
|
+
'x-reactions': {
|
|
30
|
+
dependencies: string[];
|
|
31
|
+
fulfill: {
|
|
32
|
+
state: {
|
|
33
|
+
visible: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
scope: {
|
|
40
|
+
useCollectionDataSource: typeof useCollectionDataSource;
|
|
41
|
+
};
|
|
42
|
+
components: {};
|
|
43
|
+
useVariables(config: any, options: any): import("../variable").VariableOption[];
|
|
44
|
+
useInitializers(config: any): SchemaInitializerItemOptions | null;
|
|
45
|
+
initializers: {};
|
|
46
|
+
};
|
|
47
|
+
export default _default;
|
|
48
|
+
export declare function useTriggerWorkflowsActionProps(): {
|
|
49
|
+
onClick(): Promise<void>;
|
|
50
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { SchemaInitializerItemOptions, useCollectionDataSource } from '@nocobase/client';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
type: string;
|
|
6
|
+
description: string;
|
|
6
7
|
fieldset: {
|
|
7
8
|
config: {
|
|
8
9
|
type: string;
|
package/dist/locale/zh-CN.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
Workflow: string;
|
|
3
3
|
'Execution history': string;
|
|
4
|
+
'Clear all executions': string;
|
|
5
|
+
'Clear executions will not reset executed count, and started executions will not be deleted, are you sure you want to delete them all?': string;
|
|
4
6
|
Executed: string;
|
|
7
|
+
Sync: string;
|
|
8
|
+
'Sync enabled status of all workflows from database': string;
|
|
5
9
|
'Trigger type': string;
|
|
6
10
|
Status: string;
|
|
7
11
|
On: string;
|
|
@@ -9,15 +13,35 @@ declare const _default: {
|
|
|
9
13
|
Version: string;
|
|
10
14
|
'Copy to new version': string;
|
|
11
15
|
Duplicate: string;
|
|
16
|
+
'Duplicate to new workflow': string;
|
|
12
17
|
'Delete a main version will cause all other revisions to be deleted too.': string;
|
|
13
18
|
Loading: string;
|
|
14
19
|
'Load failed': string;
|
|
20
|
+
'Use transaction': string;
|
|
21
|
+
'Data operation nodes in workflow will run in a same transaction until any interruption. Any failure will cause data rollback, and will also rollback the history of the execution.': string;
|
|
22
|
+
'Auto delete history when execution is on end status': string;
|
|
15
23
|
Trigger: string;
|
|
16
24
|
'Trigger variables': string;
|
|
17
25
|
'Trigger data': string;
|
|
18
26
|
'Trigger time': string;
|
|
19
27
|
'Triggered at': string;
|
|
28
|
+
'Form event': string;
|
|
29
|
+
'Event triggers when submitted a workflow bound form action.': string;
|
|
30
|
+
'Form data model': string;
|
|
31
|
+
'Use a collection to match form data.': string;
|
|
32
|
+
'Associations to use': string;
|
|
33
|
+
'Bind workflows': string;
|
|
34
|
+
'Workflow will be triggered after submitting succeeded.': string;
|
|
35
|
+
'Workflow will be triggered after saving succeeded.': string;
|
|
36
|
+
'Workflow will be triggered directly once the button clicked.': string;
|
|
37
|
+
'Submit to workflow': string;
|
|
38
|
+
'Add workflow': string;
|
|
39
|
+
'Select workflow': string;
|
|
40
|
+
'Trigger data context': string;
|
|
41
|
+
'Full form data': string;
|
|
42
|
+
'Select context': string;
|
|
20
43
|
'Collection event': string;
|
|
44
|
+
'Event will be triggered on collection data row created, updated or deleted.': string;
|
|
21
45
|
'Trigger on': string;
|
|
22
46
|
'After record added': string;
|
|
23
47
|
'After record updated': string;
|
|
@@ -29,6 +53,7 @@ declare const _default: {
|
|
|
29
53
|
'Preload associations': string;
|
|
30
54
|
'Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.': string;
|
|
31
55
|
'Schedule event': string;
|
|
56
|
+
'Scheduled job base on time conditions.': string;
|
|
32
57
|
'Trigger mode': string;
|
|
33
58
|
'Based on certain date': string;
|
|
34
59
|
'Based on date field of collection': string;
|
|
@@ -73,6 +98,14 @@ declare const _default: {
|
|
|
73
98
|
Aborted: string;
|
|
74
99
|
Canceled: string;
|
|
75
100
|
Rejected: string;
|
|
101
|
+
'Triggered but still waiting in queue to execute.': string;
|
|
102
|
+
'Started and executing, maybe waiting for an async callback (manual, delay etc.).': string;
|
|
103
|
+
'Successfully finished.': string;
|
|
104
|
+
'Failed to satisfy node configurations.': string;
|
|
105
|
+
'Some node meets error.': string;
|
|
106
|
+
'Running of some node was aborted by program flow.': string;
|
|
107
|
+
'Manually canceled whole execution when waiting.': string;
|
|
108
|
+
'Rejected from a manual node.': string;
|
|
76
109
|
'Continue the process': string;
|
|
77
110
|
'Terminate the process': string;
|
|
78
111
|
'Save temporarily': string;
|
package/dist/locale/zh-CN.js
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
var zh_CN_default = {
|
|
4
4
|
Workflow: "\u5DE5\u4F5C\u6D41",
|
|
5
5
|
"Execution history": "\u6267\u884C\u5386\u53F2",
|
|
6
|
+
"Clear all executions": "\u6E05\u9664\u6240\u6709\u6267\u884C\u8BB0\u5F55",
|
|
7
|
+
"Clear executions will not reset executed count, and started executions will not be deleted, are you sure you want to delete them all?": "\u6E05\u7A7A\u6267\u884C\u8BB0\u5F55\u4E0D\u4F1A\u91CD\u7F6E\u6267\u884C\u6B21\u6570\uFF0C\u4E14\u6267\u884C\u4E2D\u7684\u4E5F\u4E0D\u4F1A\u88AB\u5220\u9664\uFF0C\u786E\u5B9A\u8981\u5220\u9664\u6240\u6709\u6267\u884C\u8BB0\u5F55\u5417\uFF1F",
|
|
6
8
|
Executed: "\u5DF2\u6267\u884C",
|
|
9
|
+
Sync: "\u540C\u6B65",
|
|
10
|
+
"Sync enabled status of all workflows from database": "\u4ECE\u6570\u636E\u5E93\u540C\u6B65\u6240\u6709\u5DE5\u4F5C\u6D41\u7684\u542F\u7528\u72B6\u6001",
|
|
7
11
|
"Trigger type": "\u89E6\u53D1\u65B9\u5F0F",
|
|
8
12
|
Status: "\u72B6\u6001",
|
|
9
13
|
On: "\u542F\u7528",
|
|
@@ -11,15 +15,35 @@ var zh_CN_default = {
|
|
|
11
15
|
Version: "\u7248\u672C",
|
|
12
16
|
"Copy to new version": "\u590D\u5236\u5230\u65B0\u7248\u672C",
|
|
13
17
|
Duplicate: "\u590D\u5236",
|
|
18
|
+
"Duplicate to new workflow": "\u590D\u5236\u4E3A\u65B0\u5DE5\u4F5C\u6D41",
|
|
14
19
|
"Delete a main version will cause all other revisions to be deleted too.": "\u5220\u9664\u4E3B\u7248\u672C\u5C06\u5BFC\u81F4\u5176\u4ED6\u7248\u672C\u4E00\u5E76\u88AB\u5220\u9664\u3002",
|
|
15
20
|
Loading: "\u52A0\u8F7D\u4E2D",
|
|
16
21
|
"Load failed": "\u52A0\u8F7D\u5931\u8D25",
|
|
22
|
+
"Use transaction": "\u542F\u7528\u4E8B\u52A1",
|
|
23
|
+
"Data operation nodes in workflow will run in a same transaction until any interruption. Any failure will cause data rollback, and will also rollback the history of the execution.": "\u5DE5\u4F5C\u6D41\u4E2D\u7684\u8282\u70B9\u5C06\u5728\u540C\u4E00\u4E2A\u4E8B\u52A1\u4E2D\u8FD0\u884C\u3002\u4EFB\u4F55\u5931\u8D25\u90FD\u4F1A\u5BFC\u81F4\u6570\u636E\u56DE\u6EDA\uFF0C\u540C\u65F6\u4E5F\u4F1A\u56DE\u6EDA\u76F8\u5E94\u7684\u6267\u884C\u5386\u53F2\u3002",
|
|
24
|
+
"Auto delete history when execution is on end status": "\u6267\u884C\u7ED3\u675F\u540E\u81EA\u52A8\u5220\u9664\u5BF9\u5E94\u72B6\u6001\u7684\u5386\u53F2\u8BB0\u5F55",
|
|
17
25
|
Trigger: "\u89E6\u53D1\u5668",
|
|
18
26
|
"Trigger variables": "\u89E6\u53D1\u5668\u53D8\u91CF",
|
|
19
27
|
"Trigger data": "\u89E6\u53D1\u6570\u636E",
|
|
20
28
|
"Trigger time": "\u89E6\u53D1\u65F6\u95F4",
|
|
21
29
|
"Triggered at": "\u89E6\u53D1\u65F6\u95F4",
|
|
30
|
+
"Form event": "\u8868\u5355\u4E8B\u4EF6",
|
|
31
|
+
"Event triggers when submitted a workflow bound form action.": "\u5728\u63D0\u4EA4\u7ED1\u5B9A\u5DE5\u4F5C\u6D41\u7684\u8868\u5355\u64CD\u4F5C\u6309\u94AE\u540E\u89E6\u53D1\u3002",
|
|
32
|
+
"Form data model": "\u8868\u5355\u6570\u636E\u6A21\u578B",
|
|
33
|
+
"Use a collection to match form data.": "\u4F7F\u7528\u4E00\u4E2A\u6570\u636E\u8868\u6765\u5339\u914D\u8868\u5355\u6570\u636E\u3002",
|
|
34
|
+
"Associations to use": "\u5F85\u4F7F\u7528\u7684\u5173\u7CFB\u6570\u636E",
|
|
35
|
+
"Bind workflows": "\u7ED1\u5B9A\u5DE5\u4F5C\u6D41",
|
|
36
|
+
"Workflow will be triggered after submitting succeeded.": "\u63D0\u4EA4\u6210\u529F\u540E\u89E6\u53D1\u5DE5\u4F5C\u6D41\u3002",
|
|
37
|
+
"Workflow will be triggered after saving succeeded.": "\u4FDD\u5B58\u6210\u529F\u540E\u89E6\u53D1\u5DE5\u4F5C\u6D41\u3002",
|
|
38
|
+
"Workflow will be triggered directly once the button clicked.": "\u6309\u94AE\u70B9\u51FB\u540E\u76F4\u63A5\u89E6\u53D1\u5DE5\u4F5C\u6D41\u3002",
|
|
39
|
+
"Submit to workflow": "\u63D0\u4EA4\u81F3\u5DE5\u4F5C\u6D41",
|
|
40
|
+
"Add workflow": "\u6DFB\u52A0\u5DE5\u4F5C\u6D41",
|
|
41
|
+
"Select workflow": "\u9009\u62E9\u5DE5\u4F5C\u6D41",
|
|
42
|
+
"Trigger data context": "\u89E6\u53D1\u6570\u636E\u4E0A\u4E0B\u6587",
|
|
43
|
+
"Full form data": "\u5B8C\u6574\u8868\u5355\u6570\u636E",
|
|
44
|
+
"Select context": "\u9009\u62E9\u4E0A\u4E0B\u6587",
|
|
22
45
|
"Collection event": "\u6570\u636E\u8868\u4E8B\u4EF6",
|
|
46
|
+
"Event will be triggered on collection data row created, updated or deleted.": "\u5F53\u6570\u636E\u8868\u4E2D\u7684\u6570\u636E\u88AB\u65B0\u589E\u3001\u66F4\u65B0\u6216\u5220\u9664\u65F6\u89E6\u53D1\u3002",
|
|
23
47
|
"Trigger on": "\u89E6\u53D1\u65F6\u673A",
|
|
24
48
|
"After record added": "\u65B0\u589E\u6570\u636E\u540E",
|
|
25
49
|
"After record updated": "\u66F4\u65B0\u6570\u636E\u540E",
|
|
@@ -31,6 +55,7 @@ var zh_CN_default = {
|
|
|
31
55
|
"Preload associations": "\u9884\u52A0\u8F7D\u5173\u8054\u6570\u636E",
|
|
32
56
|
"Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.": "\u8BF7\u9009\u4E2D\u9700\u8981\u5728\u540E\u7EED\u8282\u70B9\u4E2D\u88AB\u8BBF\u95EE\u7684\u5173\u7CFB\u5B57\u6BB5\u3002\u8D85\u8FC7\u4E24\u5C42\u7684\u5BF9\u591A\u5173\u8054\u53EF\u80FD\u4F1A\u5BFC\u81F4\u6027\u80FD\u95EE\u9898\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\u3002",
|
|
33
57
|
"Schedule event": "\u5B9A\u65F6\u4EFB\u52A1",
|
|
58
|
+
"Scheduled job base on time conditions.": "\u57FA\u4E8E\u65F6\u95F4\u6761\u4EF6\u7684\u8BA1\u5212\u4EFB\u52A1",
|
|
34
59
|
"Trigger mode": "\u89E6\u53D1\u6A21\u5F0F",
|
|
35
60
|
"Based on certain date": "\u81EA\u5B9A\u4E49\u65F6\u95F4",
|
|
36
61
|
"Based on date field of collection": "\u6839\u636E\u6570\u636E\u8868\u65F6\u95F4\u5B57\u6BB5",
|
|
@@ -75,6 +100,14 @@ var zh_CN_default = {
|
|
|
75
100
|
Aborted: "\u5DF2\u7EC8\u6B62",
|
|
76
101
|
Canceled: "\u5DF2\u53D6\u6D88",
|
|
77
102
|
Rejected: "\u5DF2\u62D2\u7EDD",
|
|
103
|
+
"Triggered but still waiting in queue to execute.": "\u5DF2\u89E6\u53D1\u4F46\u4ECD\u5728\u961F\u5217\u4E2D\u7B49\u5F85\u6267\u884C\u3002",
|
|
104
|
+
"Started and executing, maybe waiting for an async callback (manual, delay etc.).": "\u5DF2\u5F00\u59CB\u6267\u884C\uFF0C\u53EF\u80FD\u5728\u7B49\u5F85\u5F02\u6B65\u56DE\u8C03\uFF08\u4EBA\u5DE5\u3001\u5EF6\u65F6\u7B49\uFF09\u3002",
|
|
105
|
+
"Successfully finished.": "\u6210\u529F\u5B8C\u6210\u3002",
|
|
106
|
+
"Failed to satisfy node configurations.": "\u672A\u6EE1\u8DB3\u8282\u70B9\u914D\u7F6E\u9020\u6210\u7684\u5931\u8D25\u3002",
|
|
107
|
+
"Some node meets error.": "\u67D0\u4E2A\u8282\u70B9\u51FA\u9519\u3002",
|
|
108
|
+
"Running of some node was aborted by program flow.": "\u67D0\u4E2A\u8282\u70B9\u88AB\u7A0B\u5E8F\u6D41\u7A0B\u7EC8\u6B62\u3002",
|
|
109
|
+
"Manually canceled whole execution when waiting.": "\u7B49\u5F85\u65F6\u88AB\u624B\u52A8\u53D6\u6D88\u6574\u4E2A\u6267\u884C\u3002",
|
|
110
|
+
"Rejected from a manual node.": "\u88AB\u4EBA\u5DE5\u8282\u70B9\u62D2\u7EDD\u7EE7\u7EED\u3002",
|
|
78
111
|
"Continue the process": "\u7EE7\u7EED\u6D41\u7A0B",
|
|
79
112
|
"Terminate the process": "\u7EC8\u6B62\u6D41\u7A0B",
|
|
80
113
|
"Save temporarily": "\u6682\u5B58",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2023-08-
|
|
1
|
+
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2023-08-15T04:39:36.240Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"commonjs","_lastModified":"2023-08-
|
|
1
|
+
{"type":"commonjs","_lastModified":"2023-08-15T04:39:35.782Z"}
|
package/dist/server/Plugin.js
CHANGED
|
@@ -118,7 +118,12 @@ class WorkflowPlugin extends server.Plugin {
|
|
|
118
118
|
"flow_nodes:destroy"
|
|
119
119
|
]
|
|
120
120
|
});
|
|
121
|
+
this.app.acl.registerSnippet({
|
|
122
|
+
name: "ui.*",
|
|
123
|
+
actions: ["workflows:list"]
|
|
124
|
+
});
|
|
121
125
|
this.app.acl.allow("users_jobs", ["list", "get", "submit"], "loggedIn");
|
|
126
|
+
this.app.acl.allow("workflows", ["trigger"], "loggedIn");
|
|
122
127
|
await db.import({
|
|
123
128
|
directory: path__default.default.resolve(__dirname, "collections")
|
|
124
129
|
});
|
|
@@ -208,8 +213,7 @@ class WorkflowPlugin extends server.Plugin {
|
|
|
208
213
|
{
|
|
209
214
|
context,
|
|
210
215
|
key: workflow.key,
|
|
211
|
-
status: constants.EXECUTION_STATUS.QUEUEING
|
|
212
|
-
useTransaction: workflow.useTransaction
|
|
216
|
+
status: constants.EXECUTION_STATUS.QUEUEING
|
|
213
217
|
},
|
|
214
218
|
{ transaction }
|
|
215
219
|
);
|
|
@@ -275,6 +279,7 @@ class WorkflowPlugin extends server.Plugin {
|
|
|
275
279
|
}
|
|
276
280
|
}
|
|
277
281
|
async process(execution, job) {
|
|
282
|
+
var _a, _b;
|
|
278
283
|
if (execution.status === constants.EXECUTION_STATUS.QUEUEING) {
|
|
279
284
|
await execution.update({ status: constants.EXECUTION_STATUS.STARTED });
|
|
280
285
|
}
|
|
@@ -285,6 +290,9 @@ class WorkflowPlugin extends server.Plugin {
|
|
|
285
290
|
this.getLogger(execution.workflowId).info(
|
|
286
291
|
`execution (${execution.id}) finished with status: ${execution.status}`
|
|
287
292
|
);
|
|
293
|
+
if (execution.status && ((_b = (_a = execution.workflow.options) == null ? void 0 : _a.deleteExecutionOnStatus) == null ? void 0 : _b.includes(execution.status))) {
|
|
294
|
+
await execution.destroy();
|
|
295
|
+
}
|
|
288
296
|
} catch (err) {
|
|
289
297
|
this.getLogger(execution.workflowId).error(`execution (${execution.id}) error: ${err.message}`, err);
|
|
290
298
|
}
|