Interface IWorkflowNodeLocator
public interface IWorkflowNodeLocator
Handler for locating nodes when a task is executed. You can then use the node with other methods of the
IWorkflowExecutionContext. Nodes are uniquely identifier by their WorkflowNode.getId(), use the ID if
possible. The AWorkflowElement.getName() is unique at most within a WorkflowTask - occasionally there may
be different nodes with the same name. The NodeKey is guaranteed to be unique within a
WorkflowProcess.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionbyId(long nodeId) Finds the node by the given ID in the current workflow execution context.default List<WorkflowNode> byIds(long... nodeIds) Finds the nodes by the given ID in the current workflow execution context.default List<WorkflowNode> Finds the nodes by the given ID in the current workflow execution context.default WorkflowNodeFinds the node by the given UUID in the current workflow execution context.Finds the node by the given UUID in the current workflow execution context.default WorkflowNodeDeprecated.default List<WorkflowNode> Finds the nodes by the given UUID in the current workflow execution context.default List<WorkflowNode> Finds the nodes by the given UUID in the current workflow execution context.current()currentByName(String name) Finds a node that is being executed currently and possesses the given name.currentByUuid(UUID nodeUuid) Finds a node that is being executed currently and has the given UUID.com.google.common.collect.ImmutableList<WorkflowNode> currents()executedByName(String nodeName) Finds an executed node with the given name.default List<WorkflowNode> executedByNames(Iterable<String> nodeNames) Finds the nodes by the given names in the current workflow execution context.default List<WorkflowNode> executedByNames(String... nodeNames) Finds the nodes by the given names in the current workflow execution context.default booleanWhether the given node is being executed currently.default booleanisCurrentlyExecuted(NodeKey nodeKey) Whether the given node is being executed currently.booleanisCurrentlyExecuted(UUID nodeUuid) Whether a node with the given UUID is being executed currently.default booleanisCurrentlyExecuted(UUID taskUuid, UUID nodeUuid) Deprecated.UseisCurrentlyExecuted(UUID)instead.props(WorkflowNode node) Retrieves the properties of the given node and deserializes them into the node's properties model.default <T> Tprops(WorkflowNode node, Class<T> expectedType) Retrieves the properties of the given node and deserializes them into the node's properties model.
-
Method Details
-
byId
Finds the node by the given ID in the current workflow execution context.- Parameters:
nodeId- ID of the node.- Returns:
- The node with the given ID, or
nullwhen no such node exists.
-
byIds
Finds the nodes by the given ID in the current workflow execution context.- Parameters:
nodeIds- IDs of the nodes.- Returns:
- The nodes with the given IDs, possibly an empty list when no nodes were found.
-
byIds
Finds the nodes by the given ID in the current workflow execution context.- Parameters:
nodeIds- IDs of the nodes.- Returns:
- The nodes with the given ID, possibly an empty list when no nodes were found.
-
byUuid
Finds the node by the given UUID in the current workflow execution context.- Parameters:
nodeKey- UUID of the node to find, and the UUID of the task to which it belongs. Note that nodes in different tasks may have the same UUID.- Returns:
- The node with the given UUID, or
nullwhen no such node exists.
-
byUuid
Deprecated.UsebyUuid(UUID)instead. The task UUID is not needed anymore, as the node UUID is already unique.Finds the node by the given UUID in the current workflow execution context.- Parameters:
taskUuid- UUID of the task of the node to find.nodeUuid- UUID of the node to find.- Returns:
- The node with the given UUID, or
nullwhen no such node exists.
-
byUuid
Finds the node by the given UUID in the current workflow execution context.- Parameters:
nodeUuid- UUID of the node to find.- Returns:
- The node with the given UUID, or
nullwhen no such node exists.
-
byUuids
Finds the nodes by the given UUID in the current workflow execution context.- Parameters:
nodeKeys- UUIDs of the nodes to find.- Returns:
- The nodes with the given UUIDs, possibly an empty list when no nodes were found.
-
byUuids
Finds the nodes by the given UUID in the current workflow execution context.- Parameters:
nodeKeys- UUIDs of the nodes to find.- Returns:
- The nodes with the given UUIDs, possibly an empty list when no nodes were found.
-
current
WorkflowNode current()- Returns:
- The workflow node that is currently being executed, or
nullwhen no node is currently being executed.
-
currentByName
Finds a node that is being executed currently and possesses the given name. When multiple such nodes exists, the node whose execution started most recently is returned.- Parameters:
name- Name of a node.- Returns:
- The most recently executed node with the given name, that is still being executed.
-
currentByUuid
Finds a node that is being executed currently and has the given UUID.- Parameters:
nodeUuid- UUID of a node.- Returns:
- The most recently executed node with the given UUID, that is still being executed.
-
currents
com.google.common.collect.ImmutableList<WorkflowNode> currents()- Returns:
- A list of all nodes currently being executed, ordered by the time their execution was started, from the node whose execution started most recently to the node whose execution stared least recently.
-
executedByName
Finds an executed node with the given name. If multiple nodes with the same name exist, returns the node that was most recently executed.- Parameters:
nodeName- Name of the node to execute.- Returns:
- The most recently executed node with the given name, or
nullwhen no such node exists.
-
executedByNames
Finds the nodes by the given names in the current workflow execution context. If multiple nodes with the same name exists, returns the node that was most recently executed.- Parameters:
nodeNames- Names of the nodes to find.- Returns:
- The nodes with the given names, possibly an empty list when no nodes were found.
-
executedByNames
Finds the nodes by the given names in the current workflow execution context. If multiple nodes with the same name exists, returns the node that was most recently executed.- Parameters:
nodeNames- Names of the nodes to find.- Returns:
- The nodes with the given names, possibly an empty list when no nodes were found.
-
isCurrentlyExecuted
Whether the given node is being executed currently.- Parameters:
nodeKey- The key of a node to check.- Returns:
- Whether the given node is still being executed.
-
isCurrentlyExecuted
Deprecated.UseisCurrentlyExecuted(UUID)instead. The task UUID is not needed anymore, as the node UUID is already unique.Whether a node with the given UUID is being executed currently.- Parameters:
taskUuid- UUID of the node's task.nodeUuid- UUID of a node to check.- Returns:
- Whether a node with the given UUID is still being executed.
-
isCurrentlyExecuted
Whether a node with the given UUID is being executed currently.- Parameters:
nodeUuid- UUID of a node to check.- Returns:
- Whether a node with the given UUID is still being executed.
-
isCurrentlyExecuted
Whether the given node is being executed currently.- Parameters:
node- A node to check.- Returns:
- Whether the given node is still being executed.
-
props
Retrieves the properties of the given node and deserializes them into the node's properties model.- Parameters:
node- Node to process.- Returns:
- The deserialized properties model instance
-
props
Retrieves the properties of the given node and deserializes them into the node's properties model.- Type Parameters:
T- Type of the expected properties model.- Parameters:
node- Node to process.expectedType- Expected type of the properties model.- Returns:
- The deserialized properties model instance, or
nullwhen the properties model is not of the expected type.
-
byUuid(UUID)instead.