Table Description
Activity Instance: The runtime data for an activity in an enacted workflow.

A new Activity Instance row is created for each execution of an activity in the enactment of a workflow Process Definition.

Example

You define a workflow (Process Definition) to allow correspondence to be sent to customers whenever their payment details change. The activities defined in your workflow are:

  • system prints out a letter (automatic);
  • User puts the letter in an envelope and posts it (manual); and
  • 'End Process' (a necessary step to end the workflow which is mandated by the Process Definition Tool).

Person John Smith's payment details change due to an increase in rates. This increase raises an event which causes the Workflow Engine to enact your workflow and create a Process Instance.

The Process Definition specifies an initial activity ('system prints out a letter') and so the Workflow Engine creates an Activity Instance row for this initial activity and sets its startDateTime. Because this activity is an automatic one, the Workflow Engine immediately calls the business processing defined by the activity. Upon completion of the business processing, the Workflow Engine sets the endDateTime on the Activity Instance and marks it as completed.

The Workflow Engine follows the transition out of the 'system prints a letter' activity and determines that the next activity is 'User puts the letter in an envelope'. The Workflow Engine creates another Activity Instance row for this next step in the workflow and sets its startDateTime. Because this activity is a manual one, the Workflow Engine creates a Task for a User to perform the work. User Ronan Rooney performs the work and upon completion he opens the correspondence screen and marks the letter as 'sent'. Curam raises an event which causes the Workflow Engine to:

  • close the Task;
  • set the endDateTime on the Activity Instance and mark it as completed; and
  • follows the transition out of the 'User puts the letter in an envelope' activity.

The Workflow Engine determines that the next activity is 'End Process', which performs the necessary clean up and ends the Process Instance.

Technical Notes

There is no 'Activity' database table. An activity is an XML element defined within the Process Definition metadata.

For 'sequential' workflows there will only be at most one active Activity Instance for any Process Instance. However, a Process Definition can specify concurrent paths and thus for such 'concurrent' workflows a Process Instance may have multiple active Activity Instances.

For a workflow which contains no loops, there will be at most one Activity Instance for each activity defined in the Process Definition. However, if the Process Definition makes use of loops, then there can be multiple Activity Instances for the same activity (one for each iteration round the loop); note though that at most one of these 'loop' Activity Instances will be active.

The Process Definition Tool (PDT) ensures that every Process Definition has an 'End Process' activity.

Relationship Diagram
Click the diagram to manipulate and zoom. Traverse the diagram using Click-and-Drag motions.
Attributes (10)
AttributeKeyNullableDescriptionDDL Type
activityInstanceIDYesNoThe unique identifier of a workflow activity instance.SVR_INT64
activityID NoThe unique identifier of the workflow activity.SVR_INT64
status  The status of the activity instance.SVR_STRING<10>
iterationID  An Activity contained within a loop may have multiple instances (one for each iteration of the loop) - this ID allows them to be distinguished from one another.SVR_INT64
processInstanceID NoThe unique identifier of the process instance, within the workflow engine, that is responsible for the workflow of a particular process instance.SVR_INT64
taskID  The ID of the Task associated with this activity instance, if there is one (this will only be populated for Manual Activities).SVR_INT64
category  The category of the workflow activity.SVR_STRING<10>
startDateTime  The date and time this activity instance was started at.SVR_DATETIME
endDateTime  The date and time at which this activity instance completed.SVR_DATETIME
lastWritten   SVR_DATETIME
Foreign Keys (11)
ChildParent
ActivityInstance.processInstanceIDProcessInstance.processInstanceID
ActivityInstance.iterationIDIteration.iterationID
ActivityOccurrence.activityInstanceIDActivityInstance.activityInstanceID
EventWait.activityInstanceIDActivityInstance.activityInstanceID
FailedMessage.activityInstanceIDActivityInstance.activityInstanceID
Iteration.loopActivityInstIDActivityInstance.activityInstanceID
MatchedEvtArchive.activityInstanceIDActivityInstance.activityInstanceID
Reminders.activityInstanceIDActivityInstance.activityInstanceID
SuspendedActivity.activityInstanceIDActivityInstance.activityInstanceID
WDOValuesHistory.activityInstanceIDActivityInstance.activityInstanceID
WorkflowDeadline.activityInstanceIDActivityInstance.activityInstanceID
Indices (5)
Index NameAttributes
PrcInstIdStatusIdxprocessInstanceID, status
ProcInstIDActIDIdxprocessInstanceID, activityID
ActInstTaskIDIndextaskID
ActivityInstIDsIdxprocessInstanceID, activityInstanceID
IND__503607843iterationID
Related Pages (45)
- (ExternalParty_visualiseProcessInstance)
Visualize notification in Process Instance (Inbox_visualiseProcessInstanceForAlert)
Graphical View (ProcessDefinitionTool_visualizeProcessFromAutomaticActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromDecisionActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromEventWaitActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromLoopBeginActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromLoopEndActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromManualActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromParallelDecisionActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromParallelManualActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromProcess)
Graphical View (ProcessDefinitionTool_visualizeProcessFromRouteActivity)
Graphical View (ProcessDefinitionTool_visualizeProcessFromSubflowActivity)
Reallocate Unreserved Tasks (Supervisor_reallocateTasksNotReservedByUser)
Reallocate Reserved Tasks (Supervisor_reallocateTasksReservedByUser)
Reallocate Task (Supervisor_taskReallocate)
Graphical View (Supervisor_TaskvisualiseProcessInstance)
Reallocate Task (TaskManagement_reallocate)
Graphical View (TaskManagement_visualiseProcessInstance)
- (TaskManagement_visualiseProcessInstanceInline)
Reallocate Task: (WorkAllocation_reallocateTask)
Decision (Workflow_freeFormTextDecision)
Decision (Workflow_multipleChoiceDecision)
Abort All Messages (WorkflowAdministration_abortAllMessages)
Abort All Messages (WorkflowAdministration_abortAllMessagesPIE)
Abort Message (WorkflowAdministration_abortMessage)
Abort Message (WorkflowAdministration_abortMessagePIE)
Abort Process Instance (WorkflowAdministration_abortProcessInstance)
- (WorkflowAdministration_listProcessInstanceActivities)
Override Process Instance Activity (WorkflowAdministration_listProcessInstanceActivityEvents)
Activity Instance Event Data (WorkflowAdministration_overrideActivityInstanceNoOverrideData)
Activity Instance Event Data (WorkflowAdministration_overrideActivityInstanceOutputDataAndRaisedByUserName)
Activity Instance Event Data (WorkflowAdministration_overrideActivityInstanceOutputDataOnly)
Activity Instance Event Data (WorkflowAdministration_overrideActivityInstanceRaisedByUserNameOnly)
WorkflowAdministration_processInstanceErrorsSearchByProcessDetails
WorkflowAdministration_processInstanceErrorsSearchByProcessDetailsWithDates
View Process Instance (WorkflowAdministration_viewErrorProcessInstance)
View Message: (WorkflowAdministration_viewMessage)
View Process Instance (WorkflowAdministration_viewProcessInstance)
View Process Instance Activity: (WorkflowAdministration_viewProcessInstanceActivityWithNoOverride)
View Process Instance Activity: (WorkflowAdministration_viewProcessInstanceActivityWithNoOverrideFromViewProcess)
View Process Instance Activity: (WorkflowAdministration_viewProcessInstanceActivityWithOverride)
View Process Instance Activity: (WorkflowAdministration_viewProcessInstanceActivityWithOverrideFromViewProcess)
WorkflowAdministration_viewProcessInstanceByProcessDetails
Visualize Process Instance: (WorkflowAdministration_visualiseProcessInstance)