Skip to content

Commit

Permalink
⚡ Add executionId workflow.postExecute external hook (#2569)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
  • Loading branch information
sebto and janober authored Dec 25, 2021
1 parent 522de66 commit 8f9dbb7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/WorkflowExecuteAdditionalData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ export async function executeWorkflow(
};
}

await externalHooks.run('workflow.postExecute', [data, workflowData]);
await externalHooks.run('workflow.postExecute', [data, workflowData, executionId]);
void InternalHooksManager.getInstance().onWorkflowPostExecute(executionId, workflowData, data);

if (data.finished === true) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/WorkflowRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class WorkflowRunner {
if (externalHooks.exists('workflow.postExecute')) {
postExecutePromise
.then(async (executionData) => {
await externalHooks.run('workflow.postExecute', [executionData, data.workflowData]);
await externalHooks.run('workflow.postExecute', [executionData, data.workflowData, executionId]);
})
.catch((error) => {
console.error('There was a problem running hook "workflow.postExecute"', error);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/WorkflowRunnerProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class WorkflowRunnerProcess {
this.childExecutions[executionId] = executeWorkflowFunctionOutput;
const { workflow } = executeWorkflowFunctionOutput;
result = await workflowExecute.processRunExecutionData(workflow);
await externalHooks.run('workflow.postExecute', [result, workflowData]);
await externalHooks.run('workflow.postExecute', [result, workflowData, executionId]);
void InternalHooksManager.getInstance().onWorkflowPostExecute(
executionId,
workflowData,
Expand Down

0 comments on commit 8f9dbb7

Please sign in to comment.