Interface IWorkflowElementStore


  • public interface IWorkflowElementStore
    Provides access to all workflow elements of a workflow when creating a BPMN diagram.
    Since:
    8.4.0
    • Method Detail

      • nodeById

        WorkflowNode nodeById​(String id)
        Gets the node with the given ID.
        Parameters:
        id - ID of the node to get, as returned by nodeId(WorkflowNode).
        Returns:
        The node with the given ID, or null if no such node exists.
      • nodeByPart

        WorkflowNode nodeByPart​(IStructuredBpmnModelPart part)
        Gets the workflow node from which the part was created. If the part was not created from a node, returns null.
        Parameters:
        part - The part for which to get the node.
        Returns:
        The workflow node that created the part, or null if the part was not created from a node.
      • nodeByUuid

        WorkflowNode nodeByUuid​(WorkflowProcess context,
                                NodeKey nodeKey)
        Gets the node with the given UUID.
        Parameters:
        context - The workflow process containing the node.
        nodeKey - The node key with the UUID of the task and node.
        Returns:
        The node with the given key, or null if no such node exists.
      • nodeHandler

        INodeHandler<?> nodeHandler​(WorkflowNode node)
        Gets the handler for the given workflow node.
        Parameters:
        node - A node in the workflow process.
        Returns:
        The handler for the given workflow node, or null if no handler exists.
      • nodeId

        String nodeId​(WorkflowNode node)
        Gets the ID of the given node.
        Parameters:
        node - The node for which to get the ID.
        Returns:
        The ID of the node.
      • processById

        WorkflowProcess processById​(String id)
        Gets the process with the given ID.
        Parameters:
        id - ID of the process to get, as returned by processId(WorkflowProcess).
        Returns:
        The process with the given ID, or null if no such process exists.
      • processByPart

        WorkflowProcess processByPart​(IStructuredBpmnModelPart part)
        Gets the workflow process from which the part was created. If the part was not created from a process, returns null.
        Parameters:
        part - The part for which to get the process.
        Returns:
        The workflow process that created the part, or null if the part was not created from a process.
      • processId

        String processId​(WorkflowProcess process)
        Gets the ID of the given process.
        Parameters:
        process - The process for which to get the ID.
        Returns:
        The ID of the process.
      • props

        Object props​(WorkflowTrigger trigger)
        Retrieves the properties of the given trigger and deserializes them into the node's properties model.
        Parameters:
        trigger - Trigger to process.
        Returns:
        The deserialized properties model instance
      • props

        default <T> T props​(WorkflowTrigger node,
                            Class<T> expectedType)
        Retrieves the properties of the given trigger and deserializes them into the node's properties model.
        Type Parameters:
        T - Type of the expected properties model.
        Parameters:
        node - Trigger 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.
      • 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.
      • resolveControlTransferTarget

        WorkflowNode resolveControlTransferTarget​(WorkflowProcess process,
                                                  WorkflowNode source,
                                                  NodeKey target,
                                                  String controlTransferType)
        Resolves the target node for a control transfer (e.g., continue, break, etc.) to the given target. When the target is non-null, returns the node with the given key. If the target is null, returns the closest parent node of the source node that can handle the specified control transfer type. If no target can be found, returns null.
        Parameters:
        process - The workflow process containing the source node.
        source - The source node that initiates the control transfer.
        target - The key of the target node to resolve. If null, finds the closest target.
        controlTransferType - The type of control transfer to resolve (e.g., "continue", "break", etc.).
        Returns:
        The resolved target node, or null if no target could be found.
      • resolveControlTransferTarget

        WorkflowNode resolveControlTransferTarget​(WorkflowProcess process,
                                                  WorkflowNode source,
                                                  NodeKey target,
                                                  EStandardControlTransferType controlTransferType)
        Resolves the target node for a control transfer (e.g., continue, break, etc.) to the given target. When the target is non-null, returns the node with the given key. If the target is null, returns the closest parent node of the source node that can handle the specified control transfer type. If no target can be found, returns null.
        Parameters:
        process - The workflow process containing the source node.
        source - The source node that initiates the control transfer.
        target - The key of the target node to resolve. If null, finds the closest target.
        controlTransferType - The type of control transfer to resolve (e.g., "continue", "break", etc.).
        Returns:
        The resolved target node, or null if no target could be found.
      • taskById

        WorkflowTask taskById​(String id)
        Gets the task with the given ID.
        Parameters:
        id - ID of the task to get, as returned by taskId(WorkflowTask).
        Returns:
        The task with the given ID, or null if no such task exists.
      • taskByPart

        WorkflowTask taskByPart​(IStructuredBpmnModelPart part)
        Gets the workflow task from which the part was created. If the part was not created from a task, returns null.
        Parameters:
        part - The part for which to get the task.
        Returns:
        The workflow task that created the part, or null if the part was not created from a task.
      • taskId

        String taskId​(WorkflowTask task)
        Gets the ID of the given task.
        Parameters:
        task - The task for which to get the ID.
        Returns:
        The ID of the task.
      • tasks

        List<WorkflowTask> tasks()
        Gets all workflow tasks corresponding to the processing chains in the workflow, in the order they were configured by the user in the workflow designer.
        Returns:
        A list of all workflow tasks in the order they were configured.
      • triggerById

        WorkflowTrigger triggerById​(String id)
        Gets the trigger with the given ID.
        Parameters:
        id - ID of the trigger to get.
        Returns:
        The trigger with the given ID, or null if no such trigger exists.
      • triggerByPart

        WorkflowTrigger triggerByPart​(IStructuredBpmnModelPart part)
        Gets the workflow trigger from which the part was created. If the part was not created from a trigger, returns null.
        Parameters:
        part - The part for which to get the trigger.
        Returns:
        The workflow trigger that created the part, or null if the part was not created from a trigger.
      • triggerByUuid

        WorkflowTrigger triggerByUuid​(WorkflowProcess context,
                                      TriggerKey triggerKey)
        Gets the trigger with the given UUID.
        Parameters:
        context - The workflow process containing the trigger.
        triggerKey - The trigger key with the UUID of the task and trigger.
        Returns:
        The node with the given key, or null if no such trigger exists.
      • triggerHandler

        ITriggerHandler<?> triggerHandler​(WorkflowTrigger trigger)
        Gets the handler for the given workflow trigger.
        Parameters:
        trigger - A trigger in the workflow process.
        Returns:
        The handler for the given workflow trigger, or null if no handler exists.
      • triggerId

        String triggerId​(WorkflowTrigger trigger)
        Gets the trigger with the given ID.
        Parameters:
        trigger - The trigger for which to get the ID.
        Returns:
        The ID of the trigger.
      • workflowProcess

        WorkflowProcess workflowProcess()
        The workflow process for which a BPMN diagram is created.
        Returns:
        The workflow process.