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
| Property | Returns | Description |
|---|---|---|
| fields | List<String> | The lead fields presented for data collection on the task completion form when this outcome is selected. |
| formPath | 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. |
| id | String | The identifier for this outcome, matched against the outcome selected in the task completion form. |
| nextNodeId | String | The id of the funnel node to advance to when this outcome is selected. |
| title | String | The display title for this outcome, shown to the user completing the task. |
| validationMVEL | String | An MVEL expression evaluated to validate this outcome, superseded by getValidations. |
| validations | List<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.
| Parameter | Description |
|---|---|
fieldName | the lead field to validate |
required | whether the field must have a value |
minLength | the minimum allowed string length, or null for no minimum |
maxLength | the 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.
| Parameter | Description |
|---|---|
fieldName | the lead field to validate |
required | whether the field must have a value |
minValue | the minimum allowed numeric value, or null for no minimum |
maxValue | the 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.