Class ProcessCase
java.lang.Object
com.aquima.interactions.process.impl.ProcessCase
- All Implemented Interfaces:
IProcessCase
Class exposing process engine functionality for a case.
- Since:
- 7.1
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ProcessCase
(ProcessEngine processEngine, IMetaModel caseMetaModel, ICaseModel model) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInstance
(ICaseDataInstance instanceModel) void
createTask
(IUserData userData, String taskName, DateTimeValue startDate, String[] roles) This method may be used to create a new task for this case.getAvailableTasks
(IUserData userData) This method will returns an array containing all the process tasks that may be executed for the current case.This method returns a read-only object containing the case profile.getCaseProfile
(CaseDataChangeListener caseDataChangeListener) This method returns a read-only object containing the case profile.This method returns the creation date of the case.long
getId()
This method returns the unique ID of the process case.getInstanceModel
(long instanceId) getInternalCaseProfile
(CaseDataChangeListener processCaseDataListener) getName()
This method returns the name of the of the case.This method returns the status of the case, never nullboolean
isLocked()
This method returns a boolean indicating if the case is locked.void
mapCaseProfile
(IMapping mapping, IProfile sourceMappingProfile) This method maps a source profile to the case profile using the specified mapping.void
removeInstance
(ICaseDataInstance instanceModel) void
unlock()
-
Constructor Details
-
ProcessCase
-
-
Method Details
-
createTask
public IProcessTask createTask(IUserData userData, String taskName, DateTimeValue startDate, String[] roles) Description copied from interface:IProcessCase
This method may be used to create a new task for this case. The newly created task will not be part of any existing process, but defined as a loose task similar to an ad-hoc task.- Specified by:
createTask
in interfaceIProcessCase
- Parameters:
userData
- Object containing information about the current user.taskName
- The name or the description of the task.startDate
- The time at which the task should become active.roles
- The roles that are required to execute the task.- Returns:
- Object representing the newly created task.
-
getAvailableTasks
Description copied from interface:IProcessCase
This method will returns an array containing all the process tasks that may be executed for the current case. If the current case is locked, or no process steps are available, the method will return an empty array. The returned process steps are bound to the user they are requested for.- Specified by:
getAvailableTasks
in interfaceIProcessCase
- Parameters:
userData
- Object containing information about the current user.- Returns:
- Array containing the process steps that may be executed by the supplied user.
-
getId
public long getId()Description copied from interface:IProcessCase
This method returns the unique ID of the process case. The ID of the case is generated at the moment the case is created.- Specified by:
getId
in interfaceIProcessCase
- Returns:
- The unique ID of the case.
-
getName
Description copied from interface:IProcessCase
This method returns the name of the of the case. As the name is optional, this method may return a null value.- Specified by:
getName
in interfaceIProcessCase
- Returns:
- The name of the case.
-
getCreationDate
Description copied from interface:IProcessCase
This method returns the creation date of the case.- Specified by:
getCreationDate
in interfaceIProcessCase
- Returns:
- The creation date of the case, never null
-
getStatus
Description copied from interface:IProcessCase
This method returns the status of the case, never null- Specified by:
getStatus
in interfaceIProcessCase
- Returns:
- The status of the case
-
isLocked
public boolean isLocked()Description copied from interface:IProcessCase
This method returns a boolean indicating if the case is locked. A case will be locked as soon as a task is started for the case, and the lock will be released again when the task has been completed or aborted. Cases that are locked will not return any available process steps.- Specified by:
isLocked
in interfaceIProcessCase
- Returns:
- Boolean indicating if the case is locked.
-
unlock
public void unlock()- Specified by:
unlock
in interfaceIProcessCase
-
getCaseProfile
Description copied from interface:IProcessCase
This method returns a read-only object containing the case profile. The case profile is updated after each process step that has been executed.- Specified by:
getCaseProfile
in interfaceIProcessCase
- Returns:
- Object containing the case profile.
- Throws:
UnknownAttributeException
- Is thrown when the case profile contains data for an unknown attribute.UnknownEntityException
- Is thrown when the case profile contains data for an unknown entity.
-
getCaseProfile
public IProfile getCaseProfile(CaseDataChangeListener caseDataChangeListener) throws UnknownAttributeException, UnknownEntityException Description copied from interface:IProcessCase
This method returns a read-only object containing the case profile. The case profile is updated after each process step that has been executed.- Specified by:
getCaseProfile
in interfaceIProcessCase
- Parameters:
caseDataChangeListener
- profile changeListener for retrieving case-data set to the caseProfile- Returns:
- Object containing the case profile.
- Throws:
UnknownAttributeException
- Is thrown when the case profile contains data for an unknown attribute.UnknownEntityException
- Is thrown when the case profile contains data for an unknown entity.
-
mapCaseProfile
public void mapCaseProfile(IMapping mapping, IProfile sourceMappingProfile) throws UnknownAttributeException, UnknownEntityException Description copied from interface:IProcessCase
This method maps a source profile to the case profile using the specified mapping.- Specified by:
mapCaseProfile
in interfaceIProcessCase
- Parameters:
mapping
- A mapping to be applied after the profile has been recreatedsourceMappingProfile
- The profile to be used as source for the mapping update- Throws:
UnknownAttributeException
- Is thrown when the case profile contains data for an unknown attribute.UnknownEntityException
- Is thrown when the case profile contains data for an unknown entity.
-
getInstanceModel
- Specified by:
getInstanceModel
in interfaceIProcessCase
-
addInstance
- Specified by:
addInstance
in interfaceIProcessCase
-
removeInstance
- Specified by:
removeInstance
in interfaceIProcessCase
-
getInternalCaseProfile
public IProfile getInternalCaseProfile(CaseDataChangeListener processCaseDataListener) throws UnknownAttributeException, UnknownEntityException - Specified by:
getInternalCaseProfile
in interfaceIProcessCase
- Throws:
UnknownAttributeException
UnknownEntityException
-
clearInternalCaseDataCache
public void clearInternalCaseDataCache()- Specified by:
clearInternalCaseDataCache
in interfaceIProcessCase
-
getDisplayName
- Specified by:
getDisplayName
in interfaceIProcessCase
- Returns:
- the display name or null if there is none
-