@onify/flow-extensions 9.0.0 → 9.1.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/dist/index.js +1 -0
- package/package.json +6 -7
- package/src/OnifyBoundaryEventExtensions.js +3 -3
- package/src/OnifyElementExtensions.js +3 -3
- package/src/OnifyProcessExtensions.js +2 -2
- package/src/OnifySequenceFlow.js +1 -1
- package/src/OnifySubProcessExtensions.js +6 -6
- package/src/index.js +2 -1
- package/types/index.d.ts +2 -2
- package/dist/OnifyScriptTask.js +0 -3
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ function extensions(element, context) {
|
|
|
27
27
|
switch (element.type) {
|
|
28
28
|
case 'bpmn:Process':
|
|
29
29
|
return new _OnifyProcessExtensions.OnifyProcessExtensions(element, context);
|
|
30
|
+
case 'bpmn:AdHocSubProcess':
|
|
30
31
|
case 'bpmn:SubProcess':
|
|
31
32
|
case 'bpmn:Transaction':
|
|
32
33
|
return new _OnifySubProcessExtensions.OnifySubProcessExtensions(element, context);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onify/flow-extensions",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "Onify Flow extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -51,21 +51,20 @@
|
|
|
51
51
|
"@babel/preset-env": "^7.23.9",
|
|
52
52
|
"@babel/register": "^7.23.7",
|
|
53
53
|
"bpmn-elements-8-1": "npm:bpmn-elements@8.1",
|
|
54
|
-
"bpmn-engine": "^
|
|
54
|
+
"bpmn-engine": "^25.0.0",
|
|
55
55
|
"bpmn-engine-14": "npm:bpmn-engine@14",
|
|
56
56
|
"bpmn-moddle": "^9.0.1",
|
|
57
57
|
"c8": "^10.1.2",
|
|
58
58
|
"camunda-bpmn-moddle": "^7.0.1",
|
|
59
|
-
"chai": "^
|
|
60
|
-
"chronokinesis": "^
|
|
59
|
+
"chai": "^6.2.1",
|
|
60
|
+
"chronokinesis": "^7.0.0",
|
|
61
61
|
"debug": "^4.3.4",
|
|
62
62
|
"eslint": "^9.3.0",
|
|
63
|
-
"mocha": "^
|
|
63
|
+
"mocha": "^11.0.1",
|
|
64
64
|
"mocha-cakes-2": "^3.3.0",
|
|
65
65
|
"moddle-context-serializer": "^4.1.1",
|
|
66
|
-
"nock": "^13.5.4",
|
|
67
66
|
"prettier": "^3.2.4",
|
|
68
|
-
"texample": "^0.0
|
|
67
|
+
"texample": "^0.1.0"
|
|
69
68
|
},
|
|
70
69
|
"peerDependencies": {
|
|
71
70
|
"@0dep/piso": ">=2",
|
|
@@ -21,7 +21,7 @@ export class OnifyBoundaryEventExtensions extends OnifyElementExtensions {
|
|
|
21
21
|
(elementApi) => {
|
|
22
22
|
return this._onExecutionCompleted(elementApi, formatQ);
|
|
23
23
|
},
|
|
24
|
-
{ consumerTag: '_onify-extension-on-executed' }
|
|
24
|
+
{ consumerTag: '_onify-extension-on-executed' }
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
if (executionListeners?.onStart) {
|
|
@@ -34,7 +34,7 @@ export class OnifyBoundaryEventExtensions extends OnifyElementExtensions {
|
|
|
34
34
|
return activity.logger.error(`<${activity.id}> execution listener error`, err);
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
{ consumerTag: '_onify-extension-on-listenerstart' }
|
|
37
|
+
{ consumerTag: '_onify-extension-on-listenerstart' }
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
if (executionListeners?.onEnd) {
|
|
@@ -43,7 +43,7 @@ export class OnifyBoundaryEventExtensions extends OnifyElementExtensions {
|
|
|
43
43
|
(elementApi) => {
|
|
44
44
|
this._executeExecutionListener('end', elementApi, formatQ);
|
|
45
45
|
},
|
|
46
|
-
{ consumerTag: '_onify-extension-on-listenerend' }
|
|
46
|
+
{ consumerTag: '_onify-extension-on-listenerend' }
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -27,7 +27,7 @@ export class OnifyElementExtensions {
|
|
|
27
27
|
(elementApi) => {
|
|
28
28
|
return this._onExecutionCompleted(elementApi);
|
|
29
29
|
},
|
|
30
|
-
{ consumerTag: '_onify-extension-on-executed' }
|
|
30
|
+
{ consumerTag: '_onify-extension-on-executed' }
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
if (executionListeners?.onStart) {
|
|
@@ -36,7 +36,7 @@ export class OnifyElementExtensions {
|
|
|
36
36
|
(elementApi) => {
|
|
37
37
|
this._executeExecutionListener('start', elementApi);
|
|
38
38
|
},
|
|
39
|
-
{ consumerTag: '_onify-extension-on-listenerstart' }
|
|
39
|
+
{ consumerTag: '_onify-extension-on-listenerstart' }
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ export class OnifyElementExtensions {
|
|
|
46
46
|
(elementApi) => {
|
|
47
47
|
this._executeExecutionListener('end', elementApi);
|
|
48
48
|
},
|
|
49
|
-
{ consumerTag: '_onify-extension-on-listenerend' }
|
|
49
|
+
{ consumerTag: '_onify-extension-on-listenerend' }
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -25,11 +25,11 @@ export class OnifyProcessExtensions {
|
|
|
25
25
|
...elementApi.content,
|
|
26
26
|
error: new FormatError(bp.id, err),
|
|
27
27
|
},
|
|
28
|
-
{ mandatory: true, type: 'error' }
|
|
28
|
+
{ mandatory: true, type: 'error' }
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
{ consumerTag: '_onify-extension-on-enter' }
|
|
32
|
+
{ consumerTag: '_onify-extension-on-enter' }
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
_onEnter(elementApi) {
|
package/src/OnifySequenceFlow.js
CHANGED
|
@@ -16,7 +16,7 @@ export class OnifySequenceFlow extends SequenceFlow {
|
|
|
16
16
|
(_, msg) => {
|
|
17
17
|
this._executeListeners(msg);
|
|
18
18
|
},
|
|
19
|
-
{ noAck: true, consumerTag: '_onify-execution-listener' }
|
|
19
|
+
{ noAck: true, consumerTag: '_onify-execution-listener' }
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
async _executeListeners(message) {
|
|
@@ -16,7 +16,7 @@ export class OnifySubProcessExtensions extends OnifyElementExtensions {
|
|
|
16
16
|
(elementApi) => {
|
|
17
17
|
return this._asyncFormatOnEnter(elementApi);
|
|
18
18
|
},
|
|
19
|
-
'_onify-extension-on-enter'
|
|
19
|
+
'_onify-extension-on-enter'
|
|
20
20
|
);
|
|
21
21
|
} else {
|
|
22
22
|
this._setupListener(
|
|
@@ -25,7 +25,7 @@ export class OnifySubProcessExtensions extends OnifyElementExtensions {
|
|
|
25
25
|
(elementApi) => {
|
|
26
26
|
return this._asyncFormatOnEnter(elementApi);
|
|
27
27
|
},
|
|
28
|
-
'_onify-extension-on-enter'
|
|
28
|
+
'_onify-extension-on-enter'
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -35,7 +35,7 @@ export class OnifySubProcessExtensions extends OnifyElementExtensions {
|
|
|
35
35
|
(elementApi) => {
|
|
36
36
|
return this._onExecutionCompleted(elementApi);
|
|
37
37
|
},
|
|
38
|
-
'_onify-extension-on-executed'
|
|
38
|
+
'_onify-extension-on-executed'
|
|
39
39
|
);
|
|
40
40
|
|
|
41
41
|
if (executionListeners?.onStart) {
|
|
@@ -45,7 +45,7 @@ export class OnifySubProcessExtensions extends OnifyElementExtensions {
|
|
|
45
45
|
(elementApi) => {
|
|
46
46
|
this._executeExecutionListener('start', elementApi);
|
|
47
47
|
},
|
|
48
|
-
'_onify-extension-on-listenerstart'
|
|
48
|
+
'_onify-extension-on-listenerstart'
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -56,7 +56,7 @@ export class OnifySubProcessExtensions extends OnifyElementExtensions {
|
|
|
56
56
|
(elementApi) => {
|
|
57
57
|
this._executeExecutionListener('end', elementApi);
|
|
58
58
|
},
|
|
59
|
-
'_onify-extension-on-listenerend'
|
|
59
|
+
'_onify-extension-on-listenerend'
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -70,7 +70,7 @@ export class OnifySubProcessExtensions extends OnifyElementExtensions {
|
|
|
70
70
|
|
|
71
71
|
return callback(activity.getApi(message));
|
|
72
72
|
},
|
|
73
|
-
{ noAck: true, consumerTag }
|
|
73
|
+
{ noAck: true, consumerTag }
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
}
|
package/src/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export function extensions(element, context) {
|
|
|
10
10
|
switch (element.type) {
|
|
11
11
|
case 'bpmn:Process':
|
|
12
12
|
return new OnifyProcessExtensions(element, context);
|
|
13
|
+
case 'bpmn:AdHocSubProcess':
|
|
13
14
|
case 'bpmn:SubProcess':
|
|
14
15
|
case 'bpmn:Transaction':
|
|
15
16
|
return new OnifySubProcessExtensions(element, context);
|
|
@@ -26,7 +27,7 @@ export function extendFn(behaviour, context) {
|
|
|
26
27
|
if (!behaviour.eventDefinitions) break;
|
|
27
28
|
|
|
28
29
|
const timer = behaviour.eventDefinitions.find(
|
|
29
|
-
({ type, behaviour: edBehaviour }) => edBehaviour && type === 'bpmn:TimerEventDefinition'
|
|
30
|
+
({ type, behaviour: edBehaviour }) => edBehaviour && type === 'bpmn:TimerEventDefinition'
|
|
30
31
|
);
|
|
31
32
|
if (timer && timer.behaviour.timeCycle) Object.assign(behaviour, { scheduledStart: timer.behaviour.timeCycle });
|
|
32
33
|
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare module '@onify/flow-extensions' {
|
|
2
|
-
import { SequenceFlow, TimerEventDefinition, ElementBase, IExtension, ContextInstance
|
|
2
|
+
import { SequenceFlow, TimerEventDefinition, ElementBase, IExtension, ContextInstance } from 'bpmn-elements';
|
|
3
3
|
import { extendFn as extendFunction } from 'moddle-context-serializer';
|
|
4
4
|
|
|
5
5
|
export class OnifySequenceFlow extends SequenceFlow {}
|
|
@@ -15,7 +15,7 @@ declare module '@onify/flow-extensions/FlowScripts' {
|
|
|
15
15
|
import { SerializableElement } from 'moddle-context-serializer';
|
|
16
16
|
import { ScriptOptions } from 'node:vm';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
type registerArgument = SerializableElement | { id: string; type: string; behavior: any };
|
|
19
19
|
|
|
20
20
|
export interface FlowScriptOptions extends ScriptOptions {
|
|
21
21
|
timeout?: number;
|
package/dist/OnifyScriptTask.js
DELETED