org.ow2.bonita.facade.runtime
Interface TaskInstance

All Superinterfaces:
ActivityBody, java.io.Serializable

public interface TaskInstance
extends ActivityBody, java.io.Serializable

Author:
Guillaume Porcher

Method Summary
 java.util.Set<java.lang.String> getCandidates()
          Returns the set of users that has been set to the candidates list.
 java.util.Date getCreatedDate()
          Returns the date recorded when the task is created.
 java.util.Date getDueDate()
          Returns the date at which the task must be started.
 java.lang.String getEndedBy()
          Returns the user finishing the activity.
 java.lang.String getStartedBy()
          Returns the user starting the task.
 TaskState getState()
          Returns the current state.
 java.util.List<StateUpdate> getStateUpdates()
          Returns the list of recorded state changes.
 java.lang.String getUserId()
          Returns the assigned user for the task.
 TaskUUID getUUID()
          Returns the UUID of the task.
 boolean isCandidatesInitialized()
           
 boolean isUserIdInitialzed()
           
 
Methods inherited from interface org.ow2.bonita.facade.runtime.ActivityBody
copy, getEndedDate, getStartedDate
 

Method Detail

getCandidates

java.util.Set<java.lang.String> getCandidates()
                                              throws UninitializedFieldException
Returns the set of users that has been set to the candidates list. This list depends on the type of performer that has been defined for the activity. If the performer references an Xpdl participant with a human type this list contains this user. If the performer references an Xpdl participant with a role type this list contains the users being resolved by the role mapper (assuming a role mapper has been defined within the participant having the role type). In this case if no role mapper is defined the returned list contains the participant processDefinitionUUID.

Returns:
A set of candidates.
Throws:
UninitializedFieldException

getUserId

java.lang.String getUserId()
                           throws UninitializedFieldException
Returns the assigned user for the task. If the performer references an Xpdl participant with a human type the returned userId is the user processDefinitionUUID of the participant. If the performer references an Xpdl participant with a role type the returned userId depends on the performer assignment defined within the activity definition. In this case if no performer assignment is defined it returns null.

Returns:
The assigned user for the task.
Throws:
UninitializedFieldException

getStartedBy

java.lang.String getStartedBy()
Returns the user starting the task.

Returns:
The user starting the task.

getEndedBy

java.lang.String getEndedBy()
Returns the user finishing the activity.

Returns:
The user finishing the activity.

getCreatedDate

java.util.Date getCreatedDate()
Returns the date recorded when the task is created. The task is created when the execution flow enters into the activity node defining the task.

Returns:
The date recorded when the task is created.

getDueDate

java.util.Date getDueDate()
Returns the date at which the task must be started.

Returns:
The date at which the task must be started.

getStateUpdates

java.util.List<StateUpdate> getStateUpdates()
Returns the list of recorded state changes.

Returns:
The list of recorded state changes.

getUUID

TaskUUID getUUID()
Returns the UUID of the task.

Specified by:
getUUID in interface ActivityBody
Returns:
The UUID of the task.

getState

TaskState getState()
Returns the current state.

Returns:
The current state.

isCandidatesInitialized

boolean isCandidatesInitialized()

isUserIdInitialzed

boolean isUserIdInitialzed()