bpmn-client 2.1.6 → 2.2.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.
@@ -153,9 +153,9 @@ class ClientEngine {
153
153
  return ret;
154
154
  });
155
155
  }
156
- startEvent(instanceId, startNodeId, data = {}) {
156
+ startEvent(instanceId, startNodeId, data = {}, userId = null, options = {}) {
157
157
  return __awaiter(this, void 0, void 0, function* () {
158
- const ret = yield this.client.put('engine/startEvent', { "instanceId": instanceId, "startNodeId": startNodeId, "data": data });
158
+ const ret = yield this.client.put('engine/startEvent', { "instanceId": instanceId, "startNodeId": startNodeId, "data": data, "userName": userId, "options": options });
159
159
  if (ret['errors']) {
160
160
  console.log(ret['errors']);
161
161
  throw new Error(ret['errors']);
@@ -201,9 +201,9 @@ class ClientDatastore {
201
201
  return items;
202
202
  });
203
203
  }
204
- findInstances(query) {
204
+ findInstances(query, projection = {}) {
205
205
  return __awaiter(this, void 0, void 0, function* () {
206
- const res = yield this.client.get('datastore/findInstances', query);
206
+ const res = yield this.client.get('datastore/findInstances', { query, projection });
207
207
  if (res['errors']) {
208
208
  console.log(res['errors']);
209
209
  throw new Error(res['errors']);
package/dist/test.js CHANGED
@@ -50,6 +50,8 @@ function test() {
50
50
  console.log(response.id);
51
51
  response = yield server2.engine.invoke({ id: response.id, "items.elementId": 'task_Buy' }, null, userId, options);
52
52
  console.log('invoked', response.id);
53
+ let insts = yield server1.datastore.findInstances({ "data.caseId": 3030 }, { "name": 1 });
54
+ console.log(insts);
53
55
  });
54
56
  }
55
57
  function importModel() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-client",
3
- "version": "2.1.6",
3
+ "version": "2.2.4",
4
4
  "license": "MIT",
5
5
  "main":"./dist/index.js",
6
6
  "scripts": {