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

PropertyReturnsDescription
canCompleteFnStringThe JS function that checks whether this outcome can currently be completed.
defaultFormValueStringDefault value used to pre-fill this outcome's form.
formPathStringPath to the form shown when the admin selects this outcome.
idStringUnique identifier for this outcome within its step.
isAvailFnStringThe 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.
nextStepRecipeStepThe step to enter after this outcome is processed, resolved from the recipe by the init method.
nextStepIdStringThe id of the next step this outcome transitions to, captured at construction time.
processFnStringThe 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.
relatedHrefStringThe 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.
titleStringDisplay 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.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.