Skip to content

Commit

Permalink
also consider triggerToStartFrom.name when looking for a start node
Browse files Browse the repository at this point in the history
  • Loading branch information
despairblue committed Jan 24, 2025
1 parent 2b48850 commit 18f24a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/cli/src/manual-execution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ export class ManualExecutionService {

getExecutionStartNode(data: IWorkflowExecutionDataProcess, workflow: Workflow) {
let startNode;

// If the user chose a trigger to start from we honor this.
if (data.triggerToStartFrom?.name) {
startNode = workflow.getNode(data.triggerToStartFrom.name) ?? undefined;
}

// Old logic for partial executions v1
if (
data.startNodes?.length === 1 &&
Object.keys(data.pinData ?? {}).includes(data.startNodes[0].name)
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/composables/useRunWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof u
executedNode = options.triggerNode;
}

if (options.triggerNode && options.nodeData) {
if (options.triggerNode) {
triggerToStartFrom = {
name: options.triggerNode,
data: options.nodeData,
Expand Down

0 comments on commit 18f24a1

Please sign in to comment.