public interface ActivityStarting
| Modifier and Type | Method and Description |
|---|---|
void |
deselectActivity(SessionToken session,
EBPInstanceReference activity)
Deselects the designated activity, that is, the designated user does not
want to execute the activity later any more.
|
void |
enquireActivity(SessionToken session,
EBPInstanceReference activity,
java.util.Set<QualifiedAgent> recipients,
java.lang.String question)
Sets an enquiry for the designated activity and delegates it to the
designated recipients.
|
java.util.Set<QualifiedAgent> |
getEnquiryRecipients(SessionToken session,
EBPInstanceReference activity)
Gets all agents that are possible recipients for an enquiry for the
designated activity and the agent identified by the designated session
token.
|
RemoteIterator<java.util.List<QualifiedAgent>> |
getEnquiryRecipientsIterator(SessionToken session,
EBPInstanceReference activity)
The same as
getEnquiryRecipients(SessionToken, EBPInstanceReference) but with
partial retrieval of the agents. |
ExecutionContext |
getExecutionContext(SessionToken session,
EBPInstanceReference activity)
Gets the execution context for the designated activity.
|
Pair<java.util.Map<EBPInstanceReference,ExecutionContext>,java.util.Map<EBPInstanceReference,java.lang.Throwable>> |
getExecutionContexts(SessionToken session,
java.util.Collection<EBPInstanceReference> activities)
Gets the execution contexts for the designated activities.
|
void |
replyEnquiry(SessionToken session,
EBPInstanceReference activity,
java.lang.String reply)
Replies to the designated activity, that is the last enquiry is replied.
|
void |
resumeActivity(SessionToken session,
EBPInstanceReference activity)
Resumes the designated activity from the latest valid savepoint and logs
the agent, the organisational position.
|
void |
selectActivity(SessionToken session,
EBPInstanceReference activity)
Selects the designated activity, that is, the designated user wants to
execute the activity later.
|
void |
startActivity(SessionToken session,
EBPInstanceReference activity,
ProcessConstants.ExecutionMode executionMode)
Starts the designated activity in the designated execution mode and logs
the agent, the organisational position.
|
void selectActivity(SessionToken session, EBPInstanceReference activity) throws InvalidActivityStateException, InvalidInstanceStateException
NS_ACTIVATED).session - The session which is used to check for access rights on this
method and to retrieve the selecting agent and the corresponding
organisational position.activity - The reference identifying the activity to select.InvalidActivityStateException - If the activity (process step) is not
activated, an InvalidActivityStateException will be
raised.InvalidInstanceStateException - If the instance is not running but
stopped, 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.DataContainer,
ProcessConstants.NodeStatevoid deselectActivity(SessionToken session, EBPInstanceReference activity) throws InvalidActivityStateException, InvalidInstanceStateException
NS_ACTIVATED)
and adds the worklist item to the corresponding worklists. NS_SELECTED).session - The session which is used to check for access rights on this
method and to retrieve the deselecting agent and the corresponding
organisational position.activity - The reference identifying the activity to deselect.InvalidActivityStateException - If the activity (process step) is not
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.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.WrongAgentException - If the calling agent is not the same agent who
selected the activity.DataContainer,
ProcessConstants.NodeStatevoid startActivity(SessionToken session, EBPInstanceReference activity, ProcessConstants.ExecutionMode executionMode) throws InvalidActivityStateException, InvalidInstanceStateException, AgentUnknownException
NS_ACTIVATED or
NS_SELECTED).
This method is also used to display (re-execute) an activity that has
already been executed. The activity is started normally in
ProcessConstants.ExecutionMode.VIEW_ONLY with a special data container providing
read-only access to the values of the output parameters written in the
corresponding execution.
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 reference identifying the activity to start.executionMode - The execution mode in which to start the activity, for
instance, a test mode.InvalidActivityStateException - If the activity (process step) is not
activated or selected by the designated user (for normal or test
execution) or the designated EBPInstanceReference
does not refer to a valid runtime manager, an
InvalidActivityStateException will be raised. For
ProcessConstants.ExecutionMode.VIEW_ONLY the activity needs to be in state
NS_FINISHED or NS_ENQUIRED and it needs
to support it. Otherwise an
InvalidActivityStateException will be raised.InvalidInstanceStateException - If the instance is not running but
stopped, aborted or finished (for normal or test execution), an
InvalidInstanceStateException is thrown. This does
not apply to ProcessConstants.ExecutionMode.VIEW_ONLY, which is allowed in
all instance states.AgentUnknownException - If the specified runtime manager refuses the
execution since it does not know the designated agent, an
AgentUnknownException will be thrown.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.WrongAgentException - If the calling agent is not the same agent who
selected the activity.DataContainer,
ProcessConstants.NodeStatevoid resumeActivity(SessionToken session, EBPInstanceReference activity) throws InvalidActivityStateException, InvalidInstanceStateException, AgentUnknownException
NS_SUSPENDED).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 reference identifying the activity to resume.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.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.DataContainer,
ProcessConstants.NodeStatejava.util.Set<QualifiedAgent> getEnquiryRecipients(SessionToken session, EBPInstanceReference activity)
Implementors must not use a remote iterator when using a database since this may lead to a deadlock since the remote iterator uses its own transaction!
session - The session token identifying the enquiring agent.activity - The activity to enquire and to determine the enquiry
recipients of.RemoteIterator<java.util.List<QualifiedAgent>> getEnquiryRecipientsIterator(SessionToken session, EBPInstanceReference activity)
getEnquiryRecipients(SessionToken, EBPInstanceReference) but with
partial retrieval of the agents.session - The session token identifying the enquiring agent.activity - The activity to enquire and to determine the enquiry
recipients of.void enquireActivity(SessionToken session, EBPInstanceReference activity, java.util.Set<QualifiedAgent> recipients, java.lang.String question) throws InvalidActivityStateException, InvalidInstanceStateException
NS_SUSPENDED)
for this special delegation to take place. The activity is then placed in
the worklists of the designated recipients with the designated comment.
Afterwards the activity can be normally executed (resumeActivity(SessionToken, EBPInstanceReference))
by one of the recipients. The executor can then suspend it afterwards and
send it back to the delegator (replyEnquiry(SessionToken, EBPInstanceReference, String)).
The executor may also finish the activity, in this case the process will
proceed and the delegator will receive the reply without being able to
finish the activity. If the activity supports
ProcessConstants.ExecutionMode.VIEW_ONLY,
the delegator may start the activity as VIEW_ONLY and view
the result of the execution besides the reply.
The activity needs to be managed by this execution manager and has to be in
an appropriate state (NS_SUSPENDED by the designated user).
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 reference identifying the activity to enquire.recipients - The agents who should assist in executing the activity.question - A question describing the problem when executing the
activity. This may be null.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.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.void replyEnquiry(SessionToken session, EBPInstanceReference activity, java.lang.String reply) throws InvalidActivityStateException, InvalidInstanceStateException
NS_SUSPENDED or
NS_ENQUIRIED).
If the activity is in state NS_ENQUIRIED with no current
enquiries but one replied enquiry left, the corresponding agent needs to
call this method which does not reply but drop the last replied enquiry and
sets the state to NS_COMPLETED.
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 reference identifying the activity which has been
replied.reply - A comment containing the answer for the originator. This may
be null.InvalidActivityStateException - If no enquiry is active for the
designated activity (process step) and the designated user, an
InvalidActivityStateException will be raised.InvalidInstanceStateException - If the activity is not in state
SUSPENDED and the instance is not running but
stopped, aborted, finished or changed, an
InvalidInstanceStateException is thrown. If the
activity is in state ENQUIRED, the instance state
will be ignored.WrongExecutionManagerException - If the designated activity is not
managed by this execution manager, a
WrongExecutionManagerException will be raised.ExecutionContext getExecutionContext(SessionToken session, EBPInstanceReference activity) throws InvalidActivityStateException, InvalidInstanceStateException
session - The session which is used to check for access rights on this
method.activity - The activity for which to retrieve the execution context.null.InvalidActivityStateException - If the activity (process step) is not
selected, running or suspended 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.Pair<java.util.Map<EBPInstanceReference,ExecutionContext>,java.util.Map<EBPInstanceReference,java.lang.Throwable>> getExecutionContexts(SessionToken session, java.util.Collection<EBPInstanceReference> activities)
Make sure to check the second element of the pair indicating any problems that occurred when
trying to retrieve the execution context of the corresponding activity. This will contain the
checked exceptions InvalidActivityStateException and
InvalidInstanceStateException.
session - The session which is used to check for access rights on this method.activities - The activities for which to retrieve the execution contexts.null.getExecutionContext(SessionToken, EBPInstanceReference)