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 WorkflowNode
Finds 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 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()
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.props
(WorkflowNode node) Retrieves the properties of the given node and deserializes them into the node's properties model.default <T> T
props
(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
null
when 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
null
when no such node exists.
-
byUuid
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
null
when 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
null
when no node is currently being executed.
-
executedByName
Finds an executed node with the given name. If multiple nodes with the same name exists, 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
null
when 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.
-
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
null
when the properties model is not of the expected type.
-