mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(core): Implement webhook-only manual execution (#4960)
* ⚡ Implement webhook-only manual execution * ♻️ Apply feedback
This commit is contained in:
@@ -27,6 +27,7 @@ export class TestWebhooks {
|
||||
timeout: NodeJS.Timeout;
|
||||
workflowData: IWorkflowDb;
|
||||
workflow: Workflow;
|
||||
destinationNode?: string;
|
||||
};
|
||||
} = {};
|
||||
|
||||
@@ -128,6 +129,7 @@ export class TestWebhooks {
|
||||
}
|
||||
resolve(data);
|
||||
},
|
||||
this.testWebhookData[webhookKey].destinationNode,
|
||||
);
|
||||
|
||||
if (executionId === undefined) {
|
||||
@@ -230,6 +232,7 @@ export class TestWebhooks {
|
||||
timeout,
|
||||
workflow,
|
||||
workflowData,
|
||||
destinationNode,
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
@@ -142,6 +142,7 @@ export async function executeWebhook(
|
||||
req: express.Request,
|
||||
res: express.Response,
|
||||
responseCallback: (error: Error | null, data: IResponseCallbackData) => void,
|
||||
destinationNode?: string,
|
||||
): Promise<string | undefined> {
|
||||
// Get the nodeType to know which responseMode is set
|
||||
const nodeType = workflow.nodeTypes.getByNameAndVersion(
|
||||
@@ -379,6 +380,10 @@ export async function executeWebhook(
|
||||
},
|
||||
} as IRunExecutionData);
|
||||
|
||||
if (destinationNode && runExecutionData.startData) {
|
||||
runExecutionData.startData.destinationNode = destinationNode;
|
||||
}
|
||||
|
||||
if (executionId !== undefined) {
|
||||
// Set the data the webhook node did return on the waiting node if executionId
|
||||
// already exists as it means that we are restarting an existing execution.
|
||||
|
||||
Reference in New Issue
Block a user