Add hook which gets called after a workflow execution

This commit is contained in:
Jan Oberhauser
2020-10-20 19:01:40 +02:00
parent cf31ec722c
commit 70435b582a
4 changed files with 23 additions and 2 deletions

View File

@@ -406,6 +406,8 @@ export async function executeWorkflow(workflowInfo: IExecuteWorkflowInfo, additi
const workflowExecute = new WorkflowExecute(additionalDataIntegrated, mode, runExecutionData);
const data = await workflowExecute.processRunExecutionData(workflow);
await externalHooks.run('workflow.postExecute', [data, workflowData]);
if (data.finished === true) {
// Workflow did finish successfully
const returnData = WorkflowHelpers.getDataLastExecutedNodeData(data);