A parallel branch of a lead's progress through a journey, tracking its own current goal and its own timeout timer independently of the lead. A fork is created by a Fork Goal node, one for each of its secondary next nodes, so a lead can be working towards several goals at once. Each fork records the goal it is currently waiting on, the goal it last attained and when, and the date its current goal times out. The timer scanner claims due forks by stamping processingStartedAt, clears completedProcessingAt when the work is done, and counts attempts in numAttempts. Forks belong to a lead and may point back at the fork they were split from.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| completedProcessingAt | Date | Set when the fork's timer has been successfully processed. While it is null the fork is still considered outstanding and can be picked up by the timer scanner. |
| createdDate | Date | Date and time this fork was created, which is when the lead passed through the fork node that produced it. |
| currentGoal | String | Id of the journey node this fork is currently working towards. Null once the fork has no outstanding goal, for example immediately after a goal is attained and before the next one is entered. |
| id | long | Database identifier for this fork. |
| lastAttainedDate | Date | Date and time the fork last attained a goal. This is the base date that the current goal's timeout is measured from. |
| lastAttainedGoal | String | Id of the journey node this fork most recently attained. |
| lead | Lead | The lead this fork belongs to. All forks of a lead run through the same journey as that lead. |
| leadFork | LeadFork | The fork this one was split from, if the fork was created while the lead was already on a fork rather than on its main path. Lazily loaded. |
| notes | String | Free text notes recorded against this fork, for example why it was created or how a step was resolved. |
| numAttempts | Integer | Number of times processing of this fork's timer has been attempted. The scanner skips forks that have reached the configured maximum, so a fork that keeps failing is eventually left alone. |
| processingStartedAt | Date | When a process begins processing this fork it immediately sets and commits this property, which stops other processes taking the same fork until the configured timeout has elapsed. |
| timerDate | Date | Date and time the current goal times out. The timer scanner picks up forks whose timerDate has passed and moves them down their timeout path. |
Methods
getId() · setId(long id) · getCurrentGoal() · setCurrentGoal(String currentGoal) · getLastAttainedDate() · setLastAttainedDate(Date lastAttainedDate) · getLastAttainedGoal() · setLastAttainedGoal(String lastAttainedGoal) · getTimerDate() · setTimerDate(Date timerDate) · getNumAttempts() · setNumAttempts(Integer numAttempts) · getProcessingStartedAt() · setProcessingStartedAt(Date processingStartedAt) · getCompletedProcessingAt() · setCompletedProcessingAt(Date completedProcessingAt) · getLead() · setLead(Lead lead) · getLeadFork() · setLeadFork(LeadFork relatedFork) · getNotes() · setNotes(String notes) · getCreatedDate() · setCreatedDate(Date createdDate)
getId()
Returns: long
Database identifier for this fork.
setId(long id)
Returns: void
Sets the database identifier. Normally only assigned by the persistence layer.
| Parameter | Description |
|---|---|
id | the primary key to assign |
getCurrentGoal()
Returns: String
Id of the journey node this fork is currently working towards. Null once the fork has no outstanding goal, for example immediately after a goal is attained and before the next one is entered.
setCurrentGoal(String currentGoal)
Returns: void
Sets the id of the journey node this fork is working towards.
| Parameter | Description |
|---|---|
currentGoal | the journey node id of the new current goal, or null for none |
getLastAttainedDate()
Returns: Date
Date and time the fork last attained a goal. This is the base date that the current goal's timeout is measured from.
setLastAttainedDate(Date lastAttainedDate)
Returns: void
Sets the date and time the fork last attained a goal.
| Parameter | Description |
|---|---|
lastAttainedDate | the date the last goal was attained |
getLastAttainedGoal()
Returns: String
Id of the journey node this fork most recently attained.
setLastAttainedGoal(String lastAttainedGoal)
Returns: void
Sets the id of the journey node this fork most recently attained.
| Parameter | Description |
|---|---|
lastAttainedGoal | the journey node id of the attained goal |
getTimerDate()
Returns: Date
Date and time the current goal times out. The timer scanner picks up forks whose timerDate has passed and moves them down their timeout path.
setTimerDate(Date timerDate)
Returns: void
Sets the date and time the current goal times out.
| Parameter | Description |
|---|---|
timerDate | the timeout date, or null to leave the fork without a timer |
getNumAttempts()
Returns: Integer
Number of times processing of this fork's timer has been attempted. The scanner skips forks that have reached the configured maximum, so a fork that keeps failing is eventually left alone.
setNumAttempts(Integer numAttempts)
Returns: void
Sets the number of processing attempts recorded against this fork.
| Parameter | Description |
|---|---|
numAttempts | the attempt count |
getProcessingStartedAt()
Returns: Date
When a process begins processing this fork it immediately sets and commits this property, which stops other processes taking the same fork until the configured timeout has elapsed.
setProcessingStartedAt(Date processingStartedAt)
Returns: void
Sets the time processing of this fork was claimed. Setting it to null releases the claim.
| Parameter | Description |
|---|---|
processingStartedAt | the time processing was claimed |
getCompletedProcessingAt()
Returns: Date
Set when the fork's timer has been successfully processed. While it is null the fork is still considered outstanding and can be picked up by the timer scanner.
setCompletedProcessingAt(Date completedProcessingAt)
Returns: void
Sets the time the fork's timer finished processing. Setting it to null makes the fork outstanding again.
| Parameter | Description |
|---|---|
completedProcessingAt | the time processing completed |
getLead()
Returns: Lead
The lead this fork belongs to. All forks of a lead run through the same journey as that lead.
setLead(Lead lead)
Returns: void
Sets the lead this fork belongs to.
| Parameter | Description |
|---|---|
lead | the owning lead |
getLeadFork()
Returns: LeadFork
The fork this one was split from, if the fork was created while the lead was already on a fork rather than on its main path. Lazily loaded.
setLeadFork(LeadFork relatedFork)
Returns: void
Sets the fork this one was split from.
| Parameter | Description |
|---|---|
relatedFork | the parent fork, or null if split from the lead's main path |
getNotes()
Returns: String
Free text notes recorded against this fork, for example why it was created or how a step was resolved.
setNotes(String notes)
Returns: void
Sets the free text notes recorded against this fork.
| Parameter | Description |
|---|---|
notes | the notes to record |
getCreatedDate()
Returns: Date
Date and time this fork was created, which is when the lead passed through the fork node that produced it.
setCreatedDate(Date createdDate)
Returns: void
Sets the date and time this fork was created.
| Parameter | Description |
|---|---|
createdDate | the creation date |