mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-23 20:50:00 +00:00
⚡ Save on new workflow executions with webhook (#2231)
* save on new workflow executions * only save if webhook node
This commit is contained in:
@@ -140,6 +140,12 @@ export const workflowRun = mixins(
|
||||
startNodes.push(nodeName);
|
||||
}
|
||||
|
||||
const isNewWorkflow = this.$store.getters.isNewWorkflow;
|
||||
const hasWebhookNode = this.$store.getters.currentWorkflowHasWebhookNode;
|
||||
if (isNewWorkflow && hasWebhookNode) {
|
||||
await this.saveCurrentWorkflow();
|
||||
}
|
||||
|
||||
const workflowData = await this.getWorkflowDataToSave();
|
||||
|
||||
const startRunData: IStartRunData = {
|
||||
|
||||
@@ -606,6 +606,10 @@ export const store = new Vuex.Store({
|
||||
return state.workflow.id === PLACEHOLDER_EMPTY_WORKFLOW_ID;
|
||||
},
|
||||
|
||||
currentWorkflowHasWebhookNode: (state: IRootState): boolean => {
|
||||
return !!state.workflow.nodes.find((node: INodeUi) => !!node.webhookId);
|
||||
},
|
||||
|
||||
getActiveExecutions: (state): IExecutionsCurrentSummaryExtended[] => {
|
||||
return state.activeExecutions;
|
||||
},
|
||||
@@ -790,6 +794,7 @@ export const store = new Vuex.Store({
|
||||
workflowId: (state): string => {
|
||||
return state.workflow.id;
|
||||
},
|
||||
|
||||
workflowSettings: (state): IWorkflowSettings => {
|
||||
if (state.workflow.settings === undefined) {
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user