Class WorkflowElementIndex
java.lang.Object
de.xima.fc.workflow.processor.model.WorkflowElementIndex
Given a
WorkflowTask or WorkflowProcess, contains various maps of WorkflowNodes for quickly
accessing the nodes by a certain index.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiongetNodeByUuid(ElementKey key) getNodeByUuid(NodeKey key) getParent(ElementKey key) getParents(ElementKey start, boolean includeStartNode) getParents(NodeKey start, boolean includeStartNode) getParentUuids(ElementKey start, boolean includeStartNode) getParentUuids(NodeKey start, boolean includeStartNode) getTaskByNode(NodeKey nodeKey) Gets a task that the given node belongs to.getTaskByTrigger(TriggerKey triggerKey) Gets a task that the given trigger belongs to.getTaskByUuid(UUID taskUuid) Gets a task by its UUID.getTasks()Gets a map of tasks by their UUID.booleanChecks if a node is a parent of another node.static WorkflowElementIndexof(WorkflowProcess process, Mandant client) Creates a new index with all workflow element from the given process.static WorkflowElementIndexof(WorkflowTask task, Mandant client) Creates a new index with all workflow element from the given task.
-
Method Details
-
getAllNodes
- Returns:
- A list of all known nodes in this element index.
-
getAllTriggers
- Returns:
- A list of all known triggers in this element index.
-
getNodeByUuid
- Parameters:
key- Element key of a workflow node to find.- Returns:
- The workflow node with the given key, or
nullwhen no such node exists.
-
getNodeByUuid
- Parameters:
key- Element key of a workflow node to find.- Returns:
- The workflow node with the given key, or
nullwhen no such node exists.
-
getNodesByKind
- Returns:
- All nodes, grouped by their
AWorkflowElement.getType().
-
getNodesByKindAndTask
public Map<String, Map<UUID, List<IWorkflowElementWithDeserializedModel<?, WorkflowNode>>>> getNodesByKindAndTask()- Returns:
- An index of all nodes, indexed first by their type and then by the task they belong to.
-
getNodesByTask
- Returns:
- All nodes, grouped by the UUID of the task they belong to.
-
getNodesByUuid
- Returns:
- All nodes , indexed by their
ElementKey.
-
getParent
- Parameters:
key- A node to check.- Returns:
- The parent of the node, or
nullwhen it is a root node.
-
getParent
- Parameters:
key- A node to check.- Returns:
- The parent of the node, or
nullwhen it is a root node.
-
getParentUuids
- Parameters:
start- Start node.includeStartNode- Whether to include the start node in the iterable.- Returns:
- An iterable over all parents of the start node.
-
getParentUuids
-
getParents
- Parameters:
start- Start node.includeStartNode- Whether to include the start node in the iterable.- Returns:
- An iterable over all parents of the start node.
-
getParents
- Parameters:
start- Start node.includeStartNode- Whether to include the start node in the iterable.- Returns:
- An iterable over all parents of the start node.
-
getTaskByNode
Gets a task that the given node belongs to.- Parameters:
nodeKey- Node key of a node that belongs to the task to get.- Returns:
- The task that the given node belongs to, or null if no such task exists, or it does not belong to any task.
-
getTaskByTrigger
Gets a task that the given trigger belongs to.- Parameters:
triggerKey- Trigger key of a trigger that belongs to the task to get.- Returns:
- The task that the given trigger belongs to, or null if no such task exists, or it does not belong to any task.
-
getTaskByUuid
Gets a task by its UUID.- Parameters:
taskUuid- UUID of the task to get.- Returns:
- The task with the given UUID, or
nullif no such task exists.
-
getTasks
- Returns:
- All tasks contained in this index.
-
getTasksByUuid
Gets a map of tasks by their UUID.- Returns:
- A map of tasks by their UUID.
-
getTriggerByUuid
- Parameters:
key- Element key of a workflow trigger to find.- Returns:
- The workflow trigger with the given key, or
nullwhen no such trigger exists.
-
getTriggerByUuid
- Parameters:
key- Element key of a workflow trigger to find.- Returns:
- The workflow trigger with the given key, or
nullwhen no such trigger exists.
-
getTriggersByKind
public Map<String, List<IWorkflowElementWithDeserializedModel<?, WorkflowTrigger>>> getTriggersByKind()- Returns:
- All triggers, grouped by their
AWorkflowElement.getType().
-
getTriggersByKindAndTask
public Map<String, Map<UUID, List<IWorkflowElementWithDeserializedModel<?, WorkflowTrigger>>>> getTriggersByKindAndTask()- Returns:
- An index of all triggers, indexed first by their type and then by the trigger they belong to.
-
getTriggersByUuid
public Map<TriggerKey, IWorkflowElementWithDeserializedModel<?, WorkflowTrigger>> getTriggersByUuid()- Returns:
- All triggers, indexed by their
ElementKey.
-
isParent
-
of
Creates a new index with all workflow element from the given process.- Parameters:
process- Workflow process to index.client- Current client that is used to retrieve plugin trigger and node handlers.- Returns:
- A new index with all workflow element from the given process.
-
of
Creates a new index with all workflow element from the given task.- Parameters:
task- Workflow task to index.client- Current client that is used to retrieve plugin trigger and node handlers.- Returns:
- A new index with all workflow element from the given task.
-