public interface ExecutableInstance extends Instance
ExecutableInstance in their signature may rely
on that the calling method has at least an execution lock on this instance.
So when explicitly retrieving an executable instance be sure to release the
lock under all circumstances and make sure the object reference is never
used again after unlocking!| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Generated ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEnquiry(int nodeID,
Enquiry enquiry)
Adds the designated enquiry to the designated node (current node
iteration), that is, the enquiry is stacked until
replied. |
void |
addNodeLWPInstanceID(int nodeID,
java.util.UUID lwpInstanceID)
Adds the ID of the lightweight-process (subprocess) instance in the
designated node with the current iteration.
|
void |
dropEnquiries(int nodeID)
Drops all enquiries (including the reply) currently set on the designated
node (current node iteration).
|
java.net.URI[] |
getAssignedRuntimeManager(int nodeID)
Gets the communication protocol depended URIs assigned to that
RuntimeManager instance that executes the activity of the given Node.
|
java.util.List<Enquiry> |
getCurrentEnquiries(int nodeID)
Gets an unmodifiable list of the enquiries currently active for the
designated node.
|
java.net.URI[] |
getInstanceStateListener()
Gets the communication protocol depended URIs of the callback interface
that needs to be informed in case of state changes (especially for
termination) of this instance.
|
int[] |
getNodesInState(ProcessConstants.NodeState... states)
Gets all nodes (node IDs) of this instance which are in the designated states.
|
Enquiry |
getRepliedEnquiry(int nodeID)
Gets the last replied enquiry which allows to retrieve the corresponding
reply.
|
int |
increaseNodeIteration(int nodeID)
Increases the iteration counter of a node and returns the new value.
|
void |
removeNodeLWPInstanceID(int nodeId,
int iteration,
java.util.UUID lwpInstanceId)
Removes the ID of the lightweight-process (subprocess) instance from the designated node with
the designated iteration.
|
void |
removeNodeLWPInstanceID(int nodeID,
java.util.UUID lwpInstanceID)
Removes the ID of the lightweight-process (subprocess) instance from the
designated node with the current iteration.
|
void |
replyEnquiry(int nodeID,
java.lang.String reply,
QualifiedAgent replier)
Answers the current enquiry with the designated reply by the designated
replier for the designated node (current node iteration).
|
void |
setAssignedRuntimeManager(int nodeID,
java.net.URI[] runtimeManagerURIs)
Associates the node with the RuntimeManager that executes the activity
assigned to the node.
|
void |
setExecutionMode(int nodeID,
ProcessConstants.ExecutionMode executionMode)
Sets the designated execution mode for the designated node.
|
void |
setInstanceName(java.lang.String instanceName,
java.util.Map<java.lang.String,java.lang.String> localisation)
Sets the instance name including its localisations to the designated ones.
|
void |
setInstanceStateListener(java.net.URI[] callback)
Sets the communication protocol depended URIs of the callback interface
that needs to be informed in case of state changes of this instance.
|
void |
setNodeState(int nodeID,
ProcessConstants.NodeState state)
Sets the designated node to the designated state.
|
void |
setPerformingAgent(int nodeID,
QualifiedAgent performingAgent)
Sets the name of the agent who executes the designated node.
|
getBaseTemplateID, getCreationTime, getEdgeState, getExecutionMode, getID, getInitiatorAgent, getLogID, getName, getNodeIteration, getNodeLWPInstanceID, getNodeLWPInstanceID, getNodeState, getParentEBPReference, getPerformingAgent, getSupervisorAgent, getTemplate, isModified, isStructurallyModifiedgetUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValuegetPluginData, getPluginDatas, getSupportedPluginstoLocalisedStringstatic final long serialVersionUID
int[] getNodesInState(ProcessConstants.NodeState... states)
states - The node states of the nodes to retrieve.void setPerformingAgent(int nodeID,
QualifiedAgent performingAgent)
null.nodeID - The ID of the node which is executed by the designated agent.performingAgent - The agent who performs/executes the designated node
of this process instance.void setInstanceName(java.lang.String instanceName,
java.util.Map<java.lang.String,java.lang.String> localisation)
Locale-string to the
corresponding localised instance name.instanceName - The name of the instance to be set while executing the
instance.localisation - A mapping from Locale-string to the
corresponding localised instance name. This may be null which does
not set localised instance names.int increaseNodeIteration(int nodeID)
nodeID - The ID of the node to increase the iteration counter.ProcessConstants.NodeStatevoid setNodeState(int nodeID,
ProcessConstants.NodeState state)
nodeID - The ID of the node to set the state.state - The new state of the node.void setExecutionMode(int nodeID,
ProcessConstants.ExecutionMode executionMode)
nodeID - The ID of the node of which to set the execution mode.executionMode - The execution mode in which the node is started
(production, test or substituted test).void addNodeLWPInstanceID(int nodeID,
java.util.UUID lwpInstanceID)
nodeID - The ID of the node containing the subprocess.lwpInstanceID - The ID of the subprocess instance to be referenced by
the designated node.void removeNodeLWPInstanceID(int nodeID,
java.util.UUID lwpInstanceID)
nodeID - The ID of the node containing the subprocess.lwpInstanceID - The ID of the subprocess instance not to be referenced
any longer by the designated node.void removeNodeLWPInstanceID(int nodeId,
int iteration,
java.util.UUID lwpInstanceId)
nodeId - The ID of the node containing the subprocess.iteration - The iteration of the node for which to remove the designated LWP instance ID.lwpInstanceId - The ID of the subprocess instance not to be referenced any longer by the
designated node and iteration.java.util.List<Enquiry> getCurrentEnquiries(int nodeID)
NS_COMPLETED. If it is finished with an open
enquiry, it will reach the state NS_ENQUIRED. This allows
to read the replies by the designated originators.nodeID - The ID of the node of which to retrieve the current
enquiries.Enquiry getRepliedEnquiry(int nodeID)
list of current enquiries any more.
NS_ENQUIRED, the
corresponding agent will be able to set the state to
NS_COMPLETED (and therefore remove the item from the
worklist) by
replying
the (already replied) enquiry.nodeID - The ID of the node of which to retrieve the last enquiry.void addEnquiry(int nodeID,
Enquiry enquiry)
replied.nodeID - The ID of the node for which to add an enquiry.enquiry - The enquiry which is to be added to the designated node.
This contains the agent wanting feedback, the recipients of the
enquiry as well as the question of the originator.void replyEnquiry(int nodeID,
java.lang.String reply,
QualifiedAgent replier)
current enquiries
Enquiry will be removed from the list and provided as
replied enquiry.nodeID - The ID of the node for which to remove the last (current)
enquiry.reply - The notice providing the feedback needed by the originator of
the removed enquiry. This may be null or the empty string.replier - The QualifiedAgent that replied the enquiry. This must not
be null.void dropEnquiries(int nodeID)
nodeID - The ID of the node for which to drop all enquiries.java.net.URI[] getInstanceStateListener()
void setInstanceStateListener(java.net.URI[] callback)
callback - The communication protocol depended URIs specifying the
server (and the corresponding protocol) to inform when the
instance has changed its state (finished, suspended, resumed or
suspended).java.net.URI[] getAssignedRuntimeManager(int nodeID)
If null is returned then the activity is not currently assigned to an instance.
Assigned runtime managers are used for
automatically starting nodes.
For such a node the runtime manager URIs are assigned when the previous
node is started or resumed. This allows to automatically start the node on
the right runtime manager. If something goes wrong when automatically
starting a node, it will fall back to a normal start and the runtime
manager URIs will be unassigned. This means, if the node is auto-start
enabled but has not runtime manager assigned, automatically starting will
not take place.
nodeID - The ID of the nodevoid setAssignedRuntimeManager(int nodeID,
java.net.URI[] runtimeManagerURIs)
To dissolve the binding between a node and a RuntimeManager, pass null to the parameter runtimeManagerURIs.
nodeID - The ID of the noderuntimeManagerURIs - The communication protocol depended URIs of that
runtimeManager which executes the activity assigned to the given
node.