@nocobase/plugin-workflow-request 1.6.0-alpha.12 → 1.6.0-alpha.14

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.
@@ -13,10 +13,10 @@ module.exports = {
13
13
  "@formily/shared": "2.3.2",
14
14
  "@formily/react": "2.3.0",
15
15
  "@formily/antd-v5": "1.1.9",
16
- "@nocobase/plugin-workflow": "1.6.0-alpha.12",
17
- "@nocobase/client": "1.6.0-alpha.12",
16
+ "@nocobase/plugin-workflow": "1.6.0-alpha.14",
17
+ "@nocobase/client": "1.6.0-alpha.14",
18
18
  "react-i18next": "11.18.6",
19
- "@nocobase/server": "1.6.0-alpha.12",
19
+ "@nocobase/server": "1.6.0-alpha.14",
20
20
  "axios": "1.7.7",
21
21
  "lodash": "4.17.21"
22
22
  };
@@ -19,7 +19,10 @@ export type RequestInstructionConfig = Pick<AxiosRequestConfig, 'url' | 'method'
19
19
  onlyData?: boolean;
20
20
  };
21
21
  export default class extends Instruction {
22
- run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<any>;
22
+ run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<import("@nocobase/plugin-workflow").JobModel | {
23
+ status: 1 | -1;
24
+ result: any;
25
+ }>;
23
26
  resume(node: FlowNodeModel, job: any, processor: Processor): Promise<any>;
24
27
  test(config: RequestInstructionConfig): Promise<{
25
28
  status: 1 | -1;
@@ -156,12 +156,13 @@ class RequestInstruction_default extends import_plugin_workflow.Instruction {
156
156
  });
157
157
  }).finally(() => {
158
158
  processor.logger.debug(`request (#${node.id}) ended, resume workflow...`);
159
- setImmediate(() => {
159
+ setTimeout(() => {
160
+ job.execution = processor.execution;
160
161
  this.workflow.resume(job);
161
162
  });
162
163
  });
163
164
  processor.logger.info(`request (#${node.id}) sent to "${config.url}", waiting for response...`);
164
- return processor.exit();
165
+ return job;
165
166
  }
166
167
  async resume(node, job, processor) {
167
168
  const { ignoreFail } = node.config;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流:HTTP 请求节点",
5
5
  "description": "Send HTTP requests to any HTTP service for data interaction in workflow.",
6
6
  "description.zh-CN": "可用于在工作流中向任意 HTTP 服务发送请求,进行数据交互。",
7
- "version": "1.6.0-alpha.12",
7
+ "version": "1.6.0-alpha.14",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow-request",
@@ -22,7 +22,7 @@
22
22
  "@nocobase/server": "1.x",
23
23
  "@nocobase/test": "1.x"
24
24
  },
25
- "gitHead": "b13c1c22daf71b4ec311114a6019c0f061864d9b",
25
+ "gitHead": "1bf7648d7cf62fadef4e31535b4907046a952b4a",
26
26
  "keywords": [
27
27
  "Workflow"
28
28
  ]