Merge pull request #14946 from Budibase/fix/branching-bindings
Fix issue with branch step bindings
This commit is contained in:
commit
ae955dfba1
|
@ -39,9 +39,17 @@ export const definition: AutomationStepDefinition = {
|
||||||
branchName: {
|
branchName: {
|
||||||
type: AutomationIOType.STRING,
|
type: AutomationIOType.STRING,
|
||||||
},
|
},
|
||||||
result: {
|
status: {
|
||||||
|
type: AutomationIOType.STRING,
|
||||||
|
description: "Branch result",
|
||||||
|
},
|
||||||
|
branchId: {
|
||||||
|
type: AutomationIOType.STRING,
|
||||||
|
description: "Branch ID",
|
||||||
|
},
|
||||||
|
success: {
|
||||||
type: AutomationIOType.BOOLEAN,
|
type: AutomationIOType.BOOLEAN,
|
||||||
description: "Whether the condition was met",
|
description: "Branch success",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
required: ["output"],
|
required: ["output"],
|
||||||
|
|
|
@ -516,6 +516,7 @@ class Orchestrator {
|
||||||
const condition = await this.evaluateBranchCondition(branch.condition)
|
const condition = await this.evaluateBranchCondition(branch.condition)
|
||||||
if (condition) {
|
if (condition) {
|
||||||
const branchStatus = {
|
const branchStatus = {
|
||||||
|
branchName: branch.name,
|
||||||
status: `${branch.name} branch taken`,
|
status: `${branch.name} branch taken`,
|
||||||
branchId: `${branch.id}`,
|
branchId: `${branch.id}`,
|
||||||
success: true,
|
success: true,
|
||||||
|
@ -528,6 +529,7 @@ class Orchestrator {
|
||||||
branchStatus
|
branchStatus
|
||||||
)
|
)
|
||||||
this.context.steps[this.context.steps.length] = branchStatus
|
this.context.steps[this.context.steps.length] = branchStatus
|
||||||
|
this.context.stepsById[branchStep.id] = branchStatus
|
||||||
|
|
||||||
const branchSteps = children?.[branch.id] || []
|
const branchSteps = children?.[branch.id] || []
|
||||||
// A final +1 to accomodate the branch step itself
|
// A final +1 to accomodate the branch step itself
|
||||||
|
|
Loading…
Reference in New Issue