public interface ActivityExecutionControl
| Modifier and Type | Method and Description |
|---|---|
void |
abortActivity(SessionToken session,
EBPInstanceReference activity,
java.lang.String errorMessage,
long errorCode,
boolean force,
boolean propagate)
Instructs the ActivityExecutionControl to abort the activity and propagate the abortion if
appropriate, e. g. to subprocess instances.
|
java.util.List<java.lang.String> |
getSavepoints(SessionToken session,
EBPInstanceReference activity)
Gets all savepoints and their respective names for the designated activity.
|
void |
resetActivity(SessionToken session,
EBPInstanceReference activity,
boolean forceReset)
Resets the designated activity to its initial state when it is first
activated.
|
void |
resetActivity(SessionToken session,
EBPInstanceReference activity,
boolean forceReset,
java.lang.String savepoint)
Resets the designated activity to the designated savepoint.
|
java.lang.String |
resetToPrevSavepoint(SessionToken session,
EBPInstanceReference activity,
boolean forceReset)
Resets the designated activity to the previous savepoint.
|
boolean |
suspendActivity(SessionToken session,
EBPInstanceReference activity,
boolean waitForAcknowledgement,
boolean propagate)
Instructs the ActivityExecutionControl to suspend the specified activity and propagate the
suspension if appropriate, e. g. to subprocess instances.
|
java.util.List<java.lang.String> getSavepoints(SessionToken session, EBPInstanceReference activity) throws InvalidActivityStateException
session - The session which is used to check for access rights on this
method and to retrieve the resetting agent and the corresponding
organisational position for logging purpose.activity - The activity for which to retrieve all known savepoints.InvalidActivityStateException - If the activity is neither
NS_RUNNING nor NS_SUSPENDED nor
NS_SUSPENDED_SUPPR nor NS_FAILED and
thus cannot be reset or resumed from a specific savepoint, an
InvalidActivityStateException is thrown.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.ProcessConstants.NodeStateboolean suspendActivity(SessionToken session, EBPInstanceReference activity, boolean waitForAcknowledgement, boolean propagate) throws InvalidActivityStateException
By the parameter waitForAcknowledgement you can specify if the method should
return not until the referenced EBP has acknowledged its suspension or if it should return at
once.
Be aware: It may last some time until the activity is suspended!
session - The session the call is associated with.activity - the activity to suspend.waitForAcknowledgement - Should the method return not until the activity has acknowledged
its suspension (TRUE) or should it return at once (FALSE).propagate - Whether to propagate the suspension if appropriate, e. g. to subprocess
instances.false will be returned.InvalidActivityStateException - If the activity is in a state it cannot be suspended or
can not be suspended at all an InvalidActivityStateException is thrown.void resetActivity(SessionToken session, EBPInstanceReference activity, boolean forceReset) throws InvalidActivityStateException, InvalidInstanceStateException
suspend (with propagation). If the activity does not support this or the suspension does not
work, the activity will be
aborted (with propagation). If this is also not supported, an
InvalidActivityStateException will be thrown. NS_RUNNING, NS_SUSPENDED,
NS_SUSPENDED_SUPPR or NS_FAILED). If the reset is
not forced it will also have to support
reset, and
suspend.
It has to be assured that this method is only called by supervising agents.
Normal users will be able to reset activities if the activity supports it
via
ActivityTermination.activityReset(SessionToken, EBPInstanceReference).
session - The session which is used to check for access rights on this
method and to retrieve the resetting agent and the corresponding
organisational position for logging purpose.activity - The reference identifying the activity to reset. It does
not need to have a valid runtime manager URI since this needs to
be taken from the corresponding instance.forceReset - Whether the reset is forced, that is the activity has to
be suspended or aborted (and reset afterwards) under all
circumstances.InvalidActivityStateException - If the reset is not forced and the
activity (process step) is not resettable or not running,
suspended or failed, an
InvalidActivityStateException will be raised. This
also applies to running activities that do not support suspension
nor abortion.InvalidInstanceStateException - If the instance is not running but
stopped, (hard) aborted, finished or changed, an
InvalidInstanceStateException is thrown.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.resetActivity(SessionToken, EBPInstanceReference, boolean, String),
ProcessConstants.NodeStatevoid resetActivity(SessionToken session, EBPInstanceReference activity, boolean forceReset, java.lang.String savepoint) throws InvalidActivityStateException, InvalidInstanceStateException
suspend (with propagation). If the activity does not support this or the suspension does not
work, the activity will be
aborted (with propagation). If this is also not supported, an
InvalidActivityStateException will be thrown. NS_RUNNING, NS_SUSPENDED,
NS_SUSPENDED_SUPPR or NS_FAILED). If the reset is
not forced it will also have to support
reset, and
suspend.
It has to be assured that this method is only called by supervising agents.
Normal users will be able to reset activities if the activity supports it
via
ActivityTermination.activityReset(SessionToken, EBPInstanceReference).
session - The session which is used to check for access rights on this
method and to retrieve the resetting agent and the corresponding
organisational position for logging purpose.activity - The reference identifying the activity to reset. It does
not need to have a valid runtime manager URI since this needs to
be taken from the corresponding instance.forceReset - Whether the reset is forced, that is the activity has to
be suspended or aborted (and reset afterwards) under all
circumstances.savepoint - The ID of the savepoint to which to reset. The activity
will be resumed from this savepoint. Use null to
reset the activity to its initial state.InvalidActivityStateException - If
InvalidActivityStateException
will be raised. This also applies to running activities that do
not support suspension nor abortion.InvalidInstanceStateException - If the instance is not running but
stopped, (hard) aborted, finished or changed, an
InvalidInstanceStateException is thrown.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.resetActivity(SessionToken, EBPInstanceReference, boolean),
ProcessConstants.NodeStatejava.lang.String resetToPrevSavepoint(SessionToken session, EBPInstanceReference activity, boolean forceReset) throws InvalidActivityStateException, InvalidInstanceStateException
suspend (with propagation). If the activity does not support this or the suspension does not
work, the activity will be
aborted (with propagation). If this is also not supported, an
InvalidActivityStateException will be thrown. NS_RUNNING, NS_SUSPENDED,
NS_SUSPENDED_SUPPR or NS_FAILED). If the reset is
not forced it will also have to support
reset, and
suspend.
It has to be assured that this method is only called by supervising agents.
Normal users will be able to reset activities if the activity supports it
via
ActivityTermination.activityReset(SessionToken, EBPInstanceReference).
session - The session which is used to check for access rights on this
method and to retrieve the resetting agent and the corresponding
organisational position for logging purpose.activity - The reference identifying the activity to reset. It does
not need to have a valid runtime manager URI since this needs to
be taken from the corresponding instance.forceReset - Whether the reset is forced, that is the activity has to
be suspended or aborted (and reset afterwards) under all
circumstances.null indicates resetting to the initial state.InvalidActivityStateException - If
InvalidActivityStateException
will be raised. This also applies to running activities that do
not support suspension nor abortion.InvalidInstanceStateException - If the instance is not running but
stopped, (hard) aborted, finished or changed, an
InvalidInstanceStateException is thrown.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.resetActivity(SessionToken, EBPInstanceReference, boolean),
ProcessConstants.NodeStatevoid abortActivity(SessionToken session, EBPInstanceReference activity, java.lang.String errorMessage, long errorCode, boolean force, boolean propagate) throws InvalidActivityStateException
By the parameter force you can specify to wait until the abortion was successful.
If this does not happen, the activity will be set to failed without respecting its current
state (in its runtime manager).
session - The session the call is associated with.activity - the activity to aborterrorMessage - a human readable message explaining the error that led to the abortion.errorCode - the code of the error that led to the abortion.force - Whether the activity is to be aborted independent from whether it allows this and
reacts to this.propagate - Whether to propagate the abortion if appropriate, e. g. to subprocess
instances.InvalidActivityStateException - If the activity is in a state it cannot be aborted or it
can not be aborted at all and the abortion is not forced, an
InvalidActivityStateException is thrown.