com.silverpeas.workflow.engine.instance
Class ProcessInstanceImpl

java.lang.Object
  extended by com.silverpeas.workflow.engine.instance.ProcessInstanceImpl
All Implemented Interfaces:
ProcessInstance, UpdatableProcessInstance

public class ProcessInstanceImpl
extends Object
implements UpdatableProcessInstance

This class is one implementation of interface UpdatableProcessInstance. It uses Castor library to read/write process instance information in database


Constructor Summary
ProcessInstanceImpl()
          Default constructor
 
Method Summary
 void addActiveState(State state)
          Set a state active for this instance
 void addHistoryStep(HistoryStep step)
          Add an history step for this instance
 void addInterestedUser(Actor actor, State state)
           
 void addInterestedUser(User user, State state, String role)
          Add an user in the interested user list
 void addQuestion(Question question)
          Add a question for this instance
 State addQuestion(String content, String stepId, State fromState, User fromUser)
          Add a question
 void addTimeout(State state)
           
 void addWorkingUser(Actor actor, State state)
           
 void addWorkingUser(User user, State state, String role)
          Add an user in the working user list
 State answerQuestion(String content, String questionId)
          Answer a question
 void cancelQuestion(Question question)
          Cancel a question without response 1 - make a fictive answer 2 - remove active state 3 - remove working user 4 - recurse in question target state, if questions have been asked in cascade
 Vector<ActiveState> castor_getActiveStates()
          Get states that are due to be resolved for this process instance
 Vector castor_getHistorySteps()
          Get the instance history steps
 Vector<InterestedUser> castor_getInterestedUsers()
          Get users who can see this process instance
 Vector<LockingUser> castor_getLockingUsers()
          Get users who have locked a state of this process instance
 Vector<Question> castor_getQuestions()
          Get the instance questions
 Vector<WorkingUser> castor_getWorkingUsers()
          Get users who can act on this process instance
 void castor_setActiveStates(Vector<ActiveState> activeStates)
          Set states that are due to be resolved for this process instance
 void castor_setHistorySteps(Vector historySteps)
          Set the instance history steps
 void castor_setInterestedUsers(Vector<InterestedUser> interestedUsers)
          Set users who can see this process instance
 void castor_setLockingUsers(Vector<LockingUser> lockingUsers)
          Set users who have locked a state of this process instance
 void castor_setQuestions(Vector<Question> questions)
          Set the instance questions
 void castor_setWorkingUsers(Vector<WorkingUser> workingUsers)
          Set users who can act on this process instance
 void computeValid()
           
 String create()
          Creates this instance in database
 void delete()
          Permanently removes this instance from database
 boolean equals(Object obj)
           
 DataRecord getActionRecord(String actionName)
          Get the data associated to the given action
 String[] getActiveStates()
           
 Actor[] getActors(QualifiedUsers qualifiedUsers, State state)
          Computes tuples role/user/state (stored in an Actor object) from a QualifiedUsers object
 DataRecord getAllDataRecord(String role, String lang)
          Returns a data record with all the accessible data in this instance.
 String[] getAssignedStates(User user, String roleName)
          Returns all the state name assigned to the user.
 HistoryStep[] getBackSteps(User user, String roleName, String stateName)
          Get all the steps where given user (with given role) can go back from the given state
 boolean getErrorStatus()
          Get the error status of this instance
 int getErrorStatusCastor()
           
 Field getField(String fieldName)
          Returns the required field from the folder.
 DataRecord getFolder()
          Returns the folder as a DataRecord
 DataRecord getFormRecord(String formName, String role, String lang)
           
 HistoryStep getHistoryStep(String stepId)
           
 HistoryStep[] getHistorySteps()
           
 String getInstanceId()
          Get the workflow instance id
 LockingUser getLockingUser(String state)
           
 String getModelId()
          Get the workflow model id
 HistoryStep getMostRecentStep(State state)
          Get the most recent step where an action has been performed on the given state.
 HistoryStep getMostRecentStep(String actionName)
          Returns the most recent step where this action was performed.
 DataRecord getNewActionRecord(String actionName)
          Get a new data record associated to the given action
 Participant getParticipant(String resolvedState)
          Get the last user who resolved the given state
 Vector<Participant> getParticipants()
           
 Question[] getPendingQuestions(String stateName)
          Get all the questions asked to the given state
 ProcessModel getProcessModel()
           
 Question[] getQuestions()
          Get all the questions asked in this processInstance
 Question[] getRelevantQuestions(String stateName)
          Get all the questions asked from the given state and that have been aswered
 DataRecord getRowDataRecord(String role, String lang)
          Returns a data record with all the main data in this instance.
 HistoryStep getSavedStep(String userId)
          Get step saved by given user id.
 Question[] getSentQuestions(String stateName)
          Get all the questions asked from the given state
 ActionAndState getTimeOutAction(Date dateRef)
          Returns the timeout action to be launched after given date
 boolean getTimeoutStatus()
          Get the timeout status of this instance
 int getTimeoutStatusCastor()
           
 String getTitle(String role, String lang)
          Returns this instance title.
 List<User> getUsersInGroup(String groupId)
          Gets concrete users affected to given group at runtime
 List<User> getUsersInRole(String role)
          Gets concrete users affected to given role at runtime
 Actor[] getWorkingUsers()
          Returns all the working users on this instance.
 Actor[] getWorkingUsers(String state)
          Returns all the working users on this instance state.
 Actor[] getWorkingUsers(String state, String role)
          Returns all the working users on this instance state.
 int hashCode()
           
 boolean isLockedByAdmin()
          Get the lock Admin status of this instance
 int isLockedByAdminCastor()
           
 boolean isStateInBackStatus(String stateName)
          Test is a active state is in back status
 boolean isValid()
          Get the validity state of this instance
 void lock()
          Lock this instance for the engine
 void lock(State state, User user)
          Locks this instance for the given instance and state
 void reDoState(String state, Date actionDate)
          Cancel all the atomic operations since the step where first action had occured
 void removeActiveState(State state)
          Set a state inactive for this instance
 void removeInterestedUser(User user, State state, String role)
          Remove an user from the interested user list
 void removeInterestedUsers(State state)
          Remove all interested users for given state
 void removeTimeout(State state)
           
 void removeWorkingUser(User user, State state, String role)
          Remove an user from the working user list
 void removeWorkingUsers(State state)
          Remove all working users for given state
 void saveActionRecord(HistoryStep step, DataRecord actionData)
          Set the form associated to the given action
 void setErrorStatus(boolean errorStatus)
          Set the error status of this instance
 void setErrorStatusCastor(int errorStatus)
           
 void setField(String fieldName, Field copiedField)
          Update the named field with the value of the given field.
 void setInstanceId(String instanceId)
          Set the workflow instance id
 void setLockedByAdmin(boolean locked)
          Set the lock Admin status of this instance
 void setLockedByAdminCastor(int locked)
           
 void setModelId(String modelId)
          Set the workflow model id
 void setTimeoutStatus(boolean timeoutStatus)
          Set the timeout status of this instance
 void setTimeoutStatusCastor(int timeoutStatus)
           
 void unLock()
          Unlock this instance for the engine
 void unLock(State state, User user)
          Un-locks this instance for the given instance and state
 void update()
          Store modifications of this instance in database
 void updateHistoryStep(HistoryStep step)
          Update an history step for this instance
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessInstanceImpl

public ProcessInstanceImpl()
Default constructor

Method Detail

getInstanceId

public String getInstanceId()
Get the workflow instance id

Specified by:
getInstanceId in interface ProcessInstance
Returns:
instance id

setInstanceId

public void setInstanceId(String instanceId)
Set the workflow instance id

Specified by:
setInstanceId in interface UpdatableProcessInstance
Parameters:
instanceId - instance id

getModelId

public String getModelId()
Get the workflow model id

Specified by:
getModelId in interface ProcessInstance
Returns:
model id

setModelId

public void setModelId(String modelId)
Set the workflow model id

Specified by:
setModelId in interface UpdatableProcessInstance
Parameters:
modelId - model id

addHistoryStep

public void addHistoryStep(HistoryStep step)
                    throws WorkflowException
Add an history step for this instance

Specified by:
addHistoryStep in interface UpdatableProcessInstance
Parameters:
step - the history step to add
Throws:
WorkflowException

updateHistoryStep

public void updateHistoryStep(HistoryStep step)
                       throws WorkflowException
Update an history step for this instance

Specified by:
updateHistoryStep in interface UpdatableProcessInstance
Parameters:
step - the history step to update
Throws:
WorkflowException

addActiveState

public void addActiveState(State state)
                    throws WorkflowException
Set a state active for this instance

Specified by:
addActiveState in interface UpdatableProcessInstance
Parameters:
state - State to be activated
Throws:
WorkflowException

removeActiveState

public void removeActiveState(State state)
                       throws WorkflowException
Set a state inactive for this instance

Specified by:
removeActiveState in interface UpdatableProcessInstance
Parameters:
state - State to be desactivated
Throws:
WorkflowException

addTimeout

public void addTimeout(State state)
                throws WorkflowException
Specified by:
addTimeout in interface UpdatableProcessInstance
Parameters:
state -
Throws:
WorkflowException

removeTimeout

public void removeTimeout(State state)
                   throws WorkflowException
Specified by:
removeTimeout in interface UpdatableProcessInstance
Parameters:
state -
Throws:
WorkflowException

addWorkingUser

public void addWorkingUser(User user,
                           State state,
                           String role)
                    throws WorkflowException
Add an user in the working user list

Specified by:
addWorkingUser in interface UpdatableProcessInstance
Parameters:
user - user to add
state - state for which the user can make an action
role - role name under which the user can make an action
Throws:
WorkflowException

addWorkingUser

public void addWorkingUser(Actor actor,
                           State state)
                    throws WorkflowException
Specified by:
addWorkingUser in interface UpdatableProcessInstance
Throws:
WorkflowException

removeWorkingUser

public void removeWorkingUser(User user,
                              State state,
                              String role)
                       throws WorkflowException
Remove an user from the working user list

Specified by:
removeWorkingUser in interface UpdatableProcessInstance
Parameters:
user - user to remove
state - state for which the user could make an action
role - role name under which the user could make an action
Throws:
WorkflowException

addInterestedUser

public void addInterestedUser(User user,
                              State state,
                              String role)
                       throws WorkflowException
Add an user in the interested user list

Specified by:
addInterestedUser in interface UpdatableProcessInstance
Parameters:
user - user to add
state - state for which the user is interested
role - role name under which the user is interested
Throws:
WorkflowException

addInterestedUser

public void addInterestedUser(Actor actor,
                              State state)
                       throws WorkflowException
Specified by:
addInterestedUser in interface UpdatableProcessInstance
Throws:
WorkflowException

removeInterestedUser

public void removeInterestedUser(User user,
                                 State state,
                                 String role)
                          throws WorkflowException
Remove an user from the interested user list

Specified by:
removeInterestedUser in interface UpdatableProcessInstance
Parameters:
user - user to remove
state - state for which the user is interested
role - role name under which the user is interested
Throws:
WorkflowException

addQuestion

public void addQuestion(Question question)
                 throws WorkflowException
Add a question for this instance

Parameters:
question - the question to add
Throws:
WorkflowException

computeValid

public void computeValid()
Specified by:
computeValid in interface UpdatableProcessInstance

getProcessModel

public ProcessModel getProcessModel()
                             throws WorkflowException
Specified by:
getProcessModel in interface ProcessInstance
Returns:
ProcessModel
Throws:
WorkflowException

create

public String create()
              throws WorkflowException
Creates this instance in database

Specified by:
create in interface ProcessInstance
Returns:
the newly created instance id
Throws:
WorkflowException

delete

public void delete()
            throws WorkflowException
Permanently removes this instance from database

Specified by:
delete in interface ProcessInstance
Throws:
WorkflowException

update

public void update()
            throws WorkflowException
Store modifications of this instance in database

Specified by:
update in interface ProcessInstance
Throws:
WorkflowException

getHistorySteps

public HistoryStep[] getHistorySteps()
Specified by:
getHistorySteps in interface ProcessInstance
Returns:
HistoryStep[]

getHistoryStep

public HistoryStep getHistoryStep(String stepId)
                           throws WorkflowException
Specified by:
getHistoryStep in interface ProcessInstance
Returns:
HistoryStep
Throws:
WorkflowException

getParticipants

public Vector<Participant> getParticipants()
                                    throws WorkflowException
Specified by:
getParticipants in interface ProcessInstance
Returns:
Vector
Throws:
WorkflowException

getParticipant

public Participant getParticipant(String resolvedState)
                           throws WorkflowException
Get the last user who resolved the given state

Specified by:
getParticipant in interface ProcessInstance
Parameters:
resolvedState - the resolved state
Returns:
this user as a Participant object
Throws:
WorkflowException

getFolder

public DataRecord getFolder()
                     throws WorkflowException
Returns the folder as a DataRecord

Specified by:
getFolder in interface ProcessInstance
Returns:
DataRecord
Throws:
WorkflowException

getAllDataRecord

public DataRecord getAllDataRecord(String role,
                                   String lang)
                            throws WorkflowException
Returns a data record with all the accessible data in this instance.

Specified by:
getAllDataRecord in interface ProcessInstance
Returns:
DataRecord
Throws:
WorkflowException

getRowDataRecord

public DataRecord getRowDataRecord(String role,
                                   String lang)
                            throws WorkflowException
Returns a data record with all the main data in this instance.

Specified by:
getRowDataRecord in interface ProcessInstance
Throws:
WorkflowException

getField

public Field getField(String fieldName)
               throws WorkflowException
Returns the required field from the folder.

Specified by:
getField in interface ProcessInstance
Returns:
Field
Throws:
WorkflowException

setField

public void setField(String fieldName,
                     Field copiedField)
              throws WorkflowException
Update the named field with the value of the given field.

Specified by:
setField in interface UpdatableProcessInstance
Parameters:
fieldName -
copiedField -
Throws:
WorkflowException

getActionRecord

public DataRecord getActionRecord(String actionName)
                           throws WorkflowException
Get the data associated to the given action

Specified by:
getActionRecord in interface ProcessInstance
Parameters:
actionName - action name
Returns:
Throws:
WorkflowException

getFormRecord

public DataRecord getFormRecord(String formName,
                                String role,
                                String lang)
                         throws WorkflowException
Specified by:
getFormRecord in interface ProcessInstance
Parameters:
formName -
role -
lang -
Returns:
DataRecord
Throws:
WorkflowException

getNewActionRecord

public DataRecord getNewActionRecord(String actionName)
                              throws WorkflowException
Get a new data record associated to the given action

Specified by:
getNewActionRecord in interface ProcessInstance
Parameters:
actionName - action name
Returns:
Throws:
WorkflowException

saveActionRecord

public void saveActionRecord(HistoryStep step,
                             DataRecord actionData)
                      throws WorkflowException
Set the form associated to the given action

Specified by:
saveActionRecord in interface UpdatableProcessInstance
Parameters:
step -
actionData -
Throws:
WorkflowException

getMostRecentStep

public HistoryStep getMostRecentStep(String actionName)
Returns the most recent step where this action was performed.

Specified by:
getMostRecentStep in interface ProcessInstance

getSavedStep

public HistoryStep getSavedStep(String userId)
                         throws WorkflowException
Get step saved by given user id.

Specified by:
getSavedStep in interface ProcessInstance
Throws:
WorkflowException

getMostRecentStep

public HistoryStep getMostRecentStep(State state)
Get the most recent step where an action has been performed on the given state. If no action has been performed on this state, return the step that activate this state.

Specified by:
getMostRecentStep in interface ProcessInstance

getActiveStates

public String[] getActiveStates()
Specified by:
getActiveStates in interface ProcessInstance
Returns:
String[]

isStateInBackStatus

public boolean isStateInBackStatus(String stateName)
Test is a active state is in back status

Specified by:
isStateInBackStatus in interface ProcessInstance
Parameters:
stateName - name of active state
Returns:
true if resolution of active state involves a cancel of actions

getWorkingUsers

public Actor[] getWorkingUsers()
                        throws WorkflowException
Description copied from interface: ProcessInstance
Returns all the working users on this instance.

Specified by:
getWorkingUsers in interface ProcessInstance
Returns:
Actor[]
Throws:
WorkflowException

getWorkingUsers

public Actor[] getWorkingUsers(String state)
                        throws WorkflowException
Description copied from interface: ProcessInstance
Returns all the working users on this instance state.

Specified by:
getWorkingUsers in interface ProcessInstance
Parameters:
state -
Returns:
Actor[]
Throws:
WorkflowException

removeWorkingUsers

public void removeWorkingUsers(State state)
                        throws WorkflowException
Description copied from interface: UpdatableProcessInstance
Remove all working users for given state

Specified by:
removeWorkingUsers in interface UpdatableProcessInstance
Parameters:
state - state for which the user is interested
Throws:
WorkflowException

removeInterestedUsers

public void removeInterestedUsers(State state)
                           throws WorkflowException
Description copied from interface: UpdatableProcessInstance
Remove all interested users for given state

Specified by:
removeInterestedUsers in interface UpdatableProcessInstance
Parameters:
state - state for which the user is interested
Throws:
WorkflowException

getWorkingUsers

public Actor[] getWorkingUsers(String state,
                               String role)
                        throws WorkflowException
Description copied from interface: ProcessInstance
Returns all the working users on this instance state.

Specified by:
getWorkingUsers in interface ProcessInstance
Parameters:
state -
Returns:
Actor[]
Throws:
WorkflowException

getAssignedStates

public String[] getAssignedStates(User user,
                                  String roleName)
                           throws WorkflowException
Returns all the state name assigned to the user.

Specified by:
getAssignedStates in interface ProcessInstance
Returns:
String[]
Throws:
WorkflowException

getLockingUser

public LockingUser getLockingUser(String state)
                           throws WorkflowException
Specified by:
getLockingUser in interface ProcessInstance
Parameters:
state -
Returns:
LockingUser
Throws:
WorkflowException

lock

public void lock(State state,
                 User user)
          throws WorkflowException
Locks this instance for the given instance and state

Specified by:
lock in interface ProcessInstance
Parameters:
state - state that have to be locked
user - the locking user
Throws:
WorkflowException

unLock

public void unLock(State state,
                   User user)
            throws WorkflowException
Un-locks this instance for the given instance and state

Specified by:
unLock in interface ProcessInstance
Parameters:
state - state that have to be un-locked
user - the current locking user
Throws:
WorkflowException

lock

public void lock()
          throws WorkflowException
Lock this instance for the engine

Specified by:
lock in interface UpdatableProcessInstance
Throws:
WorkflowException

unLock

public void unLock()
            throws WorkflowException
Unlock this instance for the engine

Specified by:
unLock in interface UpdatableProcessInstance
Throws:
WorkflowException

isValid

public boolean isValid()
Get the validity state of this instance

Specified by:
isValid in interface ProcessInstance
Returns:
true is this instance is valid

isLockedByAdmin

public boolean isLockedByAdmin()
Get the lock Admin status of this instance

Specified by:
isLockedByAdmin in interface ProcessInstance
Returns:
true is this instance is locked by admin

isLockedByAdminCastor

public int isLockedByAdminCastor()

setLockedByAdmin

public void setLockedByAdmin(boolean locked)
Set the lock Admin status of this instance

Parameters:
locked - true is this instance is locked by admin

setLockedByAdminCastor

public void setLockedByAdminCastor(int locked)

getErrorStatus

public boolean getErrorStatus()
Get the error status of this instance

Specified by:
getErrorStatus in interface ProcessInstance
Returns:
true if this instance is in error

getErrorStatusCastor

public int getErrorStatusCastor()

setErrorStatus

public void setErrorStatus(boolean errorStatus)
Set the error status of this instance

Specified by:
setErrorStatus in interface UpdatableProcessInstance
Parameters:
errorStatus - true if this instance is in error

setErrorStatusCastor

public void setErrorStatusCastor(int errorStatus)

getTimeoutStatus

public boolean getTimeoutStatus()
Get the timeout status of this instance

Specified by:
getTimeoutStatus in interface ProcessInstance
Returns:
true if this instance is in an active state for a long long time

getTimeoutStatusCastor

public int getTimeoutStatusCastor()

setTimeoutStatus

public void setTimeoutStatus(boolean timeoutStatus)
Set the timeout status of this instance

Specified by:
setTimeoutStatus in interface UpdatableProcessInstance
Parameters:
timeoutStatus - true if this instance is in an active state for a long long time

setTimeoutStatusCastor

public void setTimeoutStatusCastor(int timeoutStatus)

getUsersInRole

public List<User> getUsersInRole(String role)
                          throws WorkflowException
Description copied from interface: ProcessInstance
Gets concrete users affected to given role at runtime

Specified by:
getUsersInRole in interface ProcessInstance
Parameters:
role - the name of the role
Returns:
users affected to given role
Throws:
WorkflowException

getUsersInGroup

public List<User> getUsersInGroup(String groupId)
                           throws WorkflowException
Description copied from interface: ProcessInstance
Gets concrete users affected to given group at runtime

Specified by:
getUsersInGroup in interface ProcessInstance
Parameters:
groupId - the id of the group
Returns:
users in given group
Throws:
WorkflowException

getActors

public Actor[] getActors(QualifiedUsers qualifiedUsers,
                         State state)
                  throws WorkflowException
Computes tuples role/user/state (stored in an Actor object) from a QualifiedUsers object

Specified by:
getActors in interface ProcessInstance
Parameters:
qualifiedUsers - Users defined by their role or by a relation with a participant
state - State for which these user were/may be actors
Returns:
tuples role/user as an array of Actor objects
Throws:
WorkflowException

reDoState

public void reDoState(String state,
                      Date actionDate)
               throws WorkflowException
Cancel all the atomic operations since the step where first action had occured

Specified by:
reDoState in interface UpdatableProcessInstance
Parameters:
state - the name of state where ac action has been discussed
actionDate - date of state re-resolving
Throws:
WorkflowException

getBackSteps

public HistoryStep[] getBackSteps(User user,
                                  String roleName,
                                  String stateName)
                           throws WorkflowException
Get all the steps where given user (with given role) can go back from the given state

Specified by:
getBackSteps in interface ProcessInstance
Parameters:
user - user that can do the back actions
roleName - role name of this user
roleName - role name of this user
stateName - name of state where user want to go back from
Returns:
an array of HistoryStep objects
Throws:
WorkflowException

addQuestion

public State addQuestion(String content,
                         String stepId,
                         State fromState,
                         User fromUser)
                  throws WorkflowException
Add a question

Specified by:
addQuestion in interface ProcessInstance
Parameters:
content - question text
stepId - id of destination step for the question
fromState - the state where the question was asked
fromUser - the user who asked the question
Returns:
The state to which the question is
Throws:
WorkflowException

answerQuestion

public State answerQuestion(String content,
                            String questionId)
                     throws WorkflowException
Answer a question

Specified by:
answerQuestion in interface ProcessInstance
Parameters:
content - response text
questionId - id of question corresponding to this response
Returns:
The state where the question was asked
Throws:
WorkflowException

getPendingQuestions

public Question[] getPendingQuestions(String stateName)
Get all the questions asked to the given state

Specified by:
getPendingQuestions in interface ProcessInstance
Parameters:
stateName - given state name
Returns:
all the questions (not yet answered) asked to the given state

getSentQuestions

public Question[] getSentQuestions(String stateName)
Get all the questions asked from the given state

Specified by:
getSentQuestions in interface ProcessInstance
Parameters:
stateName - given state name
Returns:
all the questions (not yet answered) asked from the given state

getRelevantQuestions

public Question[] getRelevantQuestions(String stateName)
Get all the questions asked from the given state and that have been aswered

Specified by:
getRelevantQuestions in interface ProcessInstance
Parameters:
stateName - given state name
Returns:
all the answered questions asked from the given state

cancelQuestion

public void cancelQuestion(Question question)
                    throws WorkflowException
Cancel a question without response 1 - make a fictive answer 2 - remove active state 3 - remove working user 4 - recurse in question target state, if questions have been asked in cascade

Specified by:
cancelQuestion in interface UpdatableProcessInstance
Parameters:
question - the question to cancel
Throws:
WorkflowException

getQuestions

public Question[] getQuestions()
Get all the questions asked in this processInstance

Specified by:
getQuestions in interface ProcessInstance
Returns:
all the questions

castor_setHistorySteps

public void castor_setHistorySteps(Vector historySteps)
Set the instance history steps

Parameters:
historySteps - history steps

castor_getHistorySteps

public Vector castor_getHistorySteps()
Get the instance history steps

Returns:
history steps as a Vector

castor_setQuestions

public void castor_setQuestions(Vector<Question> questions)
Set the instance questions

Parameters:
questions - questions

castor_getQuestions

public Vector<Question> castor_getQuestions()
Get the instance questions

Returns:
questions as a Vector

castor_setInterestedUsers

public void castor_setInterestedUsers(Vector<InterestedUser> interestedUsers)
Set users who can see this process instance

Parameters:
interestedUsers - users as a Vector

castor_getInterestedUsers

public Vector<InterestedUser> castor_getInterestedUsers()
Get users who can see this process instance

Returns:
users as a Vector

castor_setWorkingUsers

public void castor_setWorkingUsers(Vector<WorkingUser> workingUsers)
Set users who can act on this process instance

Parameters:
workingUsers - users as a Vector

castor_getWorkingUsers

public Vector<WorkingUser> castor_getWorkingUsers()
Get users who can act on this process instance

Returns:
users as a Vector

castor_setLockingUsers

public void castor_setLockingUsers(Vector<LockingUser> lockingUsers)
Set users who have locked a state of this process instance

Parameters:
lockingUsers - users as a Vector

castor_getLockingUsers

public Vector<LockingUser> castor_getLockingUsers()
Get users who have locked a state of this process instance

Returns:
users as a Vector

castor_setActiveStates

public void castor_setActiveStates(Vector<ActiveState> activeStates)
Set states that are due to be resolved for this process instance

Parameters:
activeStates - states as a Vector

castor_getActiveStates

public Vector<ActiveState> castor_getActiveStates()
Get states that are due to be resolved for this process instance

Returns:
states as a Vector

getTitle

public String getTitle(String role,
                       String lang)
Returns this instance title.

Specified by:
getTitle in interface ProcessInstance
Parameters:
role -
lang -
Returns:

getTimeOutAction

public ActionAndState getTimeOutAction(Date dateRef)
                                throws WorkflowException
Returns the timeout action to be launched after given date

Specified by:
getTimeOutAction in interface ProcessInstance
Throws:
WorkflowException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2016 Silverpeas. All Rights Reserved.