The current state of one piece of work an AI agent is carrying out, much as a Lead is the state of one profile's progress through a journey. The shape of the work comes from an AgentWorkflowDef, named by workflowName, belonging to the AgentDef named by agentDefName, and currentStep records which step of that definition the work has reached. Each row belongs to one account and has an owning profile, and sourceItem points at whatever the work is about, as a URI style string such as invoice:abc123. A workflow is finished when completedDate or cancelledDate is set; until then both are null.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
adminOrgOrganisationThe account this workflow belongs to. Every lookup is scoped to it. Never null, and lazily loaded.
agentDefNameStringName of the AgentDef that owns the workflow definition driving this piece of work. Never null, and up to 100 characters.
cancelledDateDateDate and time the work was abandoned. Null unless it was cancelled.
completedDateDateDate and time the work finished successfully. Null while it is still running.
createdDateDateDate and time the workflow was started. Never null.
currentStepStringName of the step in the workflow definition that the work has reached. Up to 100 characters.
idlongDatabase identifier for this workflow.
modifiedDateDateDate and time the workflow was last changed, for example when it moved to a new step. Never null.
ownerProfileThe profile the work is being done for or by. Never null, and lazily loaded.
sourceItemStringIdentifies whatever the work is about, in a URI style form of type and identifier, for example invoice:abc123 or cart:42. Up to 100 characters.
statusStringFree text status label for the work, up to 100 characters. The values are not constrained by the platform, so what they mean is up to whatever sets them.
workflowNameStringName of the AgentWorkflowDef this row is an instance of, which defines the steps the work moves through. Never null, and up to 100 characters.

Methods

getId() · setId(long id) · getAgentDefName() · setAgentDefName(String agentDefName) · getWorkflowName() · setWorkflowName(String workflowName) · getCurrentStep() · setCurrentStep(String currentStep) · getSourceItem() · setSourceItem(String sourceItem) · getAdminOrg() · setAdminOrg(Organisation adminOrg) · getOwner() · setOwner(Profile owner) · getModifiedDate() · setModifiedDate(Date modifiedDate) · getCreatedDate() · setCreatedDate(Date createdDate) · getCompletedDate() · setCompletedDate(Date completedDate) · getCancelledDate() · setCancelledDate(Date cancelledDate) · getStatus() · setStatus(String status) · rowId()

getId()

Returns: long

Database identifier for this workflow.

setId(long id)

Returns: void

Sets the database identifier. Normally only assigned by the persistence layer.

ParameterDescription
idthe primary key to assign

getAgentDefName()

Returns: String

Name of the AgentDef that owns the workflow definition driving this piece of work. Never null, and up to 100 characters.

setAgentDefName(String agentDefName)

Returns: void

Sets the name of the AgentDef driving this work. Required.

ParameterDescription
agentDefNamethe agent definition's name

getWorkflowName()

Returns: String

Name of the AgentWorkflowDef this row is an instance of, which defines the steps the work moves through. Never null, and up to 100 characters.

setWorkflowName(String workflowName)

Returns: void

Sets the name of the workflow definition this row is an instance of. Required.

ParameterDescription
workflowNamethe workflow definition's name

getCurrentStep()

Returns: String

Name of the step in the workflow definition that the work has reached. Up to 100 characters.

setCurrentStep(String currentStep)

Returns: void

Moves the work to a step of the workflow definition. Must match a step name in that definition.

ParameterDescription
currentStepthe step's name

getSourceItem()

Returns: String

Identifies whatever the work is about, in a URI style form of type and identifier, for example invoice:abc123 or cart:42. Up to 100 characters.

setSourceItem(String sourceItem)

Returns: void

Sets the reference to whatever the work is about, in type and identifier form.

ParameterDescription
sourceItemthe source item reference

getAdminOrg()

Returns: Organisation

The account this workflow belongs to. Every lookup is scoped to it. Never null, and lazily loaded.

setAdminOrg(Organisation adminOrg)

Returns: void

Sets the account this workflow belongs to. Required.

ParameterDescription
adminOrgthe admin organisation the workflow belongs to

getOwner()

Returns: Profile

The profile the work is being done for or by. Never null, and lazily loaded.

setOwner(Profile owner)

Returns: void

Sets the profile the work belongs to. Required.

ParameterDescription
ownerthe owning profile

getModifiedDate()

Returns: Date

Date and time the workflow was last changed, for example when it moved to a new step. Never null.

setModifiedDate(Date modifiedDate)

Returns: void

Sets the date and time the workflow was last changed. Required, so update it whenever the row changes.

ParameterDescription
modifiedDatethe last modified date

getCreatedDate()

Returns: Date

Date and time the workflow was started. Never null.

setCreatedDate(Date createdDate)

Returns: void

Sets the date and time the workflow was started. Required.

ParameterDescription
createdDatethe creation date

getCompletedDate()

Returns: Date

Date and time the work finished successfully. Null while it is still running.

setCompletedDate(Date completedDate)

Returns: void

Marks the work as completed at the given date, or clears the completion by setting null.

ParameterDescription
completedDatethe completion date, or null to reopen the work

getCancelledDate()

Returns: Date

Date and time the work was abandoned. Null unless it was cancelled.

setCancelledDate(Date cancelledDate)

Returns: void

Marks the work as cancelled at the given date, or clears the cancellation by setting null.

ParameterDescription
cancelledDatethe cancellation date, or null to reopen the work

getStatus()

Returns: String

Free text status label for the work, up to 100 characters. The values are not constrained by the platform, so what they mean is up to whatever sets them.

setStatus(String status)

Returns: void

Sets the free text status label for the work.

ParameterDescription
statusthe status label

rowId()

Returns: Long

Row identifier used by the reporting layer, the same value as the primary key.

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