@nocobase/plugin-workflow-parallel 1.8.14 → 1.8.16

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.
@@ -11,11 +11,11 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "antd": "5.24.2",
13
13
  "@ant-design/icons": "5.6.1",
14
- "@nocobase/client": "1.8.14",
15
- "@nocobase/plugin-workflow": "1.8.14",
14
+ "@nocobase/client": "1.8.16",
15
+ "@nocobase/plugin-workflow": "1.8.16",
16
16
  "react-i18next": "11.18.6",
17
- "@nocobase/server": "1.8.14",
18
- "@nocobase/plugin-workflow-test": "1.8.14",
19
- "@nocobase/test": "1.8.14",
20
- "@nocobase/utils": "1.8.14"
17
+ "@nocobase/server": "1.8.16",
18
+ "@nocobase/plugin-workflow-test": "1.8.16",
19
+ "@nocobase/test": "1.8.16",
20
+ "@nocobase/utils": "1.8.16"
21
21
  };
@@ -15,5 +15,5 @@ export declare const PARALLEL_MODE: {
15
15
  };
16
16
  export default class extends Instruction {
17
17
  run(node: FlowNodeModel, prevJob: JobModel, processor: Processor): Promise<void>;
18
- resume(node: FlowNodeModel, branchJob: any, processor: Processor): Promise<any>;
18
+ resume(node: FlowNodeModel, branchJob: any, processor: Processor): Promise<JobModel>;
19
19
  }
@@ -120,7 +120,8 @@ class ParallelInstruction_default extends import_plugin_workflow.Instruction {
120
120
  const job = processor.findBranchParentJob(branchJob, node);
121
121
  const { result, status } = job;
122
122
  if (status !== import_plugin_workflow.JOB_STATUS.PENDING) {
123
- return processor.exit();
123
+ processor.logger.warn(`parallel (${job.nodeId}) has been done, ignore newly resumed event`);
124
+ return null;
124
125
  }
125
126
  const jobNode = processor.nodesMap.get(branchJob.nodeId);
126
127
  const branchStartNode = processor.findBranchStartNode(jobNode, node);
@@ -133,8 +134,8 @@ class ParallelInstruction_default extends import_plugin_workflow.Instruction {
133
134
  status: Modes[mode].getStatus(newResult)
134
135
  });
135
136
  if (job.status === import_plugin_workflow.JOB_STATUS.PENDING) {
136
- await job.save({ transaction: processor.transaction });
137
- return processor.exit();
137
+ processor.saveJob(job);
138
+ return null;
138
139
  }
139
140
  return job;
140
141
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流:并行分支节点",
5
5
  "description": "Could be used for parallel execution of branch processes in the workflow.",
6
6
  "description.zh-CN": "用于在工作流中需要并行执行的分支流程。",
7
- "version": "1.8.14",
7
+ "version": "1.8.16",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow-parallel",
@@ -22,7 +22,7 @@
22
22
  "@nocobase/server": "1.x",
23
23
  "@nocobase/test": "1.x"
24
24
  },
25
- "gitHead": "16a9193a22b9a5c5ebb588727153583da8edb92e",
25
+ "gitHead": "3fc4fcf3f7205dece49356a4f1442c6707d509a1",
26
26
  "keywords": [
27
27
  "Workflow"
28
28
  ]