@nocobase/plugin-workflow-custom-action-trigger 2.1.0-beta.6 → 2.1.0-beta.7

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.
@@ -10,19 +10,19 @@
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/react": "2.3.7",
13
- "@nocobase/client": "2.1.0-beta.6",
14
- "@nocobase/plugin-workflow": "2.1.0-beta.6",
15
- "@nocobase/flow-engine": "2.1.0-beta.6",
13
+ "@nocobase/client": "2.1.0-beta.7",
14
+ "@nocobase/plugin-workflow": "2.1.0-beta.7",
15
+ "@nocobase/flow-engine": "2.1.0-beta.7",
16
16
  "antd": "5.24.2",
17
17
  "react-router-dom": "6.30.1",
18
- "@nocobase/utils": "2.1.0-beta.6",
18
+ "@nocobase/utils": "2.1.0-beta.7",
19
19
  "react-i18next": "11.18.6",
20
20
  "@formily/antd-v5": "1.2.3",
21
- "@nocobase/plugin-error-handler": "2.1.0-beta.6",
22
- "@nocobase/data-source-manager": "2.1.0-beta.6",
23
- "@nocobase/server": "2.1.0-beta.6",
21
+ "@nocobase/plugin-error-handler": "2.1.0-beta.7",
22
+ "@nocobase/data-source-manager": "2.1.0-beta.7",
23
+ "@nocobase/server": "2.1.0-beta.7",
24
24
  "lodash": "4.17.21",
25
- "@nocobase/actions": "2.1.0-beta.6",
26
- "@nocobase/plugin-workflow-test": "2.1.0-beta.6",
27
- "@nocobase/test": "2.1.0-beta.6"
25
+ "@nocobase/actions": "2.1.0-beta.7",
26
+ "@nocobase/plugin-workflow-test": "2.1.0-beta.7",
27
+ "@nocobase/test": "2.1.0-beta.7"
28
28
  };
@@ -241,9 +241,13 @@ class CustomActionTrigger extends import_plugin_workflow.Trigger {
241
241
  }
242
242
  async execute(workflow, values, options) {
243
243
  var _a;
244
+ const { userId } = values;
245
+ if (userId == null) {
246
+ throw new Error("user is not provided");
247
+ }
244
248
  const UserRepo = this.workflow.app.db.getRepository("users");
245
249
  const actor = await UserRepo.findOne({
246
- filterByTk: values.userId,
250
+ filterByTk: typeof userId === "object" ? userId["id"] : userId,
247
251
  appends: ["roles"]
248
252
  });
249
253
  if (!actor) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-workflow-custom-action-trigger",
3
- "version": "2.1.0-beta.6",
3
+ "version": "2.1.0-beta.7",
4
4
  "displayName": "Workflow: Custom action event",
5
5
  "displayName.zh-CN": "工作流:自定义操作事件",
6
6
  "description": "Triggers after click a custom action button.",
@@ -27,6 +27,6 @@
27
27
  ],
28
28
  "editionLevel": 0
29
29
  },
30
- "gitHead": "439e45f32ee5f34d771e7f4751ef57eb7d4a82a8",
30
+ "gitHead": "da7dfef2b6d6854988a56119463c8c38e3221e79",
31
31
  "license": "Apache-2.0"
32
32
  }