Interface UpdatableProcessInstance
-
- All Superinterfaces:
ProcessInstance
,Serializable
- All Known Implementing Classes:
ProcessInstanceImpl
public interface UpdatableProcessInstance extends ProcessInstance
A process instance that can be updated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addActiveState(State state)
Adds the specified state as an active one in this process instance.void
addHistoryStep(HistoryStep step)
Add a step in the history of actions performed in this process instance.void
addInterestedUser(Actor actor, State state)
void
addInterestedUser(User user, State state, String role)
Add an user in the interested user listvoid
addTimeout(State state)
Adds a timeout to the specified active state.void
addWorkingUser(Actor actor, State state)
Adds the specified actor to the given state.void
addWorkingUser(User user, State state, String role)
Adds the specified working user to the given state with the specified role.void
cancelQuestion(Question question)
Cancel a question without responsevoid
computeValid()
void
lock()
Lock this instance by admin for all statesvoid
reDoState(String state, Date actionDate)
Cancel all the atomic operations since the step where first action had occurredvoid
removeActiveState(State state)
Removes the specified state as an active one.void
removeInterestedUser(User user, State state, String role)
Remove an user from the interested user listvoid
removeInterestedUsers(State state)
Remove all interested users for given statevoid
removeTimeout(State state)
Removes the timeout from the specified active state.void
removeWorkingUser(User user, State state, String role)
Removes the specified user from the working users of the specified state and with the given role.void
removeWorkingUsers(State state)
Remove all working users for given statevoid
saveActionRecord(HistoryStep step, DataRecord formData)
Save a new version of given form (including values)void
setErrorStatus(boolean errorStatus)
Set the error status of this instancevoid
setField(String name, Field field)
Sets the specified field in the process instance.void
setInstanceId(String instanceId)
Set the workflow instance idvoid
setModelId(String modelId)
Set the workflow model idvoid
setTimeoutStatus(boolean timeoutStatus)
Set the timeout status of this instancevoid
unLock()
Lock this instance by admin for all statesvoid
updateHistoryStep(HistoryStep step)
Update the related history step by the given one.-
Methods inherited from interface org.silverpeas.core.workflow.api.instance.ProcessInstance
addQuestion, answerQuestion, getActionRecord, getActiveStates, getActors, getAllAssignedStates, getAllDataRecord, getAssignedStates, getBackSteps, getErrorStatus, getField, getFolder, getFormRecord, getHistoryStep, getHistorySteps, getInstanceId, getLockingUser, getModelId, getMostRecentStep, getNewActionRecord, getParticipant, getParticipants, getPendingQuestions, getProcessModel, getQuestions, getRelevantQuestions, getRowDataRecord, getSavedStep, getSentQuestions, getTimeOutAction, getTimeoutStatus, getTitle, getUsersInGroup, getUsersInRole, getWorkingUsers, getWorkingUsers, getWorkingUsers, isLockedByAdmin, isStateInBackStatus, isValid, lock, unLock, updateFolder
-
-
-
-
Method Detail
-
setInstanceId
void setInstanceId(String instanceId)
Set the workflow instance id- Parameters:
instanceId
- instance id
-
setModelId
void setModelId(String modelId)
Set the workflow model id- Parameters:
modelId
- model id
-
addHistoryStep
void addHistoryStep(HistoryStep step) throws WorkflowException
Add a step in the history of actions performed in this process instance.- Parameters:
step
- a step in the workflow process history.- Throws:
WorkflowException
-
updateHistoryStep
void updateHistoryStep(HistoryStep step)
Update the related history step by the given one.- Parameters:
step
- a step in the workflow process history.
-
reDoState
void reDoState(String state, Date actionDate) throws WorkflowException
Cancel all the atomic operations since the step where first action had occurred- Parameters:
state
- the name of state where ac action has been discussedactionDate
- date of state re-resolving- Throws:
WorkflowException
-
setField
void setField(String name, Field field) throws WorkflowException
Sets the specified field in the process instance.- Parameters:
name
- the name of the fieldfield
- the field to set- Throws:
WorkflowException
-
saveActionRecord
void saveActionRecord(HistoryStep step, DataRecord formData) throws WorkflowException
Save a new version of given form (including values)- Parameters:
step
- the new stepformData
- Form's values as a DataRecord object- Throws:
WorkflowException
-
addActiveState
void addActiveState(State state) throws WorkflowException
Adds the specified state as an active one in this process instance. An active state is the current state of the process instance; that is to say a state that is currently waiting for actions by working users. A process instance can have several active states in parallel.- Parameters:
state
- the active state.- Throws:
WorkflowException
-
removeActiveState
void removeActiveState(State state) throws WorkflowException
Removes the specified state as an active one. An active state is the current state of the process instance; that is to say a state that is currently waiting for actions by working users. A process instance can have several active states in parallel.- Parameters:
state
- the active state.- Throws:
WorkflowException
-
addTimeout
void addTimeout(State state) throws WorkflowException
Adds a timeout to the specified active state. A timeout is a way to avoid a long time state. The time out is defined by aTimeOutAction
provided by the specified state.- Parameters:
state
- the state for which a time out has to be added.- Throws:
WorkflowException
-
removeTimeout
void removeTimeout(State state) throws WorkflowException
Removes the timeout from the specified active state. A timeout is a way to avoid a long time state.- Parameters:
state
- the state for which a time out has to be removed.- Throws:
WorkflowException
-
addWorkingUser
void addWorkingUser(User user, State state, String role) throws WorkflowException
Adds the specified working user to the given state with the specified role.- Parameters:
user
- the working user to addstate
- the state on which the user will workrole
- the role the user will play in the above state- Throws:
WorkflowException
- if the adding fails.
-
addWorkingUser
void addWorkingUser(Actor actor, State state) throws WorkflowException
Adds the specified actor to the given state.- Parameters:
actor
- the actor to addstate
- the state for which the actor has to be defined- Throws:
WorkflowException
- if the adding fails.
-
removeWorkingUser
void removeWorkingUser(User user, State state, String role) throws WorkflowException
Removes the specified user from the working users of the specified state and with the given role.- Parameters:
user
- the user to remove.state
- the state from which the user has to be removedrole
- the role the user plays in the above state- Throws:
WorkflowException
- if the removing fails.
-
removeWorkingUsers
void removeWorkingUsers(State state) throws WorkflowException
Remove all working users for given state- Parameters:
state
- state for which the user is interested- Throws:
WorkflowException
-
addInterestedUser
void addInterestedUser(User user, State state, String role) throws WorkflowException
Add an user in the interested user list- Parameters:
user
- user to addstate
- state for which the user is interestedrole
- role name under which the user is interested- Throws:
WorkflowException
-
addInterestedUser
void addInterestedUser(Actor actor, State state) throws WorkflowException
- Throws:
WorkflowException
-
removeInterestedUser
void removeInterestedUser(User user, State state, String role) throws WorkflowException
Remove an user from the interested user list- Parameters:
user
- user to removestate
- state for which the user is interestedrole
- role name under which the user is interested- Throws:
WorkflowException
-
removeInterestedUsers
void removeInterestedUsers(State state) throws WorkflowException
Remove all interested users for given state- Parameters:
state
- state for which the user is interested- Throws:
WorkflowException
-
lock
void lock() throws WorkflowException
Lock this instance by admin for all states- Throws:
WorkflowException
-
unLock
void unLock() throws WorkflowException
Lock this instance by admin for all states- Throws:
WorkflowException
-
setErrorStatus
void setErrorStatus(boolean errorStatus)
Set the error status of this instance- Parameters:
errorStatus
- true if this instance is in error
-
computeValid
void computeValid()
-
cancelQuestion
void cancelQuestion(Question question) throws WorkflowException
Cancel a question without response- Parameters:
question
- the question to cancel- Throws:
WorkflowException
-
setTimeoutStatus
void setTimeoutStatus(boolean timeoutStatus)
Set the timeout status of this instance- Parameters:
timeoutStatus
- true if this instance is in an active state for a long long time
-
-