feat: workflow, end node, passthrough result (#1344)

Reviewed-on: daoyoucloud/tachybase#1344
Co-authored-by: bai.zixv <bai.zixv@foxmail.com>
Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
bai.zixv 2024-07-18 17:18:18 +08:00 committed by sealday
parent 220bf172fc
commit 31fc27f8c0

View File

@ -11,6 +11,7 @@ export default class extends Instruction {
async run(node: FlowNodeModel, prevJob, processor: Processor) { async run(node: FlowNodeModel, prevJob, processor: Processor) {
const { endStatus = JOB_STATUS.RESOLVED } = <Config>node.config; const { endStatus = JOB_STATUS.RESOLVED } = <Config>node.config;
await processor.saveJob({ await processor.saveJob({
result: prevJob?.result ?? null,
status: endStatus, status: endStatus,
nodeId: node.id, nodeId: node.id,
nodeKey: node.key, nodeKey: node.key,