One possible outcome an admin can select when completing a TaskRecipeStep's task, carrying the next step to enter and the JS functions that drive its behaviour. Configured as an "outcome" element nested within a recipe-task step. Selecting an outcome runs its process function (if any) via RecipeManager.completeTaskWithOutcome, then transitions the recipe to its next step.
Group: Recipes
Properties
| Property | Returns | Description |
|---|---|---|
| canCompleteFn | String | The JS function that checks whether this outcome can currently be completed. |
| defaultFormValue | String | Default value used to pre-fill this outcome's form. |
| formPath | String | Path to the form shown when the admin selects this outcome. |
| id | String | Unique identifier for this outcome within its step. |
| isAvailFn | String | The JS function that checks whether this outcome is currently available to be selected, for example only offering an outcome if a related resource already exists. |
| nextStep | RecipeStep | The step to enter after this outcome is processed, resolved from the recipe by the init method. |
| nextStepId | String | The id of the next step this outcome transitions to, captured at construction time. |
| processFn | String | The JS function run when this outcome is selected. It accepts a RecipeContext and a FormContext, and returns a JsonResult indicating success or failure; a failed result should include validation messages. |
| relatedHref | String | The configured related link for this outcome, before resolving any "function:" callback or parameter placeholders. Use relatedHref on the owning step to get the resolved value. |
| title | String | Display title for this outcome, shown to the admin as a choice when completing the task. |
Methods
getTitle() · getFormPath() · getId() · getNextStep() · getNextStepId() · getRelatedHref() · getProcessFn() · getCanCompleteFn() · getIsAvailFn() · getDefaultFormValue()
getTitle()
Returns: String
Display title for this outcome, shown to the admin as a choice when completing the task.
getFormPath()
Returns: String
Path to the form shown when the admin selects this outcome.
getId()
Returns: String
Unique identifier for this outcome within its step.
getNextStep()
Returns: RecipeStep
The step to enter after this outcome is processed, resolved from the recipe by the init method.
getNextStepId()
Returns: String
The id of the next step this outcome transitions to, captured at construction time.
getRelatedHref()
Returns: String
The configured related link for this outcome, before resolving any "function:" callback or parameter placeholders. Use relatedHref on the owning step to get the resolved value.
getProcessFn()
Returns: String
The JS function run when this outcome is selected. It accepts a RecipeContext and a FormContext, and returns a JsonResult indicating success or failure; a failed result should include validation messages.
getCanCompleteFn()
Returns: String
The JS function that checks whether this outcome can currently be completed.
getIsAvailFn()
Returns: String
The JS function that checks whether this outcome is currently available to be selected, for example only offering an outcome if a related resource already exists.
getDefaultFormValue()
Returns: String
Default value used to pre-fill this outcome's form.