public interface InstanceChanging
InstanceChanging provides the means for retrieving changeable
instances and committing (or aborting) the changes afterwards. This has to
be done in the ExecutionManager since the state of the
instance has to be checked (instances with running process steps may not
be changed), worklist managers have to be notified (removal and adding of
worklist items) and the DataManager may need to adapt the data
containers accordingly to the changes of the data flow.| Modifier and Type | Method and Description |
|---|---|
void |
abortInstanceChanging(SessionToken session,
java.util.UUID instanceID)
Aborts changing the instance, unlocks and resumes the instance and informs
the worklist managers accordingly.
|
ChangeReport |
changeAndUnlockInstance(SessionToken session,
ChangeableInstance instance,
java.util.Locale... locales)
Validates the instance and if this is successful, the designated instance will be changed,
unlocked, resumed and the worklist and data managers will be informed about the new instance
structure and state.
|
ChangeReport |
changeInstance(SessionToken session,
ChangeableInstance instance,
java.util.Locale... locales)
Validates the instance and if this is successful, the designated instance will be changed and
the worklist and data managers will be informed about the new instance structure and state.
|
ChangeableInstance |
getInstanceForChanging(SessionToken session,
java.util.UUID instanceID)
Gets a process instance that may be changed after retrieval.
|
void |
unlockChangeableInstance(SessionToken session,
java.util.UUID instanceID)
Unlocks and resumes the instance without affecting any made changes, that is
previously committed changes are persisted, uncommitted changes are
dropped.
|
ChangeableInstance getInstanceForChanging(SessionToken session, java.util.UUID instanceID) throws InvalidInstanceStateException
session - The session which is used to check for access rights on this
method and to identify the locking agent and the corresponding
organisational position.instanceID - The unique ID of the process instance to retrieve and
lock for changing it.InvalidInstanceStateException - If the instance cannot be locked due
to its state, for instance it has running activities.ADEPT2ServiceException - If the
designated instance is already locked for execution or changes
(except for changes by the designated user), an
ADEPT2ServiceException will be thrown.ChangeReport changeAndUnlockInstance(SessionToken session, ChangeableInstance instance, java.util.Locale... locales)
session - The session which is used to check for access rights on this method and to
identify the unlocking agent and the corresponding organisational position.instance - An instance that has been changed and is still locked.locales - The locales the change report should provide (or at least a fallback of each).
If this is null, Locale.ROOT will be used.ADEPT2ServiceException - If the designated instance is
not locked by the designated user or locked for execution, a
ADEPT2ServiceException will be thrown.ChangeReport changeInstance(SessionToken session, ChangeableInstance instance, java.util.Locale... locales)
changeAndUnlockInstance(SessionToken, ChangeableInstance, Locale...).session - The session which is used to check for access rights on this method and to
identify the unlocking agent and the corresponding organisational position.instance - An instance that has been changed and is still locked.locales - The locales the change report should provide (or at least a fallback of each).
If this is null, Locale.ROOT will be used.ADEPT2ServiceException - If the designated instance is
not locked by the designated user or locked for execution, a
ADEPT2ServiceException will be thrown.void unlockChangeableInstance(SessionToken session, java.util.UUID instanceID)
session - The session which is used to check for access rights on this
method and to identify the unlocking agent and the corresponding
organisational position.instanceID - The ID of a a locked instance that has been changed via
changeInstance(SessionToken, ChangeableInstance, Locale...) or of
which the changes are to be aborted.ADEPT2ServiceException - If the
designated instance is not locked by the designated user or
locked for execution, a ADEPT2ServiceException will
be thrown.void abortInstanceChanging(SessionToken session, java.util.UUID instanceID)
session - The session which is used to check for access rights on this
method and to identify the unlocking agent and the corresponding
organisational position.instanceID - A locked instance that should be changed but the change
is aborted.ADEPT2ServiceException - If the
designated instance is not locked by the designated user or
locked for execution, a ADEPT2ServiceException will
be thrown.