public interface SynchronousActivityStarting extends ActivityStarting
ActivityStarting with the synchronous
start or resuming of activities. This allows to wait for the successful start
and to retrieve the GUIContext of the started/resumed
activity/application. For instance, requests by web clients are handled this
way: A request to start an activity is sent to the web server, the activity
is started synchronously and the GUIContext (the generated
HTML-document) is sent as reply to the client request. WrongRuntimeManagerException will be thrown.
Besides the retrieval of the GUIContext this interface also
provides the means to register a listener for activity state changes, that is
closing, suspending, resetting, failing or resuming an activity. Note that
notifying the resume of an activity will only work if the activity is started
on the very same runtime manager (ActivityStarting) again. Such
a registered listener can
unregister
any time.
This interface may be provided by a runtime manager but does not need to. It
delegates to the corresponding execution manager, encapsulates the
asynchronous calls and registers for the state notifications. If the runtime
manager does not provide this interface, the client has to use the execution
manager directly (
ActivityStarting).
| Modifier and Type | Method and Description |
|---|---|
GUIContext |
resumeActivitySynchronously(SessionToken session,
EBPInstanceReference activity)
Resumes the designated activity and logs the agent, the organisational
position.
|
GUIContext |
resumeActivitySynchronously(SessionToken session,
EBPInstanceReference activity,
java.net.URI[] stateListener)
Resumes the designated activity and logs the agent, the organisational
position.
|
GUIContext |
startActivitySynchronously(SessionToken session,
EBPInstanceReference activity,
ProcessConstants.ExecutionMode executionMode,
java.net.URI[] stateListener)
Starts the designated activity in the designated execution mode and logs
the agent, the organisational position.
|
void |
unregisterActivityStateListener(SessionToken session,
EBPInstanceReference activity,
java.net.URI[] stateListener)
Unregisters the designated listener for activity terminations.
|
deselectActivity, enquireActivity, getEnquiryRecipients, getEnquiryRecipientsIterator, getExecutionContext, getExecutionContexts, replyEnquiry, resumeActivity, selectActivity, startActivityGUIContext startActivitySynchronously(SessionToken session, EBPInstanceReference activity, ProcessConstants.ExecutionMode executionMode, java.net.URI[] stateListener) throws InvalidActivityStateException, InvalidInstanceStateException, WrongRuntimeManagerException, AgentUnknownException
GUIContext of. ActivityStarting#startActivity(SessionToken, EBPInstanceReference, ExecutionMode)
and waits until the designated activity is started on this runtime manager.
If this activity is not started in a certain period on this runtime
manager, a WrongRuntimeManagerException will be raised.session - The session which is used to check for access rights on this
method and to retrieve the starting agent and the corresponding
organisational position.activity - The unique ID of the activity to start.executionMode - The execution mode in which to start the activity, for
instance, a test mode.stateListener - The URIs identifying a callback interface to be
notified when the activity has terminated (has been closed,
suspended, reset or failed) or null in case no notification is
necessary. The listener has to implement
ActivityStateListener. It will be ignored if the EBP is a
light weight process.GUIContext of the started activity/application or
null if the EBP is a light weight process.InvalidActivityStateException - If the activity (process step) is not
activated or selected by the designated user, an
InvalidActivityStateException will be raised.InvalidInstanceStateException - If the instance is not running but
stopped, aborted, finished or changed, an
InvalidInstanceStateException is thrown.AgentUnknownException - If the specified runtime manager refuses the
execution since it does not know the designated agent, an
AgentUnknownException will be thrown.WrongRuntimeManagerException - If the designated activity is not
executed by this runtime manager, a
WrongExecutionManagerException will be raised.ActivityStarting#startActivity(SessionToken, EBPInstanceReference,
ExecutionMode),
InstanceControl.createAndStartInstance(SessionToken, java.util.UUID, URI[])GUIContext resumeActivitySynchronously(SessionToken session, EBPInstanceReference activity) throws InvalidActivityStateException, InvalidInstanceStateException, WrongRuntimeManagerException, AgentUnknownException
GUIContext of. ActivityStarting.resumeActivity(SessionToken, EBPInstanceReference)
and waits until the designated activity is started on this runtime manager.
If this activity is not resumed in a certain period on this runtime
manager, a WrongRuntimeManagerException will be raised.
If the activity has a state listener it will be notified and kept for
further notifications. Normally, you should use
resumeActivitySynchronously(SessionToken, EBPInstanceReference, URI[])
unless you are a ResumingRuntimeManager which automatically
resumes suspended activities.
session - The session which is used to check for access rights on this
method and to retrieve the resuming agent and the corresponding
organisational position.activity - The unique ID of the activity to resume.GUIContext of the started activity/application
or null if the EBP is a light weight process.InvalidActivityStateException - If the activity (process step) is not
suspended, an InvalidActivityStateException will
be raised.InvalidInstanceStateException - If the instance is not running but
stopped, aborted, finished or changed, an
InvalidInstanceStateException is thrown.AgentUnknownException - If the specified runtime manager refuses the
execution since it does not know the designated agent, an
AgentUnknownException will be thrown.WrongRuntimeManagerException - If the designated activity is not
executed by this runtime manager, a
WrongExecutionManagerException will be raised.ActivityStarting.resumeActivity(SessionToken, EBPInstanceReference),
InstanceControl.resumeInstance(SessionToken, java.util.UUID)GUIContext resumeActivitySynchronously(SessionToken session, EBPInstanceReference activity, java.net.URI[] stateListener) throws InvalidActivityStateException, InvalidInstanceStateException, WrongRuntimeManagerException, AgentUnknownException
GUIContext of. ActivityStarting.resumeActivity(SessionToken, EBPInstanceReference)
and waits until the designated activity is started on this runtime manager.
If this activity is not resumed in a certain period on this runtime
manager, a WrongRuntimeManagerException will be raised.session - The session which is used to check for access rights on this
method and to retrieve the resuming agent and the corresponding
organisational position.activity - The unique ID of the activity to resume.stateListener - The URIs identifying a callback interface to be
notified when the activity has terminated (has been closed,
suspended, reset or failed) or null in case no notification is
necessary. The listener has to implement
ActivityStateListener. It will be ignored if the EBP is a
light weight process.GUIContext of the started activity/application
or null if the EBP is a light weight process.InvalidActivityStateException - If the activity (process step) is not
suspended, an InvalidActivityStateException will
be raised.InvalidInstanceStateException - If the instance is not running but
stopped, aborted, finished or changed, an
InvalidInstanceStateException is thrown.AgentUnknownException - If the specified runtime manager refuses the
execution since it does not know the designated agent, an
AgentUnknownException will be thrown.WrongRuntimeManagerException - If the designated activity is not
executed by this runtime manager, a
WrongExecutionManagerException will be raised.ActivityStarting.resumeActivity(SessionToken, EBPInstanceReference),
InstanceControl.resumeInstance(SessionToken, java.util.UUID, URI[])void unregisterActivityStateListener(SessionToken session, EBPInstanceReference activity, java.net.URI[] stateListener)
If the EBP is a light weight process, no activity state listener can be registered. Therefore this will do nothing in this case.
session - The session which is used to check for access rights on this
method.activity - The activity for which the state listener should be
unregistered.stateListener - The listener which to unregister. This has to refer to
a valid ActivityStateListener.