Interface IWorkflowNodeLocator

    • 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.
      • props

        Object props​(WorkflowNode node)
        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

        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.
        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.