Interface IWorkflowNodeLocator
-
public interface IWorkflowNodeLocator
Handler for locating nodes when a task is executed. You can then use the node with other methods of theIWorkflowExecutionContext
. Nodes are uniquely identifier by theirWorkflowNode.getId()
, use the ID if possible. TheAWorkflowElement.getName()
is unique at most within aWorkflowTask
- occasionally there may be different nodes with the same name. TheNodeKey
is guaranteed to be unique within aWorkflowProcess
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description WorkflowNode
byId(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>
byIds(Iterable<Long> nodeIds)
Finds the nodes by the given ID in the current workflow execution context.default WorkflowNode
byUuid(NodeKey nodeKey)
Finds the node by the given UUID in the current workflow execution context.WorkflowNode
byUuid(UUID taskUuid, UUID nodeUuid)
Finds the node by the given UUID in the current workflow execution context.default List<WorkflowNode>
byUuids(NodeKey... nodeKeys)
Finds the nodes by the given UUID in the current workflow execution context.default List<WorkflowNode>
byUuids(Iterable<NodeKey> nodeKeys)
Finds the nodes by the given UUID in the current workflow execution context.WorkflowNode
current()
WorkflowNode
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.
-
-
-
Method Detail
-
byId
@Nullable WorkflowNode byId(long nodeId)
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
@Nonnull default List<WorkflowNode> byIds(Iterable<Long> nodeIds)
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
@Nonnull default List<WorkflowNode> byIds(long... nodeIds)
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
@Nullable default WorkflowNode byUuid(NodeKey nodeKey)
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
@Nullable WorkflowNode byUuid(UUID taskUuid, UUID nodeUuid)
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
@Nonnull default List<WorkflowNode> byUuids(Iterable<NodeKey> nodeKeys)
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
@Nonnull default List<WorkflowNode> byUuids(NodeKey... nodeKeys)
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
@Nullable WorkflowNode executedByName(String nodeName)
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
-- Returns:
- The most recently executed node with the given name, or
null
when no such node exists.
-
executedByNames
@Nonnull default List<WorkflowNode> executedByNames(Iterable<String> nodeNames)
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
@Nonnull default List<WorkflowNode> executedByNames(String... nodeNames)
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.
-
-