@nanobpm/engine-wasm 0.1.0 → 0.3.0
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/nanobpmn_engine.d.ts +111 -0
- package/nanobpmn_engine.js +462 -0
- package/nanobpmn_engine_bg.wasm +0 -0
- package/nanobpmn_engine_bg.wasm.d.ts +12 -0
- package/package.json +1 -1
package/nanobpmn_engine.d.ts
CHANGED
|
@@ -19,12 +19,59 @@ export class TestEngine {
|
|
|
19
19
|
* become due and expiring any lapsed job locks.
|
|
20
20
|
*/
|
|
21
21
|
advanceTime(by_ms: number): string;
|
|
22
|
+
/**
|
|
23
|
+
* Assign a user task to `assignee`. When `allow_override` is false and the
|
|
24
|
+
* task already has an assignee the command is rejected (it must be
|
|
25
|
+
* unassigned first). Returns the snapshot.
|
|
26
|
+
*/
|
|
27
|
+
assignUserTask(user_task_key: string, assignee: string, allow_override: boolean): string;
|
|
28
|
+
/**
|
|
29
|
+
* Broadcast a signal by name to **every** open subscription that matches,
|
|
30
|
+
* across all instances, merging `variables_json` into each correlated
|
|
31
|
+
* instance. Signals correlate by name only and are not buffered. Returns
|
|
32
|
+
* the snapshot.
|
|
33
|
+
*/
|
|
34
|
+
broadcastSignal(signal_name: string, variables_json: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Cancel (terminate) a running process instance by key. Every token is
|
|
37
|
+
* discarded, pending jobs are canceled, and the instance transitions to
|
|
38
|
+
* `Terminated`. Returns the snapshot.
|
|
39
|
+
*/
|
|
40
|
+
cancelInstance(instance_key: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Complete an ad-hoc sub-process **agent** job — the container's
|
|
43
|
+
* JOB_WORKER job (Camunda's agentic `aiagent-job-worker`) — carrying the
|
|
44
|
+
* agent's activate-element instructions so the engine runs the selected
|
|
45
|
+
* inner "tools" this turn (ADR 0023 seam 2/3; Camunda `JobResult` /
|
|
46
|
+
* `activateElements[]`). This is the browser seam that the plain
|
|
47
|
+
* `completeJob` deliberately omits (it always sends
|
|
48
|
+
* `adhoc_result: None`).
|
|
49
|
+
*
|
|
50
|
+
* `agent_result_json` shape (camelCase, mirroring Camunda's agentic
|
|
51
|
+
* `JobResult`):
|
|
52
|
+
* ```json
|
|
53
|
+
* { "activateElements": [{ "elementId": "toolA", "variables": { "q": 1 } }],
|
|
54
|
+
* "completionConditionFulfilled": false,
|
|
55
|
+
* "cancelRemainingInstances": false }
|
|
56
|
+
* ```
|
|
57
|
+
* Empty/whitespace ⇒ a no-op result, so the container completes this turn
|
|
58
|
+
* (no tool activated). `variables_json` merges instance variables exactly
|
|
59
|
+
* like `completeJob` — e.g. the agent's final
|
|
60
|
+
* decision when it signals `completionConditionFulfilled`.
|
|
61
|
+
*/
|
|
62
|
+
completeAgentJob(job_key: string, variables_json: string, agent_result_json: string): string;
|
|
22
63
|
/**
|
|
23
64
|
* Complete a waiting job by key, merging `variables_json` (a JSON object
|
|
24
65
|
* string) into the instance. The job is activated first if it has not been
|
|
25
66
|
* already, so the UI can complete a freshly-created job directly.
|
|
26
67
|
*/
|
|
27
68
|
completeJob(job_key: string, variables_json: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Complete a waiting user task by key, merging `variables_json` into the
|
|
71
|
+
* instance before the parked token resumes. The task must be in the
|
|
72
|
+
* `Created` state. Returns the snapshot.
|
|
73
|
+
*/
|
|
74
|
+
completeUserTask(user_task_key: string, variables_json: string): string;
|
|
28
75
|
/**
|
|
29
76
|
* Correlate a message to any instance waiting on it: publishes `message_name`
|
|
30
77
|
* with the given `correlation_key` (the value the waiting subscription's
|
|
@@ -57,6 +104,17 @@ export class TestEngine {
|
|
|
57
104
|
* With no retries left this raises an incident (visible in the snapshot).
|
|
58
105
|
*/
|
|
59
106
|
failJob(job_key: string, retries: number, message: string): string;
|
|
107
|
+
/**
|
|
108
|
+
* Modify a running process instance (Zeebe "modify process instance"): move
|
|
109
|
+
* tokens by terminating existing element instances and/or activating new
|
|
110
|
+
* ones. `activate_instructions_json` is a JSON array of
|
|
111
|
+
* `{ elementId: string, variables?: object }` (variables are merged into the
|
|
112
|
+
* instance's root scope before the token is placed);
|
|
113
|
+
* `terminate_instructions_json` is a JSON array of element-instance keys,
|
|
114
|
+
* each a decimal string or a `{ elementInstanceKey: string }` object.
|
|
115
|
+
* Activations run at the process root scope. Returns the snapshot.
|
|
116
|
+
*/
|
|
117
|
+
modify(instance_key: string, activate_instructions_json: string, terminate_instructions_json: string): string;
|
|
60
118
|
/**
|
|
61
119
|
* Create a fresh, empty simulated engine. The virtual clock starts at 0.
|
|
62
120
|
*/
|
|
@@ -69,10 +127,32 @@ export class TestEngine {
|
|
|
69
127
|
* completed instances rather than accumulating across runs.
|
|
70
128
|
*/
|
|
71
129
|
reset(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Resolve an open incident by key, retrying the work that failed (a job
|
|
132
|
+
* incident returns the parked job — which must have retries left — to the
|
|
133
|
+
* activatable pool; a gateway incident re-evaluates; an uncaught-error
|
|
134
|
+
* incident re-creates the service-task job). Returns the snapshot.
|
|
135
|
+
*/
|
|
136
|
+
resolveIncident(incident_key: string): string;
|
|
137
|
+
/**
|
|
138
|
+
* Merge variables into a scope (a process-instance key or an element-instance
|
|
139
|
+
* key). When `local` is true the values are written strictly into the target
|
|
140
|
+
* scope; otherwise they propagate upward to the nearest ancestor scope that
|
|
141
|
+
* defines each name (Zeebe `SetVariables` semantics). Returns the snapshot.
|
|
142
|
+
*/
|
|
143
|
+
setVariables(scope_key: string, variables_json: string, local: boolean): string;
|
|
72
144
|
/**
|
|
73
145
|
* The current simulation state as a JSON [`Snapshot`].
|
|
74
146
|
*/
|
|
75
147
|
snapshot(): string;
|
|
148
|
+
/**
|
|
149
|
+
* Throw a BPMN business error from a waiting job by key. If the job's
|
|
150
|
+
* activity has a matching error boundary/event-subprocess catch it is
|
|
151
|
+
* interrupted and the error-handling path runs; otherwise an incident is
|
|
152
|
+
* raised. The job is activated first if needed, so the UI can throw an
|
|
153
|
+
* error directly from a freshly-created job. Returns the snapshot.
|
|
154
|
+
*/
|
|
155
|
+
throwError(job_key: string, error_code: string, error_message: string): string;
|
|
76
156
|
/**
|
|
77
157
|
* Set the engine clock to a wall-clock instant (ms), then trigger due timers
|
|
78
158
|
* and expire lapsed job locks. The embedded host calls this with `Date.now()`
|
|
@@ -80,6 +160,25 @@ export class TestEngine {
|
|
|
80
160
|
* clock never moves backwards. Returns the snapshot.
|
|
81
161
|
*/
|
|
82
162
|
tickNow(now_ms: number): string;
|
|
163
|
+
/**
|
|
164
|
+
* Clear a user task's assignee. The task must be in the `Created` state.
|
|
165
|
+
* Returns the snapshot.
|
|
166
|
+
*/
|
|
167
|
+
unassignUserTask(user_task_key: string): string;
|
|
168
|
+
/**
|
|
169
|
+
* Set a job's remaining retries by key. Used to recover a job parked on a
|
|
170
|
+
* no-retries incident before resolving that incident; does not by itself
|
|
171
|
+
* unblock the job. Returns the snapshot.
|
|
172
|
+
*/
|
|
173
|
+
updateRetries(job_key: string, retries: number): string;
|
|
174
|
+
/**
|
|
175
|
+
* Update a user task's attributes from a JSON changeset object. Recognised
|
|
176
|
+
* keys (all optional): `candidateGroups` / `candidateUsers` (string arrays),
|
|
177
|
+
* `dueDate` / `followUpDate` (ISO-8601 string, or `null`/`""` to clear),
|
|
178
|
+
* `priority` (0..=100). Only present keys are changed. The task must be in
|
|
179
|
+
* the `Created` state. Returns the snapshot.
|
|
180
|
+
*/
|
|
181
|
+
updateUserTask(user_task_key: string, changeset_json: string): string;
|
|
83
182
|
/**
|
|
84
183
|
* The current virtual clock (milliseconds).
|
|
85
184
|
*/
|
|
@@ -93,17 +192,29 @@ export interface InitOutput {
|
|
|
93
192
|
readonly __wbg_testengine_free: (a: number, b: number) => void;
|
|
94
193
|
readonly testengine_activateJobs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
95
194
|
readonly testengine_advanceTime: (a: number, b: number, c: number) => void;
|
|
195
|
+
readonly testengine_assignUserTask: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
196
|
+
readonly testengine_broadcastSignal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
197
|
+
readonly testengine_cancelInstance: (a: number, b: number, c: number, d: number) => void;
|
|
198
|
+
readonly testengine_completeAgentJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
96
199
|
readonly testengine_completeJob: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
200
|
+
readonly testengine_completeUserTask: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
97
201
|
readonly testengine_correlateMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
98
202
|
readonly testengine_createInstance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
99
203
|
readonly testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
100
204
|
readonly testengine_events: (a: number, b: number) => void;
|
|
101
205
|
readonly testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
206
|
+
readonly testengine_modify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
102
207
|
readonly testengine_new: () => number;
|
|
103
208
|
readonly testengine_now: (a: number) => number;
|
|
104
209
|
readonly testengine_reset: (a: number) => void;
|
|
210
|
+
readonly testengine_resolveIncident: (a: number, b: number, c: number, d: number) => void;
|
|
211
|
+
readonly testengine_setVariables: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
105
212
|
readonly testengine_snapshot: (a: number, b: number) => void;
|
|
213
|
+
readonly testengine_throwError: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
106
214
|
readonly testengine_tickNow: (a: number, b: number, c: number) => void;
|
|
215
|
+
readonly testengine_unassignUserTask: (a: number, b: number, c: number, d: number) => void;
|
|
216
|
+
readonly testengine_updateRetries: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
217
|
+
readonly testengine_updateUserTask: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
107
218
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
108
219
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
109
220
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
package/nanobpmn_engine.js
CHANGED
|
@@ -83,6 +83,168 @@ export class TestEngine {
|
|
|
83
83
|
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Assign a user task to `assignee`. When `allow_override` is false and the
|
|
88
|
+
* task already has an assignee the command is rejected (it must be
|
|
89
|
+
* unassigned first). Returns the snapshot.
|
|
90
|
+
* @param {string} user_task_key
|
|
91
|
+
* @param {string} assignee
|
|
92
|
+
* @param {boolean} allow_override
|
|
93
|
+
* @returns {string}
|
|
94
|
+
*/
|
|
95
|
+
assignUserTask(user_task_key, assignee, allow_override) {
|
|
96
|
+
let deferred4_0;
|
|
97
|
+
let deferred4_1;
|
|
98
|
+
try {
|
|
99
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
100
|
+
const ptr0 = passStringToWasm0(user_task_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
101
|
+
const len0 = WASM_VECTOR_LEN;
|
|
102
|
+
const ptr1 = passStringToWasm0(assignee, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
103
|
+
const len1 = WASM_VECTOR_LEN;
|
|
104
|
+
wasm.testengine_assignUserTask(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, allow_override);
|
|
105
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
106
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
107
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
108
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
109
|
+
var ptr3 = r0;
|
|
110
|
+
var len3 = r1;
|
|
111
|
+
if (r3) {
|
|
112
|
+
ptr3 = 0; len3 = 0;
|
|
113
|
+
throw takeObject(r2);
|
|
114
|
+
}
|
|
115
|
+
deferred4_0 = ptr3;
|
|
116
|
+
deferred4_1 = len3;
|
|
117
|
+
return getStringFromWasm0(ptr3, len3);
|
|
118
|
+
} finally {
|
|
119
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
120
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Broadcast a signal by name to **every** open subscription that matches,
|
|
125
|
+
* across all instances, merging `variables_json` into each correlated
|
|
126
|
+
* instance. Signals correlate by name only and are not buffered. Returns
|
|
127
|
+
* the snapshot.
|
|
128
|
+
* @param {string} signal_name
|
|
129
|
+
* @param {string} variables_json
|
|
130
|
+
* @returns {string}
|
|
131
|
+
*/
|
|
132
|
+
broadcastSignal(signal_name, variables_json) {
|
|
133
|
+
let deferred4_0;
|
|
134
|
+
let deferred4_1;
|
|
135
|
+
try {
|
|
136
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
137
|
+
const ptr0 = passStringToWasm0(signal_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
138
|
+
const len0 = WASM_VECTOR_LEN;
|
|
139
|
+
const ptr1 = passStringToWasm0(variables_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
140
|
+
const len1 = WASM_VECTOR_LEN;
|
|
141
|
+
wasm.testengine_broadcastSignal(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
142
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
143
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
144
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
145
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
146
|
+
var ptr3 = r0;
|
|
147
|
+
var len3 = r1;
|
|
148
|
+
if (r3) {
|
|
149
|
+
ptr3 = 0; len3 = 0;
|
|
150
|
+
throw takeObject(r2);
|
|
151
|
+
}
|
|
152
|
+
deferred4_0 = ptr3;
|
|
153
|
+
deferred4_1 = len3;
|
|
154
|
+
return getStringFromWasm0(ptr3, len3);
|
|
155
|
+
} finally {
|
|
156
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
157
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Cancel (terminate) a running process instance by key. Every token is
|
|
162
|
+
* discarded, pending jobs are canceled, and the instance transitions to
|
|
163
|
+
* `Terminated`. Returns the snapshot.
|
|
164
|
+
* @param {string} instance_key
|
|
165
|
+
* @returns {string}
|
|
166
|
+
*/
|
|
167
|
+
cancelInstance(instance_key) {
|
|
168
|
+
let deferred3_0;
|
|
169
|
+
let deferred3_1;
|
|
170
|
+
try {
|
|
171
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
172
|
+
const ptr0 = passStringToWasm0(instance_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
173
|
+
const len0 = WASM_VECTOR_LEN;
|
|
174
|
+
wasm.testengine_cancelInstance(retptr, this.__wbg_ptr, ptr0, len0);
|
|
175
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
176
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
177
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
178
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
179
|
+
var ptr2 = r0;
|
|
180
|
+
var len2 = r1;
|
|
181
|
+
if (r3) {
|
|
182
|
+
ptr2 = 0; len2 = 0;
|
|
183
|
+
throw takeObject(r2);
|
|
184
|
+
}
|
|
185
|
+
deferred3_0 = ptr2;
|
|
186
|
+
deferred3_1 = len2;
|
|
187
|
+
return getStringFromWasm0(ptr2, len2);
|
|
188
|
+
} finally {
|
|
189
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
190
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Complete an ad-hoc sub-process **agent** job — the container's
|
|
195
|
+
* JOB_WORKER job (Camunda's agentic `aiagent-job-worker`) — carrying the
|
|
196
|
+
* agent's activate-element instructions so the engine runs the selected
|
|
197
|
+
* inner "tools" this turn (ADR 0023 seam 2/3; Camunda `JobResult` /
|
|
198
|
+
* `activateElements[]`). This is the browser seam that the plain
|
|
199
|
+
* `completeJob` deliberately omits (it always sends
|
|
200
|
+
* `adhoc_result: None`).
|
|
201
|
+
*
|
|
202
|
+
* `agent_result_json` shape (camelCase, mirroring Camunda's agentic
|
|
203
|
+
* `JobResult`):
|
|
204
|
+
* ```json
|
|
205
|
+
* { "activateElements": [{ "elementId": "toolA", "variables": { "q": 1 } }],
|
|
206
|
+
* "completionConditionFulfilled": false,
|
|
207
|
+
* "cancelRemainingInstances": false }
|
|
208
|
+
* ```
|
|
209
|
+
* Empty/whitespace ⇒ a no-op result, so the container completes this turn
|
|
210
|
+
* (no tool activated). `variables_json` merges instance variables exactly
|
|
211
|
+
* like `completeJob` — e.g. the agent's final
|
|
212
|
+
* decision when it signals `completionConditionFulfilled`.
|
|
213
|
+
* @param {string} job_key
|
|
214
|
+
* @param {string} variables_json
|
|
215
|
+
* @param {string} agent_result_json
|
|
216
|
+
* @returns {string}
|
|
217
|
+
*/
|
|
218
|
+
completeAgentJob(job_key, variables_json, agent_result_json) {
|
|
219
|
+
let deferred5_0;
|
|
220
|
+
let deferred5_1;
|
|
221
|
+
try {
|
|
222
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
223
|
+
const ptr0 = passStringToWasm0(job_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
224
|
+
const len0 = WASM_VECTOR_LEN;
|
|
225
|
+
const ptr1 = passStringToWasm0(variables_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
226
|
+
const len1 = WASM_VECTOR_LEN;
|
|
227
|
+
const ptr2 = passStringToWasm0(agent_result_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
228
|
+
const len2 = WASM_VECTOR_LEN;
|
|
229
|
+
wasm.testengine_completeAgentJob(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
230
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
231
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
232
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
233
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
234
|
+
var ptr4 = r0;
|
|
235
|
+
var len4 = r1;
|
|
236
|
+
if (r3) {
|
|
237
|
+
ptr4 = 0; len4 = 0;
|
|
238
|
+
throw takeObject(r2);
|
|
239
|
+
}
|
|
240
|
+
deferred5_0 = ptr4;
|
|
241
|
+
deferred5_1 = len4;
|
|
242
|
+
return getStringFromWasm0(ptr4, len4);
|
|
243
|
+
} finally {
|
|
244
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
245
|
+
wasm.__wbindgen_export3(deferred5_0, deferred5_1, 1);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
86
248
|
/**
|
|
87
249
|
* Complete a waiting job by key, merging `variables_json` (a JSON object
|
|
88
250
|
* string) into the instance. The job is activated first if it has not been
|
|
@@ -119,6 +281,42 @@ export class TestEngine {
|
|
|
119
281
|
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
120
282
|
}
|
|
121
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Complete a waiting user task by key, merging `variables_json` into the
|
|
286
|
+
* instance before the parked token resumes. The task must be in the
|
|
287
|
+
* `Created` state. Returns the snapshot.
|
|
288
|
+
* @param {string} user_task_key
|
|
289
|
+
* @param {string} variables_json
|
|
290
|
+
* @returns {string}
|
|
291
|
+
*/
|
|
292
|
+
completeUserTask(user_task_key, variables_json) {
|
|
293
|
+
let deferred4_0;
|
|
294
|
+
let deferred4_1;
|
|
295
|
+
try {
|
|
296
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
297
|
+
const ptr0 = passStringToWasm0(user_task_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
298
|
+
const len0 = WASM_VECTOR_LEN;
|
|
299
|
+
const ptr1 = passStringToWasm0(variables_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
300
|
+
const len1 = WASM_VECTOR_LEN;
|
|
301
|
+
wasm.testengine_completeUserTask(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
302
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
303
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
304
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
305
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
306
|
+
var ptr3 = r0;
|
|
307
|
+
var len3 = r1;
|
|
308
|
+
if (r3) {
|
|
309
|
+
ptr3 = 0; len3 = 0;
|
|
310
|
+
throw takeObject(r2);
|
|
311
|
+
}
|
|
312
|
+
deferred4_0 = ptr3;
|
|
313
|
+
deferred4_1 = len3;
|
|
314
|
+
return getStringFromWasm0(ptr3, len3);
|
|
315
|
+
} finally {
|
|
316
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
317
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
122
320
|
/**
|
|
123
321
|
* Correlate a message to any instance waiting on it: publishes `message_name`
|
|
124
322
|
* with the given `correlation_key` (the value the waiting subscription's
|
|
@@ -296,6 +494,50 @@ export class TestEngine {
|
|
|
296
494
|
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
297
495
|
}
|
|
298
496
|
}
|
|
497
|
+
/**
|
|
498
|
+
* Modify a running process instance (Zeebe "modify process instance"): move
|
|
499
|
+
* tokens by terminating existing element instances and/or activating new
|
|
500
|
+
* ones. `activate_instructions_json` is a JSON array of
|
|
501
|
+
* `{ elementId: string, variables?: object }` (variables are merged into the
|
|
502
|
+
* instance's root scope before the token is placed);
|
|
503
|
+
* `terminate_instructions_json` is a JSON array of element-instance keys,
|
|
504
|
+
* each a decimal string or a `{ elementInstanceKey: string }` object.
|
|
505
|
+
* Activations run at the process root scope. Returns the snapshot.
|
|
506
|
+
* @param {string} instance_key
|
|
507
|
+
* @param {string} activate_instructions_json
|
|
508
|
+
* @param {string} terminate_instructions_json
|
|
509
|
+
* @returns {string}
|
|
510
|
+
*/
|
|
511
|
+
modify(instance_key, activate_instructions_json, terminate_instructions_json) {
|
|
512
|
+
let deferred5_0;
|
|
513
|
+
let deferred5_1;
|
|
514
|
+
try {
|
|
515
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
516
|
+
const ptr0 = passStringToWasm0(instance_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
517
|
+
const len0 = WASM_VECTOR_LEN;
|
|
518
|
+
const ptr1 = passStringToWasm0(activate_instructions_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
519
|
+
const len1 = WASM_VECTOR_LEN;
|
|
520
|
+
const ptr2 = passStringToWasm0(terminate_instructions_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
521
|
+
const len2 = WASM_VECTOR_LEN;
|
|
522
|
+
wasm.testengine_modify(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
523
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
524
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
525
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
526
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
527
|
+
var ptr4 = r0;
|
|
528
|
+
var len4 = r1;
|
|
529
|
+
if (r3) {
|
|
530
|
+
ptr4 = 0; len4 = 0;
|
|
531
|
+
throw takeObject(r2);
|
|
532
|
+
}
|
|
533
|
+
deferred5_0 = ptr4;
|
|
534
|
+
deferred5_1 = len4;
|
|
535
|
+
return getStringFromWasm0(ptr4, len4);
|
|
536
|
+
} finally {
|
|
537
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
538
|
+
wasm.__wbindgen_export3(deferred5_0, deferred5_1, 1);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
299
541
|
/**
|
|
300
542
|
* Create a fresh, empty simulated engine. The virtual clock starts at 0.
|
|
301
543
|
*/
|
|
@@ -323,6 +565,78 @@ export class TestEngine {
|
|
|
323
565
|
reset() {
|
|
324
566
|
wasm.testengine_reset(this.__wbg_ptr);
|
|
325
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* Resolve an open incident by key, retrying the work that failed (a job
|
|
570
|
+
* incident returns the parked job — which must have retries left — to the
|
|
571
|
+
* activatable pool; a gateway incident re-evaluates; an uncaught-error
|
|
572
|
+
* incident re-creates the service-task job). Returns the snapshot.
|
|
573
|
+
* @param {string} incident_key
|
|
574
|
+
* @returns {string}
|
|
575
|
+
*/
|
|
576
|
+
resolveIncident(incident_key) {
|
|
577
|
+
let deferred3_0;
|
|
578
|
+
let deferred3_1;
|
|
579
|
+
try {
|
|
580
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
581
|
+
const ptr0 = passStringToWasm0(incident_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
582
|
+
const len0 = WASM_VECTOR_LEN;
|
|
583
|
+
wasm.testengine_resolveIncident(retptr, this.__wbg_ptr, ptr0, len0);
|
|
584
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
585
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
586
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
587
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
588
|
+
var ptr2 = r0;
|
|
589
|
+
var len2 = r1;
|
|
590
|
+
if (r3) {
|
|
591
|
+
ptr2 = 0; len2 = 0;
|
|
592
|
+
throw takeObject(r2);
|
|
593
|
+
}
|
|
594
|
+
deferred3_0 = ptr2;
|
|
595
|
+
deferred3_1 = len2;
|
|
596
|
+
return getStringFromWasm0(ptr2, len2);
|
|
597
|
+
} finally {
|
|
598
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
599
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Merge variables into a scope (a process-instance key or an element-instance
|
|
604
|
+
* key). When `local` is true the values are written strictly into the target
|
|
605
|
+
* scope; otherwise they propagate upward to the nearest ancestor scope that
|
|
606
|
+
* defines each name (Zeebe `SetVariables` semantics). Returns the snapshot.
|
|
607
|
+
* @param {string} scope_key
|
|
608
|
+
* @param {string} variables_json
|
|
609
|
+
* @param {boolean} local
|
|
610
|
+
* @returns {string}
|
|
611
|
+
*/
|
|
612
|
+
setVariables(scope_key, variables_json, local) {
|
|
613
|
+
let deferred4_0;
|
|
614
|
+
let deferred4_1;
|
|
615
|
+
try {
|
|
616
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
617
|
+
const ptr0 = passStringToWasm0(scope_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
618
|
+
const len0 = WASM_VECTOR_LEN;
|
|
619
|
+
const ptr1 = passStringToWasm0(variables_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
620
|
+
const len1 = WASM_VECTOR_LEN;
|
|
621
|
+
wasm.testengine_setVariables(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, local);
|
|
622
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
623
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
624
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
625
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
626
|
+
var ptr3 = r0;
|
|
627
|
+
var len3 = r1;
|
|
628
|
+
if (r3) {
|
|
629
|
+
ptr3 = 0; len3 = 0;
|
|
630
|
+
throw takeObject(r2);
|
|
631
|
+
}
|
|
632
|
+
deferred4_0 = ptr3;
|
|
633
|
+
deferred4_1 = len3;
|
|
634
|
+
return getStringFromWasm0(ptr3, len3);
|
|
635
|
+
} finally {
|
|
636
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
637
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
326
640
|
/**
|
|
327
641
|
* The current simulation state as a JSON [`Snapshot`].
|
|
328
642
|
* @returns {string}
|
|
@@ -351,6 +665,47 @@ export class TestEngine {
|
|
|
351
665
|
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
352
666
|
}
|
|
353
667
|
}
|
|
668
|
+
/**
|
|
669
|
+
* Throw a BPMN business error from a waiting job by key. If the job's
|
|
670
|
+
* activity has a matching error boundary/event-subprocess catch it is
|
|
671
|
+
* interrupted and the error-handling path runs; otherwise an incident is
|
|
672
|
+
* raised. The job is activated first if needed, so the UI can throw an
|
|
673
|
+
* error directly from a freshly-created job. Returns the snapshot.
|
|
674
|
+
* @param {string} job_key
|
|
675
|
+
* @param {string} error_code
|
|
676
|
+
* @param {string} error_message
|
|
677
|
+
* @returns {string}
|
|
678
|
+
*/
|
|
679
|
+
throwError(job_key, error_code, error_message) {
|
|
680
|
+
let deferred5_0;
|
|
681
|
+
let deferred5_1;
|
|
682
|
+
try {
|
|
683
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
684
|
+
const ptr0 = passStringToWasm0(job_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
685
|
+
const len0 = WASM_VECTOR_LEN;
|
|
686
|
+
const ptr1 = passStringToWasm0(error_code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
687
|
+
const len1 = WASM_VECTOR_LEN;
|
|
688
|
+
const ptr2 = passStringToWasm0(error_message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
689
|
+
const len2 = WASM_VECTOR_LEN;
|
|
690
|
+
wasm.testengine_throwError(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
691
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
692
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
693
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
694
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
695
|
+
var ptr4 = r0;
|
|
696
|
+
var len4 = r1;
|
|
697
|
+
if (r3) {
|
|
698
|
+
ptr4 = 0; len4 = 0;
|
|
699
|
+
throw takeObject(r2);
|
|
700
|
+
}
|
|
701
|
+
deferred5_0 = ptr4;
|
|
702
|
+
deferred5_1 = len4;
|
|
703
|
+
return getStringFromWasm0(ptr4, len4);
|
|
704
|
+
} finally {
|
|
705
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
706
|
+
wasm.__wbindgen_export3(deferred5_0, deferred5_1, 1);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
354
709
|
/**
|
|
355
710
|
* Set the engine clock to a wall-clock instant (ms), then trigger due timers
|
|
356
711
|
* and expire lapsed job locks. The embedded host calls this with `Date.now()`
|
|
@@ -383,6 +738,110 @@ export class TestEngine {
|
|
|
383
738
|
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
384
739
|
}
|
|
385
740
|
}
|
|
741
|
+
/**
|
|
742
|
+
* Clear a user task's assignee. The task must be in the `Created` state.
|
|
743
|
+
* Returns the snapshot.
|
|
744
|
+
* @param {string} user_task_key
|
|
745
|
+
* @returns {string}
|
|
746
|
+
*/
|
|
747
|
+
unassignUserTask(user_task_key) {
|
|
748
|
+
let deferred3_0;
|
|
749
|
+
let deferred3_1;
|
|
750
|
+
try {
|
|
751
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
752
|
+
const ptr0 = passStringToWasm0(user_task_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
753
|
+
const len0 = WASM_VECTOR_LEN;
|
|
754
|
+
wasm.testengine_unassignUserTask(retptr, this.__wbg_ptr, ptr0, len0);
|
|
755
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
756
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
757
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
758
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
759
|
+
var ptr2 = r0;
|
|
760
|
+
var len2 = r1;
|
|
761
|
+
if (r3) {
|
|
762
|
+
ptr2 = 0; len2 = 0;
|
|
763
|
+
throw takeObject(r2);
|
|
764
|
+
}
|
|
765
|
+
deferred3_0 = ptr2;
|
|
766
|
+
deferred3_1 = len2;
|
|
767
|
+
return getStringFromWasm0(ptr2, len2);
|
|
768
|
+
} finally {
|
|
769
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
770
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Set a job's remaining retries by key. Used to recover a job parked on a
|
|
775
|
+
* no-retries incident before resolving that incident; does not by itself
|
|
776
|
+
* unblock the job. Returns the snapshot.
|
|
777
|
+
* @param {string} job_key
|
|
778
|
+
* @param {number} retries
|
|
779
|
+
* @returns {string}
|
|
780
|
+
*/
|
|
781
|
+
updateRetries(job_key, retries) {
|
|
782
|
+
let deferred3_0;
|
|
783
|
+
let deferred3_1;
|
|
784
|
+
try {
|
|
785
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
786
|
+
const ptr0 = passStringToWasm0(job_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
787
|
+
const len0 = WASM_VECTOR_LEN;
|
|
788
|
+
wasm.testengine_updateRetries(retptr, this.__wbg_ptr, ptr0, len0, retries);
|
|
789
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
790
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
791
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
792
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
793
|
+
var ptr2 = r0;
|
|
794
|
+
var len2 = r1;
|
|
795
|
+
if (r3) {
|
|
796
|
+
ptr2 = 0; len2 = 0;
|
|
797
|
+
throw takeObject(r2);
|
|
798
|
+
}
|
|
799
|
+
deferred3_0 = ptr2;
|
|
800
|
+
deferred3_1 = len2;
|
|
801
|
+
return getStringFromWasm0(ptr2, len2);
|
|
802
|
+
} finally {
|
|
803
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
804
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Update a user task's attributes from a JSON changeset object. Recognised
|
|
809
|
+
* keys (all optional): `candidateGroups` / `candidateUsers` (string arrays),
|
|
810
|
+
* `dueDate` / `followUpDate` (ISO-8601 string, or `null`/`""` to clear),
|
|
811
|
+
* `priority` (0..=100). Only present keys are changed. The task must be in
|
|
812
|
+
* the `Created` state. Returns the snapshot.
|
|
813
|
+
* @param {string} user_task_key
|
|
814
|
+
* @param {string} changeset_json
|
|
815
|
+
* @returns {string}
|
|
816
|
+
*/
|
|
817
|
+
updateUserTask(user_task_key, changeset_json) {
|
|
818
|
+
let deferred4_0;
|
|
819
|
+
let deferred4_1;
|
|
820
|
+
try {
|
|
821
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
822
|
+
const ptr0 = passStringToWasm0(user_task_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
823
|
+
const len0 = WASM_VECTOR_LEN;
|
|
824
|
+
const ptr1 = passStringToWasm0(changeset_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
825
|
+
const len1 = WASM_VECTOR_LEN;
|
|
826
|
+
wasm.testengine_updateUserTask(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
827
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
828
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
829
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
830
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
831
|
+
var ptr3 = r0;
|
|
832
|
+
var len3 = r1;
|
|
833
|
+
if (r3) {
|
|
834
|
+
ptr3 = 0; len3 = 0;
|
|
835
|
+
throw takeObject(r2);
|
|
836
|
+
}
|
|
837
|
+
deferred4_0 = ptr3;
|
|
838
|
+
deferred4_1 = len3;
|
|
839
|
+
return getStringFromWasm0(ptr3, len3);
|
|
840
|
+
} finally {
|
|
841
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
842
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
386
845
|
}
|
|
387
846
|
if (Symbol.dispose) TestEngine.prototype[Symbol.dispose] = TestEngine.prototype.free;
|
|
388
847
|
function __wbg_get_imports() {
|
|
@@ -396,6 +855,9 @@ function __wbg_get_imports() {
|
|
|
396
855
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
397
856
|
return addHeapObject(ret);
|
|
398
857
|
},
|
|
858
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
859
|
+
takeObject(arg0);
|
|
860
|
+
},
|
|
399
861
|
};
|
|
400
862
|
return {
|
|
401
863
|
__proto__: null,
|
package/nanobpmn_engine_bg.wasm
CHANGED
|
Binary file
|
|
@@ -4,17 +4,29 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export const __wbg_testengine_free: (a: number, b: number) => void;
|
|
5
5
|
export const testengine_activateJobs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
6
6
|
export const testengine_advanceTime: (a: number, b: number, c: number) => void;
|
|
7
|
+
export const testengine_assignUserTask: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
8
|
+
export const testengine_broadcastSignal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const testengine_cancelInstance: (a: number, b: number, c: number, d: number) => void;
|
|
10
|
+
export const testengine_completeAgentJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
7
11
|
export const testengine_completeJob: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
+
export const testengine_completeUserTask: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
8
13
|
export const testengine_correlateMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
9
14
|
export const testengine_createInstance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
10
15
|
export const testengine_deploy: (a: number, b: number, c: number, d: number) => void;
|
|
11
16
|
export const testengine_events: (a: number, b: number) => void;
|
|
12
17
|
export const testengine_failJob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
18
|
+
export const testengine_modify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
13
19
|
export const testengine_new: () => number;
|
|
14
20
|
export const testengine_now: (a: number) => number;
|
|
15
21
|
export const testengine_reset: (a: number) => void;
|
|
22
|
+
export const testengine_resolveIncident: (a: number, b: number, c: number, d: number) => void;
|
|
23
|
+
export const testengine_setVariables: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
16
24
|
export const testengine_snapshot: (a: number, b: number) => void;
|
|
25
|
+
export const testengine_throwError: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
17
26
|
export const testengine_tickNow: (a: number, b: number, c: number) => void;
|
|
27
|
+
export const testengine_unassignUserTask: (a: number, b: number, c: number, d: number) => void;
|
|
28
|
+
export const testengine_updateRetries: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
29
|
+
export const testengine_updateUserTask: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
18
30
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
19
31
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
20
32
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/engine-wasm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The nanobpmn engine (engine-core) compiled to WebAssembly for in-browser BPMN execution: deploy a diagram, start instances, activate/complete jobs, and read live snapshots/traces. The substrate for the Bojtos demo framework (ADR 0043) and the console test-run panel.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|