bpmn-engine 12.0.4 → 13.0.1
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/CHANGELOG.md +279 -0
- package/package.json +5 -5
- package/types/bpmn-engine.d.ts +502 -471
package/types/bpmn-engine.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Author : Saeed Tabrizi
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {EventEmitter} from 'events';
|
|
4
4
|
|
|
5
|
-
declare module
|
|
5
|
+
declare module 'bpmn-engine' {
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Engine emits the following events:
|
|
@@ -25,7 +25,16 @@ declare module "bpmn-engine" {
|
|
|
25
25
|
activity.throw: An recoverable error was thrown
|
|
26
26
|
activity.error: An non-recoverable error has occurred
|
|
27
27
|
*/
|
|
28
|
-
export type BpmnActivityEvent =
|
|
28
|
+
export type BpmnActivityEvent =
|
|
29
|
+
'activity.enter'
|
|
30
|
+
| 'activity.start'
|
|
31
|
+
| 'activity.wait'
|
|
32
|
+
| 'wait'
|
|
33
|
+
| 'activity.end'
|
|
34
|
+
| 'activity.leave'
|
|
35
|
+
| 'activity.stop'
|
|
36
|
+
| 'activity.throw'
|
|
37
|
+
| 'activity.error';
|
|
29
38
|
/**
|
|
30
39
|
* Sequence flow events
|
|
31
40
|
flow.take: The sequence flow was taken
|
|
@@ -33,163 +42,166 @@ declare module "bpmn-engine" {
|
|
|
33
42
|
flow.looped: The sequence is looped
|
|
34
43
|
*/
|
|
35
44
|
export type BpmnSequenceFlowEvent = 'flow.take' | 'flow.discard' | 'flow.looped';
|
|
36
|
-
export type BpmnEngineVariable = Record<string,any>;
|
|
45
|
+
export type BpmnEngineVariable = Record<string, any>;
|
|
37
46
|
|
|
38
47
|
export interface BpmnLogger {
|
|
39
48
|
debug(...args: any[]): void;
|
|
40
49
|
error(...args: any[]): void;
|
|
41
50
|
warn(...args: any[]): void;
|
|
42
51
|
}
|
|
43
|
-
|
|
44
|
-
|
|
52
|
+
|
|
53
|
+
export interface BpmnMessage {
|
|
54
|
+
id?: string,
|
|
55
|
+
executionId?: string,
|
|
56
|
+
[name: string]: any
|
|
45
57
|
}
|
|
46
58
|
|
|
47
59
|
export interface BpmnEngineBrokerExchange {
|
|
48
60
|
name: string;
|
|
49
61
|
type: 'topic' | 'direct';
|
|
50
62
|
options: any;
|
|
51
|
-
bindingCount:number;
|
|
63
|
+
bindingCount: number;
|
|
52
64
|
bindings: any[];
|
|
53
65
|
stopped: boolean;
|
|
54
|
-
bind(queue:string, pattern: string, bindOptions?: any):void;
|
|
55
|
-
close():void;
|
|
56
|
-
emit(eventName: string, content?:any): void;
|
|
57
|
-
getBinding(queueName:string, pattern:string):any;
|
|
58
|
-
getState<S>():S;
|
|
59
|
-
on(pattern:string, handler:()=>void, consumeOptions?: any):void;
|
|
60
|
-
off(pattern:string, handler:()=>void):void;
|
|
61
|
-
publish(routingKey:string, content?: any, properties?:any):void;
|
|
62
|
-
recover<S>(state:S, getQueue?:boolean):void;
|
|
63
|
-
stop():void;
|
|
64
|
-
unbind(queue:string, pattern:string):void;
|
|
65
|
-
unbindQueueByName(queueName:string): void;
|
|
66
|
+
bind(queue: string, pattern: string, bindOptions?: any): void;
|
|
67
|
+
close(): void;
|
|
68
|
+
emit(eventName: string, content?: any): void;
|
|
69
|
+
getBinding(queueName: string, pattern: string): any;
|
|
70
|
+
getState<S>(): S;
|
|
71
|
+
on(pattern: string, handler: () => void, consumeOptions?: any): void;
|
|
72
|
+
off(pattern: string, handler: () => void): void;
|
|
73
|
+
publish(routingKey: string, content?: any, properties?: any): void;
|
|
74
|
+
recover<S>(state: S, getQueue?: boolean): void;
|
|
75
|
+
stop(): void;
|
|
76
|
+
unbind(queue: string, pattern: string): void;
|
|
77
|
+
unbindQueueByName(queueName: string): void;
|
|
66
78
|
}
|
|
67
79
|
|
|
68
80
|
export interface BpmnEngineBrokerQueue {
|
|
69
81
|
name: string;
|
|
70
82
|
options: any;
|
|
71
83
|
messages: any[];
|
|
72
|
-
messageCount:number;
|
|
73
|
-
consumerCount:number;
|
|
84
|
+
messageCount: number;
|
|
85
|
+
consumerCount: number;
|
|
74
86
|
stopped: boolean;
|
|
75
87
|
exclusive: boolean;
|
|
76
88
|
maxLength: number;
|
|
77
89
|
readonly capacity: number;
|
|
78
90
|
messageTtl: number;
|
|
79
|
-
ack(message: any):void;
|
|
80
|
-
ackAll():void;
|
|
81
|
-
assertConsumer(onMessage:()=>void, consumeOptions?: any, owner?: any):void;
|
|
82
|
-
cancel(consumerTag:string):void;
|
|
83
|
-
close():void;
|
|
84
|
-
consume(onMessage:()=>void, consumeOptions?: any, owner?:any):void;
|
|
85
|
-
delete(deleteOptions?: any):void;
|
|
91
|
+
ack(message: any): void;
|
|
92
|
+
ackAll(): void;
|
|
93
|
+
assertConsumer(onMessage: () => void, consumeOptions?: any, owner?: any): void;
|
|
94
|
+
cancel(consumerTag: string): void;
|
|
95
|
+
close(): void;
|
|
96
|
+
consume(onMessage: () => void, consumeOptions?: any, owner?: any): void;
|
|
97
|
+
delete(deleteOptions?: any): void;
|
|
86
98
|
dequeueMessage(message: any): void;
|
|
87
|
-
dismiss(onMessage:()=>void): void;
|
|
99
|
+
dismiss(onMessage: () => void): void;
|
|
88
100
|
get<T>(consumeOptions?: any): T;
|
|
89
|
-
getState<S>():S
|
|
90
|
-
nack(message:any, allUpTo?:boolean, requeue?: boolean
|
|
91
|
-
nackAll(requeue: boolean):void;
|
|
92
|
-
off(eventName:string, handler:()=>void): void;
|
|
101
|
+
getState<S>(): S;
|
|
102
|
+
nack(message: any, allUpTo?: boolean, requeue?: boolean): void;
|
|
103
|
+
nackAll(requeue: boolean): void;
|
|
104
|
+
off(eventName: string, handler: () => void): void;
|
|
93
105
|
|
|
94
|
-
on(eventName:string, handler:()=>void):void;
|
|
106
|
+
on(eventName: string, handler: () => void): void;
|
|
95
107
|
|
|
96
108
|
peek(ignoreDelivered?: boolean): void;
|
|
97
|
-
purge():void;
|
|
109
|
+
purge(): void;
|
|
98
110
|
|
|
99
|
-
queueMessage(fields: any[], content?:any, properties?:any, onMessageQueued?:()=>void):void;
|
|
100
|
-
recover<S>(state:S):void;
|
|
101
|
-
reject(message:any, requeue?:boolean):void;
|
|
102
|
-
stop():void;
|
|
111
|
+
queueMessage(fields: any[], content?: any, properties?: any, onMessageQueued?: () => void): void;
|
|
112
|
+
recover<S>(state: S): void;
|
|
113
|
+
reject(message: any, requeue?: boolean): void;
|
|
114
|
+
stop(): void;
|
|
103
115
|
unbindConsumer(): void;
|
|
104
116
|
}
|
|
105
117
|
|
|
106
|
-
export interface BpmnEngineBrokerConsumer{
|
|
118
|
+
export interface BpmnEngineBrokerConsumer {
|
|
107
119
|
consumerTag: string;
|
|
108
120
|
noAck: any;
|
|
109
|
-
onMessage: ()=>void;
|
|
121
|
+
onMessage: () => void;
|
|
110
122
|
options: any;
|
|
111
123
|
priority: number;
|
|
112
|
-
queueName:string;
|
|
113
|
-
ackAll():void;
|
|
114
|
-
nackAll(requeue: boolean):void;
|
|
115
|
-
cancel():void;
|
|
124
|
+
queueName: string;
|
|
125
|
+
ackAll(): void;
|
|
126
|
+
nackAll(requeue: boolean): void;
|
|
127
|
+
cancel(): void;
|
|
116
128
|
}
|
|
117
129
|
|
|
118
|
-
export interface BpmnEngineBrokerMessage{
|
|
119
|
-
fields: {routingKey:string,redelivered:boolean,exchange: any,consumerTag:string}[];
|
|
130
|
+
export interface BpmnEngineBrokerMessage {
|
|
131
|
+
fields: {routingKey: string, redelivered: boolean, exchange: any, consumerTag: string}[];
|
|
120
132
|
content: any;
|
|
121
|
-
properties: {messageId: string,persistent: boolean,timestamp: Date,expiration:number};
|
|
122
|
-
ack(allUpTo?:boolean):void;
|
|
123
|
-
nack(allUpTo?: boolean, requeue?:boolean):void;
|
|
124
|
-
reject(requeue?: boolean
|
|
125
|
-
getRoutingKeyPattern(pattern: string): (test:string)=>boolean;
|
|
133
|
+
properties: {messageId: string, persistent: boolean, timestamp: Date, expiration: number};
|
|
134
|
+
ack(allUpTo?: boolean): void;
|
|
135
|
+
nack(allUpTo?: boolean, requeue?: boolean): void;
|
|
136
|
+
reject(requeue?: boolean): void;
|
|
137
|
+
getRoutingKeyPattern(pattern: string): (test: string) => boolean;
|
|
126
138
|
}
|
|
127
|
-
|
|
128
|
-
|
|
139
|
+
|
|
140
|
+
export interface BpmnEngineBroker<W> {
|
|
141
|
+
new(owner: W): BpmnEngineBroker<W>;
|
|
129
142
|
readonly owner: W;
|
|
130
|
-
assertExchange(exchangeName:string, type: string, options?:any):void;
|
|
131
|
-
deleteExchange(exchangeName:string, ifUnused?:boolean):void;
|
|
132
|
-
bindExchange(source:string, destination:string, pattern: string, ...args: any[]):void;
|
|
133
|
-
|
|
134
|
-
unbindExchange(source:string, destination:string, pattern?: string):void;
|
|
135
|
-
assertQueue(queueName:string, options?: any):void;
|
|
136
|
-
bindQueue(queueName:string, exchangeName:string, pattern:string, options?: any):void;
|
|
137
|
-
unbindQueue(queueName:string, exchangeName:string, pattern:string):void;
|
|
138
|
-
|
|
139
|
-
consume(queueName:string, onMessage:()=>void, options?:any):void;
|
|
140
|
-
cancel(consumerTag:string):void;
|
|
141
|
-
createQueue<Q>():Q;
|
|
142
|
-
deleteQueue(queueName:string
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
publish(exchangeName:string, routingKey:string, content?:any, options?: any):void;
|
|
143
|
+
assertExchange(exchangeName: string, type: string, options?: any): void;
|
|
144
|
+
deleteExchange(exchangeName: string, ifUnused?: boolean): void;
|
|
145
|
+
bindExchange(source: string, destination: string, pattern: string, ...args: any[]): void;
|
|
146
|
+
|
|
147
|
+
unbindExchange(source: string, destination: string, pattern?: string): void;
|
|
148
|
+
assertQueue(queueName: string, options?: any): void;
|
|
149
|
+
bindQueue(queueName: string, exchangeName: string, pattern: string, options?: any): void;
|
|
150
|
+
unbindQueue(queueName: string, exchangeName: string, pattern: string): void;
|
|
151
|
+
|
|
152
|
+
consume(queueName: string, onMessage: () => void, options?: any): void;
|
|
153
|
+
cancel(consumerTag: string): void;
|
|
154
|
+
createQueue<Q>(): Q;
|
|
155
|
+
deleteQueue(queueName: string, options?: {ifUnused: boolean, ifEmpty?: boolean}): void;
|
|
156
|
+
|
|
157
|
+
getExchange<T>(exchangeName: string): T;
|
|
158
|
+
getQueue<Q>(queueName: string): Q;
|
|
159
|
+
getConsumers<C>(): C[];
|
|
160
|
+
getConsumer<C>(consumerTag: string): C;
|
|
161
|
+
getState<S>(): S;
|
|
162
|
+
recover<S>(state?: S): void;
|
|
163
|
+
purgeQueue(queueName: string): void;
|
|
164
|
+
sendToQueue(queueName: string, content: any, options?: any): void;
|
|
165
|
+
stop(): void;
|
|
166
|
+
get(queueName: string, options?: any): void;
|
|
167
|
+
|
|
168
|
+
ack(message: any, allUpTo?: boolean): void;
|
|
169
|
+
ackAll(): void;
|
|
170
|
+
nack(message: any, allUpTo?: boolean, requeue?: boolean): void;
|
|
171
|
+
nackAll(requeue?: boolean): void;
|
|
172
|
+
reject(message: any, requeue?: boolean): void;
|
|
173
|
+
|
|
174
|
+
createShovel<S>(name: string, source: string, destination: string, options?: any): S;
|
|
175
|
+
getShovel<S>(name: string): S;
|
|
176
|
+
closeShovel(name: string): void;
|
|
177
|
+
prefetch(count: number): void;
|
|
178
|
+
|
|
179
|
+
reset(): void;
|
|
180
|
+
on(eventName: string, handler: () => void): void;
|
|
181
|
+
off(eventName: string, handler: () => void): void;
|
|
182
|
+
unsubscribe(queueName: string, onMessage: () => void): void;
|
|
183
|
+
cancel(eventName: string): void;
|
|
184
|
+
subscribe(exchangeName: string, pattern: string, queueName: string, onMessage: () => void, options?: any): void;
|
|
185
|
+
subscribeTmp(exchangeName: string, pattern: string, queueName: string, onMessage: () => void, options?: any): void;
|
|
186
|
+
subscribeOnce(exchangeName: string, pattern: string, queueName: string, onMessage: () => void, options?: any): void;
|
|
187
|
+
publish(exchangeName: string, routingKey: string, content?: any, options?: any): void;
|
|
176
188
|
close(): void;
|
|
177
189
|
|
|
178
|
-
|
|
190
|
+
}
|
|
179
191
|
|
|
180
|
-
|
|
192
|
+
export interface BpmnEngineExecuteOptions {
|
|
181
193
|
variables?: BpmnEngineVariable;
|
|
182
194
|
listener?: EventEmitter;
|
|
183
195
|
services?: BpmnEngineService;
|
|
184
196
|
|
|
185
|
-
|
|
197
|
+
/**
|
|
186
198
|
* optional override expressions handler
|
|
187
199
|
*/
|
|
188
200
|
expressions?: BpmnEngineExpressions;
|
|
189
|
-
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export interface BpmnEngineOptions {
|
|
190
204
|
|
|
191
|
-
export interface BpmnEngineOptions {
|
|
192
|
-
|
|
193
205
|
/**
|
|
194
206
|
* optional name of engine,
|
|
195
207
|
*/
|
|
@@ -203,28 +215,28 @@ declare module "bpmn-engine" {
|
|
|
203
215
|
*/
|
|
204
216
|
sourceContext?: any;
|
|
205
217
|
variables?: BpmnEngineVariable;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
Logger?: BpmnLogger;
|
|
210
|
-
|
|
218
|
+
/**
|
|
219
|
+
* optional Logger factory, defaults to debug logger
|
|
220
|
+
*/
|
|
221
|
+
Logger?: (scope: string) => BpmnLogger;
|
|
222
|
+
|
|
211
223
|
/**
|
|
212
224
|
* optional inline script handler, defaults to nodejs vm module handling, i.e. JavaScript
|
|
213
225
|
*/
|
|
214
226
|
scripts?: any;
|
|
215
|
-
|
|
227
|
+
|
|
216
228
|
listener?: EventEmitter;
|
|
217
229
|
// tslint:disable-next-line:ban-types
|
|
218
230
|
services?: BpmnEngineService;
|
|
219
|
-
|
|
231
|
+
|
|
220
232
|
elements?: any;
|
|
221
|
-
|
|
233
|
+
|
|
222
234
|
typeResolver?: <R>(...elements: any) => R;
|
|
223
235
|
/**
|
|
224
236
|
* optional bpmn-moddle options to be passed to bpmn-moddle
|
|
225
237
|
*/
|
|
226
238
|
moddleOptions?: any;
|
|
227
|
-
|
|
239
|
+
|
|
228
240
|
extensions?: BpmnEngineExtension;
|
|
229
241
|
/**
|
|
230
242
|
* optional override expressions handler
|
|
@@ -232,10 +244,10 @@ declare module "bpmn-engine" {
|
|
|
232
244
|
expressions?: BpmnEngineExpressions;
|
|
233
245
|
}
|
|
234
246
|
|
|
235
|
-
export interface BpmnEngineExtension{
|
|
236
|
-
[name: string]: (activiy?:BpmnEngineActivity,environment?:BpmnEngineExecutionEnvironment)=>void;
|
|
247
|
+
export interface BpmnEngineExtension {
|
|
248
|
+
[name: string]: (activiy?: BpmnEngineActivity, environment?: BpmnEngineExecutionEnvironment) => void;
|
|
237
249
|
}
|
|
238
|
-
|
|
250
|
+
|
|
239
251
|
export interface BpmnEngineExpressions {
|
|
240
252
|
resolveExpression<R>(
|
|
241
253
|
expression: string,
|
|
@@ -243,6 +255,7 @@ declare module "bpmn-engine" {
|
|
|
243
255
|
expressionFnContext?: any,
|
|
244
256
|
): R;
|
|
245
257
|
}
|
|
258
|
+
|
|
246
259
|
export interface BpmnEngine {
|
|
247
260
|
new(options?: BpmnEngineOptions): BpmnEngine;
|
|
248
261
|
|
|
@@ -274,22 +287,26 @@ declare module "bpmn-engine" {
|
|
|
274
287
|
* engine logger
|
|
275
288
|
*/
|
|
276
289
|
readonly logger: BpmnLogger;
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* execute definition
|
|
293
|
+
* @param options Optional object with options to override the initial engine options
|
|
294
|
+
* @param cb Callback called before the throw
|
|
295
|
+
* @summary Execute options overrides the initial options passed to the engine before executing the definition.
|
|
296
|
+
*/
|
|
297
|
+
execute(options?:BpmnEngineExecuteOptions, cb?: (err) => void): Promise<BpmnEngineExecutionApi>;
|
|
298
|
+
|
|
283
299
|
/**
|
|
284
300
|
* get definition by id
|
|
285
301
|
* @param id id of definition
|
|
286
302
|
*/
|
|
287
303
|
getDefinitionById(id: string): Promise<any>;
|
|
288
|
-
|
|
304
|
+
|
|
289
305
|
/**
|
|
290
306
|
* get all definitions
|
|
291
307
|
*/
|
|
292
308
|
getDefinitions(): Promise<any[]>;
|
|
309
|
+
|
|
293
310
|
/**
|
|
294
311
|
* get execution serialized state
|
|
295
312
|
*/
|
|
@@ -300,14 +317,14 @@ declare module "bpmn-engine" {
|
|
|
300
317
|
* @param state engine state
|
|
301
318
|
* @param recoverOptions optional object with options that will completely override the options passed to the engine at init
|
|
302
319
|
*/
|
|
303
|
-
recover(state: any,recoverOptions?:BpmnEngineOptions): BpmnEngine;
|
|
320
|
+
recover(state: any, recoverOptions?: BpmnEngineOptions): BpmnEngine;
|
|
304
321
|
|
|
305
322
|
/**
|
|
306
323
|
* Resume execution function with previously saved engine state.
|
|
307
|
-
* @param options
|
|
308
|
-
* @param callback
|
|
324
|
+
* @param options
|
|
325
|
+
* @param callback
|
|
309
326
|
*/
|
|
310
|
-
resume(options?: BpmnEngineExecuteOptions, callback?:()=> void): Promise<BpmnEngineExecutionApi>;
|
|
327
|
+
resume(options?: BpmnEngineExecuteOptions, callback?: () => void): Promise<BpmnEngineExecutionApi>;
|
|
311
328
|
|
|
312
329
|
/**
|
|
313
330
|
* Stop execution. The instance is terminated.
|
|
@@ -317,403 +334,417 @@ declare module "bpmn-engine" {
|
|
|
317
334
|
waitFor<R>(eventName: string): Promise<R>;
|
|
318
335
|
|
|
319
336
|
/**
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
337
|
+
* Add definition source by source context.
|
|
338
|
+
* @param options
|
|
339
|
+
*/
|
|
323
340
|
addSource(options?: {sourceContext: any}): void;
|
|
324
341
|
|
|
325
342
|
}
|
|
326
343
|
|
|
327
|
-
export function Engine(options?:BpmnEngineOptions): BpmnEngine;
|
|
344
|
+
export function Engine(options?: BpmnEngineOptions): BpmnEngine;
|
|
328
345
|
|
|
329
|
-
export interface BpmnEngineExecution {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
346
|
+
export interface BpmnEngineExecution {
|
|
347
|
+
definitions: BpmnEngineExecutionDefinition[];
|
|
348
|
+
state: 'idle' | 'running';
|
|
349
|
+
environment: BpmnEngineExecutionEnvironment;
|
|
333
350
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
351
|
+
stopped: boolean;
|
|
352
|
+
execute(executeOptions?: any): BpmnEngineExecutionApi;
|
|
353
|
+
getState<R>(): R;
|
|
337
354
|
|
|
338
|
-
|
|
355
|
+
resume(resumeOptions?: any): void;
|
|
339
356
|
|
|
340
|
-
|
|
357
|
+
stop(): void;
|
|
341
358
|
|
|
342
|
-
}
|
|
359
|
+
}
|
|
343
360
|
|
|
344
|
-
export interface BpmnEngineExecutionContext {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
361
|
+
export interface BpmnEngineExecutionContext {
|
|
362
|
+
id: string;
|
|
363
|
+
name: string;
|
|
364
|
+
type: string;
|
|
365
|
+
sid: any;
|
|
366
|
+
definitionContext: any;
|
|
367
|
+
environment: BpmnEngineExecutionEnvironment;
|
|
351
368
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
369
|
+
clone(
|
|
370
|
+
environment?: BpmnEngineExecutionEnvironment
|
|
371
|
+
): BpmnEngineExecutionContext;
|
|
372
|
+
getActivities(scopeId?: string): BpmnEngineActivity[];
|
|
373
|
+
getActivityById(id: string): BpmnEngineActivity;
|
|
374
|
+
getExecutableProcesses(): any[];
|
|
375
|
+
getDataObjectById(id: string): any;
|
|
359
376
|
|
|
360
|
-
|
|
377
|
+
getMessageFlows(): any[];
|
|
361
378
|
|
|
362
|
-
|
|
379
|
+
getProcessById(id: string): any;
|
|
363
380
|
|
|
364
|
-
|
|
381
|
+
getProcesses(): any;
|
|
365
382
|
|
|
366
|
-
|
|
383
|
+
getSequenceFlowById(id: string): any;
|
|
367
384
|
|
|
368
|
-
|
|
385
|
+
getSequenceFlows(scopeId: string): any[];
|
|
369
386
|
|
|
370
|
-
|
|
371
|
-
|
|
387
|
+
getInboundSequenceFlows(activityId: string): any[];
|
|
388
|
+
getOutboundSequenceFlows(activityId: string): any[];
|
|
372
389
|
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
export interface BpmnProcess {
|
|
376
|
-
new (processDefinition: any, context: BpmnEngineExecutionContext): BpmnProcess;
|
|
377
|
-
readonly id: string;
|
|
378
|
-
readonly type: string;
|
|
379
|
-
readonly name: string;
|
|
380
|
-
readonly isExecutable: boolean;
|
|
381
|
-
readonly broker: BpmnEngineBroker<BpmnEngine>;
|
|
382
|
-
|
|
383
|
-
readonly context: BpmnEngineExecutionContext;
|
|
384
|
-
readonly counters: Record<string,number>;
|
|
385
|
-
readonly environment: BpmnEngineExecutionEnvironment;
|
|
386
|
-
readonly execution: BpmnEngineExecutionApi;
|
|
387
|
-
readonly executionId: string;
|
|
388
|
-
readonly isRunning: boolean;
|
|
389
|
-
|
|
390
|
-
readonly logger: BpmnLogger;
|
|
391
|
-
readonly parent: BpmnProcess;
|
|
392
|
-
readonly status: any;
|
|
393
|
-
|
|
394
|
-
readonly stopped: boolean;
|
|
395
|
-
|
|
396
|
-
getApi(message: any): BpmnEngineExecutionApi;
|
|
397
|
-
getActivities(): BpmnEngineActivity[];
|
|
398
|
-
getActivityById(id: string): BpmnEngineActivity;
|
|
399
|
-
|
|
400
|
-
getSequenceFlows(): any[];
|
|
401
|
-
getPostponed(): BpmnEngineActivity[];
|
|
402
|
-
|
|
403
|
-
getState<S>(): S;
|
|
404
|
-
|
|
405
|
-
recover<S>(state: S): void;
|
|
406
|
-
resume(): void;
|
|
407
|
-
run(): void;
|
|
408
|
-
stop(): void;
|
|
409
|
-
waitFor<R>(eventName: string): Promise<R>;
|
|
410
|
-
}
|
|
390
|
+
loadExtensions(activity: BpmnEngineActivity): void;
|
|
391
|
+
}
|
|
411
392
|
|
|
412
|
-
export interface
|
|
413
|
-
|
|
414
|
-
readonly type: string;
|
|
415
|
-
readonly name: string;
|
|
393
|
+
export interface BpmnProcess {
|
|
394
|
+
new(processDefinition: any, context: BpmnEngineExecutionContext): BpmnProcess;
|
|
416
395
|
|
|
417
|
-
|
|
396
|
+
readonly id: string;
|
|
397
|
+
readonly type: string;
|
|
398
|
+
readonly name: string;
|
|
399
|
+
readonly isExecutable: boolean;
|
|
400
|
+
readonly broker: BpmnEngineBroker<BpmnEngine>;
|
|
418
401
|
|
|
419
|
-
|
|
402
|
+
readonly context: BpmnEngineExecutionContext;
|
|
403
|
+
readonly counters: Record<string, number>;
|
|
404
|
+
readonly environment: BpmnEngineExecutionEnvironment;
|
|
405
|
+
readonly execution: BpmnEngineExecutionApi;
|
|
406
|
+
readonly executionId: string;
|
|
407
|
+
readonly isRunning: boolean;
|
|
420
408
|
|
|
421
|
-
|
|
409
|
+
readonly logger: BpmnLogger;
|
|
410
|
+
readonly parent: BpmnProcess;
|
|
411
|
+
readonly status: any;
|
|
422
412
|
|
|
423
|
-
|
|
413
|
+
readonly stopped: boolean;
|
|
424
414
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
readonly executionId: string;
|
|
429
|
-
readonly extensions: BpmnEngineExtension;
|
|
430
|
-
readonly logger: BpmnLogger;
|
|
431
|
-
readonly inbound: any[];
|
|
432
|
-
readonly isRunning: boolean;
|
|
433
|
-
readonly isStart: boolean;
|
|
434
|
-
readonly isSubProcess: boolean;
|
|
415
|
+
getApi(message: any): BpmnEngineExecutionApi;
|
|
416
|
+
getActivities(): BpmnEngineActivity[];
|
|
417
|
+
getActivityById(id: string): BpmnEngineActivity;
|
|
435
418
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
readonly status: any;
|
|
439
|
-
readonly stopped: boolean;
|
|
419
|
+
getSequenceFlows(): any[];
|
|
420
|
+
getPostponed(): BpmnEngineActivity[];
|
|
440
421
|
|
|
441
|
-
|
|
422
|
+
getState<S>(): S;
|
|
442
423
|
|
|
443
|
-
|
|
424
|
+
recover<S>(state: S): void;
|
|
425
|
+
resume(): void;
|
|
426
|
+
run(): void;
|
|
427
|
+
stop(): void;
|
|
428
|
+
waitFor<R>(eventName: string): Promise<R>;
|
|
429
|
+
}
|
|
444
430
|
|
|
445
|
-
|
|
431
|
+
export interface BpmnEngineActivity extends EventEmitter {
|
|
432
|
+
readonly id: string;
|
|
433
|
+
readonly type: string;
|
|
434
|
+
readonly name: string;
|
|
446
435
|
|
|
447
|
-
|
|
436
|
+
readonly attachedTo: any;
|
|
448
437
|
|
|
449
|
-
|
|
438
|
+
readonly Behaviour: any;
|
|
450
439
|
|
|
451
|
-
|
|
440
|
+
readonly behaviour: any;
|
|
452
441
|
|
|
453
|
-
|
|
454
|
-
signal: (message?: BpmnMessage, options?: any) => void;
|
|
455
|
-
next(): void;
|
|
442
|
+
readonly broker: BpmnEngineBroker<BpmnEngine>;
|
|
456
443
|
|
|
457
|
-
|
|
444
|
+
readonly counters: Record<string, number>;
|
|
445
|
+
readonly environment: BpmnEngineExecutionEnvironment;
|
|
446
|
+
readonly execution: BpmnEngineExecutionApi;
|
|
447
|
+
readonly executionId: string;
|
|
448
|
+
readonly extensions: BpmnEngineExtension;
|
|
449
|
+
readonly logger: BpmnLogger;
|
|
450
|
+
readonly inbound: any[];
|
|
451
|
+
readonly isRunning: boolean;
|
|
452
|
+
readonly isStart: boolean;
|
|
453
|
+
readonly isSubProcess: boolean;
|
|
454
|
+
|
|
455
|
+
readonly outbound: any[];
|
|
456
|
+
readonly parent?: BpmnEngineActivity | BpmnProcess;
|
|
457
|
+
readonly status: any;
|
|
458
|
+
readonly stopped: boolean;
|
|
458
459
|
|
|
459
|
-
|
|
460
|
+
activate(): void;
|
|
460
461
|
|
|
461
|
-
|
|
462
|
+
deactivate(): void;
|
|
462
463
|
|
|
463
|
-
|
|
464
|
+
discard(): void;
|
|
464
465
|
|
|
465
|
-
|
|
466
|
-
}
|
|
466
|
+
getApi(message?: any): BpmnEngineExecutionApi;
|
|
467
467
|
|
|
468
|
-
|
|
469
|
-
[name: string]: Function
|
|
470
|
-
}
|
|
471
|
-
export interface BpmnEngineExecutionEnvironment {
|
|
472
|
-
readonly options: any;
|
|
473
|
-
readonly extensions: BpmnEngineExtension;
|
|
468
|
+
getActivityById(id: string): BpmnEngineActivity;
|
|
474
469
|
|
|
475
|
-
|
|
476
|
-
readonly output: any;
|
|
477
|
-
readonly variables: BpmnEngineVariable;
|
|
470
|
+
getState<S>(): S;
|
|
478
471
|
|
|
479
|
-
|
|
472
|
+
message(messageContent: any): void;
|
|
473
|
+
signal: (message?: BpmnMessage, options?: any) => void;
|
|
474
|
+
next(): void;
|
|
480
475
|
|
|
481
|
-
|
|
482
|
-
readonly services: BpmnEngineService;
|
|
483
|
-
// tslint:disable: ban-types
|
|
484
|
-
addService(name: string, serviceFn: Function): void;
|
|
485
|
-
assignVariables(...vars: any): void;
|
|
486
|
-
clone(overrideOptions?: any): BpmnEngineExecutionEnvironment;
|
|
487
|
-
getScript(scriptType: string, activity: any): any;
|
|
488
|
-
getServiceByName(name: string): any;
|
|
476
|
+
recover<S>(state: S): void;
|
|
489
477
|
|
|
490
|
-
|
|
478
|
+
resume(): void;
|
|
491
479
|
|
|
492
|
-
|
|
480
|
+
run(runContent?: any): void;
|
|
493
481
|
|
|
494
|
-
|
|
495
|
-
expression: any,
|
|
496
|
-
message?: any,
|
|
497
|
-
expressionFnContext?: any,
|
|
498
|
-
): R;
|
|
482
|
+
stop(): void;
|
|
499
483
|
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
484
|
+
waitFor<R>(eventName: string): Promise<R>;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export interface BpmnEngineService {
|
|
488
|
+
[name: string]: Function;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export interface BpmnEngineExecutionEnvironment {
|
|
492
|
+
readonly options: any;
|
|
493
|
+
readonly extensions: BpmnEngineExtension;
|
|
494
|
+
|
|
495
|
+
readonly scripts: any;
|
|
496
|
+
readonly output: any;
|
|
497
|
+
readonly variables: BpmnEngineVariable;
|
|
498
|
+
|
|
499
|
+
readonly settings: any;
|
|
500
|
+
|
|
501
|
+
readonly Logger: BpmnLogger;
|
|
502
|
+
readonly services: BpmnEngineService;
|
|
503
|
+
|
|
504
|
+
// tslint:disable: ban-types
|
|
505
|
+
addService(name: string, serviceFn: Function): void;
|
|
506
|
+
assignVariables(...vars: any): void;
|
|
507
|
+
clone(overrideOptions?: any): BpmnEngineExecutionEnvironment;
|
|
508
|
+
getScript(scriptType: string, activity: any): any;
|
|
509
|
+
getServiceByName(name: string): any;
|
|
510
|
+
|
|
511
|
+
getState(): BpmnEngineExecutionState;
|
|
512
|
+
|
|
513
|
+
registerScript(activity: any): void;
|
|
514
|
+
|
|
515
|
+
resolveExpression<R>(
|
|
516
|
+
expression: any,
|
|
517
|
+
message?: any,
|
|
518
|
+
expressionFnContext?: any,
|
|
519
|
+
): R;
|
|
520
|
+
|
|
521
|
+
recover(state: any): void;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export interface BpmnExecutionEventMessageContent {
|
|
525
|
+
id: string;
|
|
526
|
+
type: string;
|
|
527
|
+
executionId: string;
|
|
528
|
+
parent?: BpmnExecutionEventMessageContent;
|
|
529
|
+
path?: BpmnExecutionEventMessageContent[];
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface BpmnExecutionEventMessageApi {
|
|
533
|
+
readonly id: string;
|
|
534
|
+
readonly type: string;
|
|
535
|
+
readonly name: string;
|
|
536
|
+
readonly executionId: string;
|
|
537
|
+
readonly environment: BpmnEngineExecutionEnvironment;
|
|
538
|
+
readonly fields: any;
|
|
539
|
+
|
|
540
|
+
readonly content: BpmnExecutionEventMessageContent;
|
|
541
|
+
readonly messageProperties: any;
|
|
542
|
+
readonly owner: BpmnEngine;
|
|
543
|
+
|
|
544
|
+
cancel(): void;
|
|
545
|
+
discard(): void;
|
|
546
|
+
signal(message: string, options: any): void;
|
|
547
|
+
stop(): void;
|
|
548
|
+
|
|
549
|
+
resolveExpression<R>(expression: any): R;
|
|
550
|
+
createMessage(overrideContent?: any): BpmnExecutionEventMessageApi;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export interface BpmnEngineExecutionDefinition extends EventEmitter {
|
|
554
|
+
state: 'pending' | 'running' | 'completed';
|
|
555
|
+
run: (callback?: any) => void;
|
|
556
|
+
resume: (callback?: any) => void;
|
|
557
|
+
|
|
558
|
+
recover: (state?: any) => void;
|
|
559
|
+
|
|
560
|
+
sendMessage: (message: any) => void;
|
|
561
|
+
|
|
562
|
+
executionId: string;
|
|
563
|
+
execution: BpmnEngineExecutionApi;
|
|
564
|
+
getProcesses: () => any[];
|
|
565
|
+
|
|
566
|
+
getExecutableProcesses: () => any[];
|
|
567
|
+
getApi: <T>(message: any) => T;
|
|
568
|
+
getElementById: (elementId: string) => any;
|
|
569
|
+
getActivityById: (childId: string) => any;
|
|
570
|
+
environment: BpmnEngineExecutionEnvironment;
|
|
571
|
+
status: string;
|
|
572
|
+
stopped: boolean;
|
|
573
|
+
type: string;
|
|
574
|
+
signal: (message: BpmnMessage, options?: any) => void;
|
|
575
|
+
cancelActivity: (message?: any) => void;
|
|
576
|
+
shake: (activityId?: string) => any;
|
|
577
|
+
broker: BpmnEngineBroker<BpmnEngine>;
|
|
578
|
+
id: string;
|
|
579
|
+
isRunning: boolean;
|
|
580
|
+
name: string;
|
|
581
|
+
logger: BpmnLogger;
|
|
582
|
+
waitFor(name: string, fn: Function): void;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export interface BpmnEngineExecutionDefinitionState {
|
|
586
|
+
readonly state: 'pending' | 'running' | 'completed';
|
|
587
|
+
readonly processes: {
|
|
588
|
+
[processId: string]: {
|
|
589
|
+
variables: BpmnEngineVariable;
|
|
590
|
+
services: BpmnEngineService;
|
|
591
|
+
children: BpmnEngineExecutionState[];
|
|
592
|
+
};
|
|
567
593
|
};
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
export interface BpmnEngineExecutionState {
|
|
571
|
-
readonly name: string;
|
|
572
|
-
readonly state: "idle" | "running";
|
|
573
|
-
readonly stopped: boolean;
|
|
574
|
-
readonly engineVersion: string;
|
|
575
|
-
readonly environment: BpmnEngineExecutionEnvironment;
|
|
576
|
-
readonly definitions: BpmnEngineExecutionDefinitionState[];
|
|
577
|
-
|
|
578
|
-
readonly entered: boolean;
|
|
579
|
-
}
|
|
594
|
+
}
|
|
580
595
|
|
|
581
|
-
export interface
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
name: string;
|
|
589
|
-
/**
|
|
590
|
-
* state of execution, i.e running or idle
|
|
591
|
-
*
|
|
592
|
-
* @type {("running"| "idle")}
|
|
593
|
-
*
|
|
594
|
-
*/
|
|
595
|
-
state: "running" | "idle";
|
|
596
|
-
/**
|
|
597
|
-
* is the execution stopped
|
|
598
|
-
*
|
|
599
|
-
* @type {boolean}
|
|
600
|
-
*
|
|
601
|
-
*/
|
|
602
|
-
stopped: boolean;
|
|
603
|
-
/**
|
|
604
|
-
* engine environment
|
|
605
|
-
*
|
|
606
|
-
* @type {BpmnEngineExecutionEnvironment}
|
|
607
|
-
*
|
|
608
|
-
*/
|
|
609
|
-
environment: BpmnEngineExecutionEnvironment;
|
|
596
|
+
export interface BpmnEngineExecutionState {
|
|
597
|
+
readonly name: string;
|
|
598
|
+
readonly state: 'idle' | 'running';
|
|
599
|
+
readonly stopped: boolean;
|
|
600
|
+
readonly engineVersion: string;
|
|
601
|
+
readonly environment: BpmnEngineExecutionEnvironment;
|
|
602
|
+
readonly definitions: BpmnEngineExecutionDefinitionState[];
|
|
610
603
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
*
|
|
614
|
-
* @type {BpmnEngineExecutionDefinition}
|
|
615
|
-
*
|
|
616
|
-
*/
|
|
617
|
-
definitions: BpmnEngineExecutionDefinition;
|
|
618
|
-
/**
|
|
619
|
-
* get execution serializable state
|
|
620
|
-
*
|
|
621
|
-
* @returns {BpmnEngineExecutionState}
|
|
622
|
-
*
|
|
623
|
-
*/
|
|
624
|
-
getState(): BpmnEngineExecutionState;
|
|
604
|
+
readonly entered: boolean;
|
|
605
|
+
}
|
|
625
606
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
607
|
+
export interface BpmnEngineEventApi {
|
|
608
|
+
/**
|
|
609
|
+
* engine name
|
|
610
|
+
*
|
|
611
|
+
* @type {string}
|
|
612
|
+
*
|
|
613
|
+
*/
|
|
614
|
+
name: string;
|
|
615
|
+
/**
|
|
616
|
+
* state of execution, i.e running or idle
|
|
617
|
+
*
|
|
618
|
+
* @type {("running"| "idle")}
|
|
619
|
+
*
|
|
620
|
+
*/
|
|
621
|
+
state: 'running' | 'idle';
|
|
622
|
+
/**
|
|
623
|
+
* is the execution stopped
|
|
624
|
+
*
|
|
625
|
+
* @type {boolean}
|
|
626
|
+
*
|
|
627
|
+
*/
|
|
628
|
+
stopped: boolean;
|
|
629
|
+
/**
|
|
630
|
+
* engine environment
|
|
631
|
+
*
|
|
632
|
+
* @type {BpmnEngineExecutionEnvironment}
|
|
633
|
+
*
|
|
634
|
+
*/
|
|
635
|
+
environment: BpmnEngineExecutionEnvironment;
|
|
633
636
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
readonly name: string;
|
|
642
|
-
/**
|
|
643
|
-
* state of execution, i.e running or idle
|
|
644
|
-
*
|
|
645
|
-
* @type {("running"| "idle")}
|
|
646
|
-
*
|
|
647
|
-
*/
|
|
648
|
-
readonly state: "running" | "idle";
|
|
649
|
-
/**
|
|
650
|
-
* is the execution stopped
|
|
651
|
-
*
|
|
652
|
-
* @type {boolean}
|
|
653
|
-
*
|
|
654
|
-
*/
|
|
655
|
-
readonly stopped: boolean;
|
|
656
|
-
/**
|
|
657
|
-
* engine environment
|
|
658
|
-
*
|
|
659
|
-
* @type {BpmnEngineExecutionEnvironment}
|
|
660
|
-
*
|
|
661
|
-
*/
|
|
662
|
-
readonly environment: BpmnEngineExecutionEnvironment;
|
|
637
|
+
/**
|
|
638
|
+
* executing definitions
|
|
639
|
+
*
|
|
640
|
+
* @type {BpmnEngineExecutionDefinition}
|
|
641
|
+
*
|
|
642
|
+
*/
|
|
643
|
+
definitions: BpmnEngineExecutionDefinition;
|
|
663
644
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
645
|
+
/**
|
|
646
|
+
* get execution serializable state
|
|
647
|
+
*
|
|
648
|
+
* @returns {BpmnEngineExecutionState}
|
|
649
|
+
*
|
|
650
|
+
*/
|
|
651
|
+
getState(): BpmnEngineExecutionState;
|
|
671
652
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
*
|
|
680
|
-
* @returns {BpmnEngineExecutionState}
|
|
681
|
-
*
|
|
682
|
-
*/
|
|
683
|
-
getState(): BpmnEngineExecutionState;
|
|
653
|
+
/**
|
|
654
|
+
* get activities in a postponed state
|
|
655
|
+
*
|
|
656
|
+
*
|
|
657
|
+
*/
|
|
658
|
+
getPostponed(): any[];
|
|
659
|
+
}
|
|
684
660
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
661
|
+
export interface BpmnEngineExecutionApi {
|
|
662
|
+
/**
|
|
663
|
+
* engine name
|
|
664
|
+
*
|
|
665
|
+
* @type {string}
|
|
666
|
+
* @
|
|
667
|
+
*/
|
|
668
|
+
readonly name: string;
|
|
669
|
+
/**
|
|
670
|
+
* state of execution, i.e running or idle
|
|
671
|
+
*
|
|
672
|
+
* @type {("running"| "idle")}
|
|
673
|
+
*
|
|
674
|
+
*/
|
|
675
|
+
readonly state: 'running' | 'idle';
|
|
676
|
+
/**
|
|
677
|
+
* is the execution stopped
|
|
678
|
+
*
|
|
679
|
+
* @type {boolean}
|
|
680
|
+
*
|
|
681
|
+
*/
|
|
682
|
+
readonly stopped: boolean;
|
|
683
|
+
/**
|
|
684
|
+
* engine environment
|
|
685
|
+
*
|
|
686
|
+
* @type {BpmnEngineExecutionEnvironment}
|
|
687
|
+
*
|
|
688
|
+
*/
|
|
689
|
+
readonly environment: BpmnEngineExecutionEnvironment;
|
|
691
690
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
* send signal to execution, distributed to all definitions
|
|
700
|
-
* Delegate a signal message to all interested parties, usually MessageEventDefinition, SignalEventDefinition, SignalTask (user, manual), ReceiveTask, or a StartEvent that has a form.
|
|
701
|
-
* @param message {BpmnMessage}
|
|
702
|
-
*/
|
|
703
|
-
signal(message?: BpmnMessage,options?: {ignoreSameDefinition?: boolean}): void;
|
|
704
|
-
/**
|
|
705
|
-
* send cancel activity to execution, distributed to all definitions
|
|
706
|
-
* Delegate a cancel message to all interested parties, perhaps a stalled TimerEventDefinition.
|
|
707
|
-
* @param message
|
|
708
|
-
*/
|
|
709
|
-
cancelActivity(message?: BpmnMessage): void;
|
|
691
|
+
/**
|
|
692
|
+
* executing definitions
|
|
693
|
+
*
|
|
694
|
+
* @type {BpmnEngineExecutionDefinition}
|
|
695
|
+
*
|
|
696
|
+
*/
|
|
697
|
+
readonly definitions: BpmnEngineExecutionDefinition[];
|
|
710
698
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
699
|
+
/**
|
|
700
|
+
* Get activity/element by id. Loops the definitions and returns the first found activity with id.
|
|
701
|
+
* @param activityId Activity or element id
|
|
702
|
+
*/
|
|
703
|
+
getActivityById(activityId: string): BpmnEngineActivity;
|
|
716
704
|
|
|
717
|
-
|
|
705
|
+
/**
|
|
706
|
+
* get execution serializable state
|
|
707
|
+
*
|
|
708
|
+
* @returns {BpmnEngineExecutionState}
|
|
709
|
+
*
|
|
710
|
+
*/
|
|
711
|
+
getState(): BpmnEngineExecutionState;
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* stop execution
|
|
715
|
+
*
|
|
716
|
+
*
|
|
717
|
+
*/
|
|
718
|
+
stop(): void;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* get activities in a postponed state
|
|
722
|
+
*
|
|
723
|
+
*
|
|
724
|
+
*/
|
|
725
|
+
getPostponed(): BpmnEngineActivity[];
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* send signal to execution, distributed to all definitions
|
|
729
|
+
* Delegate a signal message to all interested parties, usually MessageEventDefinition, SignalEventDefinition, SignalTask (user, manual), ReceiveTask, or a StartEvent that has a form.
|
|
730
|
+
* @param message {BpmnMessage}
|
|
731
|
+
* @param options
|
|
732
|
+
*/
|
|
733
|
+
signal(message?: BpmnMessage, options?: {ignoreSameDefinition?: boolean}): void;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* send cancel activity to execution, distributed to all definitions
|
|
737
|
+
* Delegate a cancel message to all interested parties, perhaps a stalled TimerEventDefinition.
|
|
738
|
+
* @param message
|
|
739
|
+
*/
|
|
740
|
+
cancelActivity(message?: BpmnMessage): void;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
*
|
|
744
|
+
* @param event
|
|
745
|
+
*/
|
|
746
|
+
waitFor<T>(event: BpmnEngineEvent): Promise<T>;
|
|
747
|
+
|
|
748
|
+
}
|
|
718
749
|
|
|
719
750
|
}
|