One possible completion outcome for a TaskGoal's task: which lead fields are collected, which validation rules must pass, and which funnel node to advance to when this outcome is selected. A TaskGoal holds a list of these; when its task is completed with an outcome id matching one of these, TaskGoal.matches saves the collected fields onto the lead, runs the configured validations, and returns nextNodeId.

Group: Journeys

Implements: Serializable


Properties

PropertyReturnsDescription
fieldsList<String>The lead fields presented for data collection on the task completion form when this outcome is selected.
formPathStringThe path of a form loaded on the task completion page when this outcome is selected, in addition to the fields listed in getFields.
idStringThe identifier for this outcome, matched against the outcome selected in the task completion form.
nextNodeIdStringThe id of the funnel node to advance to when this outcome is selected.
titleStringThe display title for this outcome, shown to the user completing the task.
validationMVELStringAn MVEL expression evaluated to validate this outcome, superseded by getValidations.
validationsList<TaskOutcomeFieldValidation>The structured validation rules checked against the lead's fields when this outcome is selected on task completion.

Methods

addStringValidation(String fieldName, boolean required, Integer minLength, Integer maxLength) · addNumberValidation(String fieldName, boolean required, Integer minValue, Integer maxValue) · getId() · getNextNodeId() · getTitle() · getFields() · getFormPath() · getValidationMVEL() · getValidations()

addStringValidation(String fieldName, boolean required, Integer minLength, Integer maxLength)

Returns: void

Adds a string-length validation rule for the given lead field, checked when this outcome is selected on task completion.

ParameterDescription
fieldNamethe lead field to validate
requiredwhether the field must have a value
minLengththe minimum allowed string length, or null for no minimum
maxLengththe maximum allowed string length, or null for no maximum

addNumberValidation(String fieldName, boolean required, Integer minValue, Integer maxValue)

Returns: void

Adds a numeric-range validation rule for the given lead field, checked when this outcome is selected on task completion.

ParameterDescription
fieldNamethe lead field to validate
requiredwhether the field must have a value
minValuethe minimum allowed numeric value, or null for no minimum
maxValuethe maximum allowed numeric value, or null for no maximum

getId()

Returns: String

The identifier for this outcome, matched against the outcome selected in the task completion form.

getNextNodeId()

Returns: String

The id of the funnel node to advance to when this outcome is selected.

getTitle()

Returns: String

The display title for this outcome, shown to the user completing the task.

getFields()

Returns: List<String>

The lead fields presented for data collection on the task completion form when this outcome is selected.

getFormPath()

Returns: String

The path of a form loaded on the task completion page when this outcome is selected, in addition to the fields listed in getFields.

getValidationMVEL()

Returns: String

An MVEL expression evaluated to validate this outcome, superseded by getValidations.

getValidations()

Returns: List<TaskOutcomeFieldValidation>

The structured validation rules checked against the lead's fields when this outcome is selected on task completion.

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