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

PropertyReturnsDescription
assignLeadbooleanWhether the lead is reassigned to the created task's assignee once the task is created.
assignToGroupRuleStringAn MVEL expression evaluated on entry to resolve the group the legacy-created task is assigned to.
assignToOrgRuleStringAn MVEL expression evaluated on entry to resolve the organisation the legacy-created task is assigned to.
assignToProfileRuleStringAn 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.
descriptionStringA short human-readable description of this goal, naming its title, for display in the funnel editor's node list.
descriptionMvelStringAn MVEL template evaluated on entry to produce the legacy-created task's description.
frequencyStringThe 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.
periodMultiplesintThe 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.
runHourIntegerAn 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.
taskDefIdStringThe 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.
taskNameStringThe 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.
taskOutcomesList<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.
titleMvelStringAn 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.

ParameterDescription
idthe 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.

ParameterDescription
idthe outcome's id, matched against the outcome selected on task completion
nextNodeIdthe funnel node to advance to when this outcome is selected
titlethe outcome's display title
fieldsthe 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.

ParameterDescription
idthe outcome's id, matched against the outcome selected on task completion
nextNodeIdthe funnel node to advance to when this outcome is selected
titlethe outcome's display title
formPaththe path of the form loaded for this outcome on the task completion page, or null for none
fieldsthe lead fields collected when this outcome is selected, or null for none
validationMVELa deprecated MVEL expression evaluated to validate the outcome, or null for none
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.