mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
⚡ Add executionId workflow.postExecute external hook (#2569)
Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
This commit is contained in:
parent
522de66583
commit
8f9dbb7163
|
@ -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);
|
void InternalHooksManager.getInstance().onWorkflowPostExecute(executionId, workflowData, data);
|
||||||
|
|
||||||
if (data.finished === true) {
|
if (data.finished === true) {
|
||||||
|
|
|
@ -186,7 +186,7 @@ export class WorkflowRunner {
|
||||||
if (externalHooks.exists('workflow.postExecute')) {
|
if (externalHooks.exists('workflow.postExecute')) {
|
||||||
postExecutePromise
|
postExecutePromise
|
||||||
.then(async (executionData) => {
|
.then(async (executionData) => {
|
||||||
await externalHooks.run('workflow.postExecute', [executionData, data.workflowData]);
|
await externalHooks.run('workflow.postExecute', [executionData, data.workflowData, executionId]);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('There was a problem running hook "workflow.postExecute"', error);
|
console.error('There was a problem running hook "workflow.postExecute"', error);
|
||||||
|
|
|
@ -268,7 +268,7 @@ export class WorkflowRunnerProcess {
|
||||||
this.childExecutions[executionId] = executeWorkflowFunctionOutput;
|
this.childExecutions[executionId] = executeWorkflowFunctionOutput;
|
||||||
const { workflow } = executeWorkflowFunctionOutput;
|
const { workflow } = executeWorkflowFunctionOutput;
|
||||||
result = await workflowExecute.processRunExecutionData(workflow);
|
result = await workflowExecute.processRunExecutionData(workflow);
|
||||||
await externalHooks.run('workflow.postExecute', [result, workflowData]);
|
await externalHooks.run('workflow.postExecute', [result, workflowData, executionId]);
|
||||||
void InternalHooksManager.getInstance().onWorkflowPostExecute(
|
void InternalHooksManager.getInstance().onWorkflowPostExecute(
|
||||||
executionId,
|
executionId,
|
||||||
workflowData,
|
workflowData,
|
||||||
|
|
Loading…
Reference in a new issue