Interface NESTWorkflowValidator

All Superinterfaces:
NESTGraphValidator
All Known Implementing Classes:
NESTWorkflowValidatorImpl

public interface NESTWorkflowValidator extends NESTGraphValidator
To check if a NESTWorkflowObject is a valid nest workflow, this class can be used. The validator provides several methods for performing fine-grained validations.
  • Method Details

    • isAllowEmptyControlflowBlocks

      boolean isAllowEmptyControlflowBlocks()
      Returns:
      Flag, whether controlflow blocks without any containing elements are allowed.
    • setAllowEmptyControlflowBlocks

      void setAllowEmptyControlflowBlocks(boolean allowEmptyControlflowBlocks)
      Parameters:
      allowEmptyControlflowBlocks - Flag, whether controlflow blocks without any containing * elements are allowed.
    • isExpectPartOfEdges

      boolean isExpectPartOfEdges()
      Returns:
      Flag, whether part-of edges are expected.
    • setExpectPartOfEdges

      void setExpectPartOfEdges(boolean expectPartOfEdges)
      Parameters:
      expectPartOfEdges - Flag, whether part-of edges are expected.
    • isExpectWorkflowNode

      boolean isExpectWorkflowNode()
      Returns:
      Flag, whether a workflow node is expected.
    • setExpectWorkflowNode

      void setExpectWorkflowNode(boolean expectWorkflowNode)
      Parameters:
      expectWorkflowNode - Flag, whether a workflow node is expected.
    • isValidWorkflow

      boolean isValidWorkflow()
      This method checks if the workflow is a valid nest workflow. It checks if it is a valid graph, has a unique workflow node, has correct part of, controlflow and dataflow edges, no data nodes are unconnected and the controlflow blocks are correct. See methods NESTGraphValidator.isValidGraph()}, hasUniqueWorkflowNode(), hasCorrectPartOfEdges(), hasCorrectControlflowEdges(), hasCorrectDataflowEdges(), hasNoUnconnectedDataNodes() and checkControlflowBlocks().

      A flag can be set with method setAllowEmptyControlflowBlocks(boolean) ()} to allow controlflow blocks without any containing elements.

      Returns:
      True, if nest workflow is valid.
    • isBlockOrientedWorkflow

      boolean isBlockOrientedWorkflow()
      This method checks whether the workflow is block-oriented. This is a valid workflow that also has only one start and one end node. See methods isValidWorkflow() and hasSingleStartEndNode().

      A flag can be set with method setAllowEmptyControlflowBlocks(boolean) ()} to allow controlflow blocks without any containing elements.

      Returns:
      True, if nest workflow is valid and block oriented.
    • hasCorrectPartOfEdges

      boolean hasCorrectPartOfEdges()
      This method checks all part of edges. These must connect a workflow or a subworkflow node as a post node with other nodes of the workflow and may only occur once for each workflow node.
      Returns:
      True, if all part of edges are valid.
    • hasCorrectDataflowEdges

      boolean hasCorrectDataflowEdges()
      This method verifies that all dataflow edges connect a task node to a data node.
      Returns:
      True, if all dataflow edges are valid.
    • hasNoUnconnectedDataNodes

      boolean hasNoUnconnectedDataNodes()
      This method checks that all data nodes are connected to other elements of the workflow via dataflow edges.
      Returns:
      True, if all data nodes are connected to the workflow.
    • hasCorrectControlflowEdges

      boolean hasCorrectControlflowEdges()
      This method checks all controlflow edges in the workflow. These must run between two sequence nodes and must be unique from node to node if the nodes are not controlflow nodes.
      Returns:
      True, if controlflow edges are valid.
    • hasUniqueWorkflowNode

      boolean hasUniqueWorkflowNode()
      This method verifies that the workflow node exists and is unique.
      Returns:
      True, if workflow node is unique.
    • hasSingleStartEndNode

      boolean hasSingleStartEndNode()
      This method verifies that the workflow has only one start node and only one end node.
      Returns:
      True, if start and end node are unique.
    • checkControlflowBlocks

      boolean checkControlflowBlocks()
      This method checks all controlflow blocks in the workflow. These are valid if all controlflow pairs are of the same controlflow type, each node has a corresponding partner node (start and end node) and there are no interleaved controlflows. In addition, for And nodes it is checked that there are exactly two branches. If allowEmptyControlflowBlocks=false, it is checked that both branches are not empty. For Or or Xor nodes, there must be also two branches, but one may be empty. If allowEmptyControlflowBlocks=true, also both branches can be empty. For Loop nodes, only one non-empty branch is allowed. If allowEmptyControlflowBlocks=false, the branch can be empty as well.

      The flag allowEmptyControlflowBlocks can be set with method setAllowEmptyControlflowBlocks(boolean) ()} to allow controlflow blocks without any containing elements.

      Returns:
      True, if all controlflow blocks are valid.
    • checkSemanticDescriptors

      boolean checkSemanticDescriptors()
      This method checks if the classes at the semantic descriptors of the nodes and edges are valid.
      Returns:
      True, if all semantic descriptors are valid.
    • getGraph

      NESTWorkflowObject getGraph()
      Description copied from interface: NESTGraphValidator
      This method returns the graph object for which the validator was created.
      Specified by:
      getGraph in interface NESTGraphValidator
      Returns:
      The graph object for which the validator was created.