org.eclipse.stardust.engine.api.runtime
Interface ActivityInstance

All Superinterfaces:
IDescriptorProvider, RuntimeObject, Serializable

public interface ActivityInstance
extends RuntimeObject, IDescriptorProvider

The ActivityInstance represents a snapshot of the execution state of an activity instance.

The corresponding runtime object is stored in the activity_instance table of the audit trail database.

Version:
$Revision$
Author:
ubirkemeyer

Field Summary
 
Fields inherited from interface org.eclipse.stardust.engine.api.runtime.IDescriptorProvider
PRP_DESCRIPTOR_IDS, PRP_PROPVIDE_DESCRIPTORS
 
Method Summary
 Activity getActivity()
          Gets the workflow activity corresponding to this activity instance.
 ActivityInstanceAttributes getAttributes()
          Get the ActivityInstanceAttributes
 org.eclipse.stardust.engine.core.benchmark.BenchmarkResult getBenchmarkResult()
          Returns the current benchmark value of the activity instance
 double getCriticality()
          Returns the current criticality of an activity instance
 ParticipantInfo getCurrentPerformer()
          Gets the current Performer of this Activity Instance (or null).
 List<HistoricalEvent> getHistoricalEvents()
          Gets a list of requested additional data like notes, delegations, state changes and exceptions.
 List<HistoricalState> getHistoricalStates()
          Gets a list of historical states for the activity instance.
 Date getLastModificationTime()
          Gets the time of the most recent modification of this activity instance.
 String getParticipantPerformerID()
          Gets the ID of the current participant performer of this activity instance.
 String getParticipantPerformerName()
          Gets the name of the current participant performer of this activity instance.
 UserInfo getPerformedBy()
          Returns the user who performed this activity instance.
 String getPerformedByName()
          Gets the name of the user who completed this activity instance.
 long getPerformedByOID()
          Gets the OID of the user who completed this activity instance.
 UserInfo getPerformedOnBehalfOf()
          Returns the user on behalf of this activity instance was performed.
 PermissionState getPermission(String permissionId)
          Gets the PermissionState for the given permission id for the current user.
This information can be used to decide if the user has the permission to perform a certain operation on this activity instance.
 String getProcessDefinitionId()
          Gets the id of the process definition containing the workflow activity associated with this activity instance.
 ProcessInstance getProcessInstance()
          Gets the process instance containing this activity instance.
 long getProcessInstanceOID()
          Gets the OID of the process instance containing this activity instance.
 QualityAssuranceInfo getQualityAssuranceInfo()
          Gets information about the performed quality assurance workflow
 QualityAssuranceUtils.QualityAssuranceState getQualityAssuranceState()
          Gets the state of this activity instance regarding quality assurance
 Date getStartTime()
          Gets the time of the creation of this activity instance.
 ActivityInstanceState getState()
          Gets the current state of this activity instance.
 User getUserPerformer()
          Gets the current User Object of this activity instance.
 String getUserPerformerName()
          Gets the name of the current user performer of this activity instance.
 long getUserPerformerOID()
          Gets the OID of the current user performer of this activity instance.
 boolean isAssignedToModelParticipant()
          Gets whether the current performer of this activity instance is a model participant.
 boolean isAssignedToUser()
          Gets whether the current performer of this activity instance is a user.
 boolean isAssignedToUserGroup()
          Gets whether the current performer of this activity instance is a user group.
 boolean isScopeProcessInstanceNoteAvailable()
          Gets whether a note for the scope process instance of this activity instance is available.
 
Methods inherited from interface org.eclipse.stardust.engine.api.runtime.RuntimeObject
getModelElementID, getModelElementOID, getModelOID, getOID
 
Methods inherited from interface org.eclipse.stardust.engine.api.runtime.IDescriptorProvider
getDescriptorDefinitions, getDescriptorValue
 

Method Detail

getQualityAssuranceInfo

QualityAssuranceInfo getQualityAssuranceInfo()
Gets information about the performed quality assurance workflow

Returns:
information about the performed quality assurance workflow or null if this is a not quality assurance enabled instance

getQualityAssuranceState

QualityAssuranceUtils.QualityAssuranceState getQualityAssuranceState()
Gets the state of this activity instance regarding quality assurance

Returns:
the QualityAssuranceUtils.QualityAssuranceState this instance is in

getAttributes

ActivityInstanceAttributes getAttributes()
Get the ActivityInstanceAttributes

Returns:
the ActivityInstanceAttributes for this activity instance

getState

ActivityInstanceState getState()
Gets the current state of this activity instance.

Returns:
the state of this activity instance.

getStartTime

Date getStartTime()
Gets the time of the creation of this activity instance.

Returns:
the time when the activity instance has been instantiated.

getLastModificationTime

Date getLastModificationTime()
Gets the time of the most recent modification of this activity instance.

An activity instance is considered modified if it's state has changed.

Returns:
The last modification time of this activity instance.
See Also:
getState()

getActivity

Activity getActivity()
Gets the workflow activity corresponding to this activity instance.

Returns:
the workflow activity.

getProcessDefinitionId

String getProcessDefinitionId()
Gets the id of the process definition containing the workflow activity associated with this activity instance.

See Also:
ProcessDefinition

getProcessInstanceOID

long getProcessInstanceOID()
Gets the OID of the process instance containing this activity instance.

Returns:
the OID of the parent process instance

getProcessInstance

ProcessInstance getProcessInstance()
Gets the process instance containing this activity instance. If the user does not have the permission to read the process instance (declarative security) then this method returns null.

Returns:
the process instance initialized with ProcessInstanceDetailsLevel.Core of the activity instance

getUserPerformerOID

long getUserPerformerOID()
Gets the OID of the current user performer of this activity instance.

Returns:
the OID of the user or 0 if not assigned to a user.
See Also:
isAssignedToUser()

getUserPerformerName

String getUserPerformerName()
Gets the name of the current user performer of this activity instance.

Returns:
the name of the user or null if not assigned to a user.
See Also:
isAssignedToUser()

getUserPerformer

User getUserPerformer()
Gets the current User Object of this activity instance.

Returns:
the User object or null if not assigned to a user.
See Also:
isAssignedToUser()

getParticipantPerformerID

String getParticipantPerformerID()
Gets the ID of the current participant performer of this activity instance.

Returns:
the ID of the performer or null if assigned to a user.
See Also:
isAssignedToUser()

getParticipantPerformerName

String getParticipantPerformerName()
Gets the name of the current participant performer of this activity instance.

Returns:
the name of the performer or null if assigned to a user.
See Also:
isAssignedToUser()

isAssignedToUser

boolean isAssignedToUser()
Gets whether the current performer of this activity instance is a user.

Returns:
true, if the current performer is a user.
See Also:
isAssignedToModelParticipant(), isAssignedToUserGroup()

isAssignedToModelParticipant

boolean isAssignedToModelParticipant()
Gets whether the current performer of this activity instance is a model participant.

Returns:
true, if the current performer is a model participant.
See Also:
isAssignedToUser(), isAssignedToUserGroup()

isAssignedToUserGroup

boolean isAssignedToUserGroup()
Gets whether the current performer of this activity instance is a user group.

Returns:
true, if the current performer is a user group.
See Also:
isAssignedToUser(), isAssignedToModelParticipant()

getCurrentPerformer

ParticipantInfo getCurrentPerformer()
Gets the current Performer of this Activity Instance (or null). Can be a user group, a user or model participant.

Returns:
The current performer.

getPerformedByOID

long getPerformedByOID()
Gets the OID of the user who completed this activity instance.

Returns:
the OID of the user, or 0 if this activity instance is not yet completed.

getPerformedByName

String getPerformedByName()
Gets the name of the user who completed this activity instance.

Returns:
the name of the user, or null if this activity instance is not yet completed.

getPerformedBy

UserInfo getPerformedBy()
Returns the user who performed this activity instance.

Returns:
The user who performed this activity instance or null if the activity instance is not completed.

getPerformedOnBehalfOf

UserInfo getPerformedOnBehalfOf()
Returns the user on behalf of this activity instance was performed.

Returns:
The user on behalf of this activity instance was performed or null if the activity instance is not completed or if it was not performed on behalf of another user.

isScopeProcessInstanceNoteAvailable

boolean isScopeProcessInstanceNoteAvailable()
Gets whether a note for the scope process instance of this activity instance is available.

Returns:
true, if note is available for scope process instance.

getHistoricalStates

List<HistoricalState> getHistoricalStates()
Gets a list of historical states for the activity instance. This list is sorted in descending order (latest state first).

Returns:
the list of historical states.

getHistoricalEvents

List<HistoricalEvent> getHistoricalEvents()
Gets a list of requested additional data like notes, delegations, state changes and exceptions. This list is sorted in ascending order (oldest first).
The list will be populated depending on HistoricalEventPolicy applied to ActivityInstanceQuery and WorklistQuery. By default this list will be empty as retrieval might degrade query performance.

Returns:
list of all historical events
See Also:
HistoricalEvent, HistoricalEventPolicy

getPermission

PermissionState getPermission(String permissionId)
Gets the PermissionState for the given permission id for the current user.
This information can be used to decide if the user has the permission to perform a certain operation on this activity instance.

Parameters:
permissionId - - the id of the permission, valid values are:
  • delegateToUser
  • - if the user is allowed to delegate this activity instance to another user
  • abortActivityInstance
  • - if the user is allowed to abort this activity instance
Returns:
PermissionState.Granted - if the user has the specified permission
PermissionState.Denied - if the user has not the specified permission
PermissionState.Unknown if the permission is unknown.

getCriticality

double getCriticality()
Returns the current criticality of an activity instance

Returns:
the value if the criticality

getBenchmarkResult

org.eclipse.stardust.engine.core.benchmark.BenchmarkResult getBenchmarkResult()
Returns the current benchmark value of the activity instance

Returns:
the result of the benchmark


Copyright © 2017 Eclipse Stardust. All Rights Reserved.