Funnel goal that creates a Task when a lead reaches it, then waits for a TaskCompleteFunnelEvent naming a matching outcome before advancing to that outcome's next node. Supports two task-creation styles: modern, where taskDefId points to a Funnel TaskDef; and legacy, where taskName, titleMvel, descriptionMvel and the assignToXxxRule fields are evaluated directly as MVEL expressions on entry. When the task is completed with an outcome, matching outcome fields are saved onto the lead, any TaskOutcomeFieldValidation rules and validationMVEL are checked, and the outcome's nextNodeId is returned.
Group: Journeys
Extends: Goal
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| assignLead | boolean | Whether the lead is reassigned to the created task's assignee once the task is created. |
| assignToGroupRule | String | An MVEL expression evaluated on entry to resolve the group the legacy-created task is assigned to. |
| assignToOrgRule | String | An MVEL expression evaluated on entry to resolve the organisation the legacy-created task is assigned to. |
| assignToProfileRule | String | An MVEL expression, optionally a KCode template, evaluated on entry to resolve the profile the legacy-created task is assigned to. When not set, the task is assigned to the lead's current assignee instead. |
| description | String | A short human-readable description of this goal, naming its title, for display in the funnel editor's node list. |
| descriptionMvel | String | An MVEL template evaluated on entry to produce the legacy-created task's description. |
| frequency | String | The time unit used with periodMultiples to compute the legacy-created task's due date, for example "days" or "hours". Not used when this goal creates its task from a TaskDef. |
| periodMultiples | int | The number of frequency units added to the entry time to compute the legacy-created task's due date. A value of zero or less means the task has no due date. Not used when this goal creates its task from a TaskDef. |
| runHour | Integer | An hour-of-day offset intended for the legacy-created task's due date, following the pattern used by TaskDef. Not currently read by this class's due date calculation. |
| taskDefId | String | The id of the TaskDef this goal creates a task from, using the modern task configuration. Null if this goal instead creates its task from the legacy taskName and MVEL fields. |
| taskName | String | The legacy identifier for this task node, used as the created task's task name and to find the lead's active task for it in onExit. |
| taskOutcomes | List<TaskOutcome> | The possible outcomes this task can be completed with, each naming the next funnel node to advance to and any lead fields collected on completion. |
| titleMvel | String | An MVEL template evaluated on entry to produce the legacy-created task's title. When blank, the task is titled "Untitled task". |
Methods
getTaskDefId() · getDescription() · getFrequency() · getTaskName() · getPeriodMultiples() · getRunHour() · getAssignToOrgRule() · getAssignToGroupRule() · getAssignToProfileRule() · getTitleMvel() · getDescriptionMvel() · getTaskOutcomes() · getAssignLead() · findOutcome(String id) · addOutcome(String id, String nextNodeId, String title, List<String> fields) · addOutcome(String id, String nextNodeId, String title, String formPath, List<String> fields, String validationMVEL)
getTaskDefId()
Returns: String
The id of the TaskDef this goal creates a task from, using the modern task configuration. Null if this goal instead creates its task from the legacy taskName and MVEL fields.
getDescription()
Returns: String
A short human-readable description of this goal, naming its title, for display in the funnel editor's node list.
getFrequency()
Returns: String
The time unit used with periodMultiples to compute the legacy-created task's due date, for example "days" or "hours". Not used when this goal creates its task from a TaskDef.
getTaskName()
Returns: String
The legacy identifier for this task node, used as the created task's task name and to find the lead's active task for it in onExit.
getPeriodMultiples()
Returns: int
The number of frequency units added to the entry time to compute the legacy-created task's due date. A value of zero or less means the task has no due date. Not used when this goal creates its task from a TaskDef.
getRunHour()
Returns: Integer
An hour-of-day offset intended for the legacy-created task's due date, following the pattern used by TaskDef. Not currently read by this class's due date calculation.
getAssignToOrgRule()
Returns: String
An MVEL expression evaluated on entry to resolve the organisation the legacy-created task is assigned to.
getAssignToGroupRule()
Returns: String
An MVEL expression evaluated on entry to resolve the group the legacy-created task is assigned to.
getAssignToProfileRule()
Returns: String
An MVEL expression, optionally a KCode template, evaluated on entry to resolve the profile the legacy-created task is assigned to. When not set, the task is assigned to the lead's current assignee instead.
getTitleMvel()
Returns: String
An MVEL template evaluated on entry to produce the legacy-created task's title. When blank, the task is titled "Untitled task".
getDescriptionMvel()
Returns: String
An MVEL template evaluated on entry to produce the legacy-created task's description.
getTaskOutcomes()
Returns: List<TaskOutcome>
The possible outcomes this task can be completed with, each naming the next funnel node to advance to and any lead fields collected on completion.
getAssignLead()
Returns: boolean
Whether the lead is reassigned to the created task's assignee once the task is created.
findOutcome(String id)
Returns: TaskOutcome
Finds the configured task outcome with the given id.
| Parameter | Description |
|---|---|
id | the outcome id to look up |
addOutcome(String id, String nextNodeId, String title, List<String> fields)
Returns: TaskOutcome
Adds a task outcome with no completion form and no validation rule.
| Parameter | Description |
|---|---|
id | the outcome's id, matched against the outcome selected on task completion |
nextNodeId | the funnel node to advance to when this outcome is selected |
title | the outcome's display title |
fields | the lead fields collected when this outcome is selected, or null for none |
addOutcome(String id, String nextNodeId, String title, String formPath, List<String> fields, String validationMVEL)
Returns: TaskOutcome
Adds a task outcome to this goal's configured outcomes.
| Parameter | Description |
|---|---|
id | the outcome's id, matched against the outcome selected on task completion |
nextNodeId | the funnel node to advance to when this outcome is selected |
title | the outcome's display title |
formPath | the path of the form loaded for this outcome on the task completion page, or null for none |
fields | the lead fields collected when this outcome is selected, or null for none |
validationMVEL | a deprecated MVEL expression evaluated to validate the outcome, or null for none |