fix(plugin-workflow): fix loading workflow in manually executing (#5877)

This commit is contained in:
Junyi 2024-12-13 09:37:55 +08:00 committed by GitHub
parent b372aa1735
commit 2cb4304a38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,14 +112,16 @@ export default class Processor {
execution, execution,
options: { plugin }, options: { plugin },
} = this; } = this;
if (!execution.workflow) {
execution.workflow = plugin.enabledCache.get(execution.workflowId);
}
this.mainTransaction = plugin.useDataSourceTransaction('main', this.transaction); this.mainTransaction = plugin.useDataSourceTransaction('main', this.transaction);
const transaction = this.mainTransaction; const transaction = this.mainTransaction;
if (!execution.workflow) {
execution.workflow =
plugin.enabledCache.get(execution.workflowId) || (await execution.getWorkflow({ transaction }));
}
const nodes = await execution.workflow.getNodes({ transaction }); const nodes = await execution.workflow.getNodes({ transaction });
this.makeNodes(nodes); this.makeNodes(nodes);