Interface WorkflowModel

All Superinterfaces:
HasMetaData

@ProviderType public interface WorkflowModel extends HasMetaData
WorkflowModel represents a model/definition of a workflow. It provides methods for retrieving the entities of the model like WorkflowNodes and WorkflowTransitions as well as common model attributes like name, description or version.
  • Method Details

    • getId

      String getId()
      Returns the ID of the WorkflowModel.
      Returns:
      The ID of the WorkflowModel.
    • getTitle

      String getTitle()
      Returns the title of the WorkflowModel.
      Returns:
      The title of the WorkflowModel.
    • setTitle

      void setTitle(String title)
      Sets the title of the WorkflowModel.
      Parameters:
      title - The new title of the WorkflowModel.
    • getDescription

      String getDescription()
      Returns the description of the WorkflowModel.
      Returns:
      The description of the WorkflowModel.
    • setDescription

      void setDescription(String description)
      Sets the description of the WorkflowModel.
      Parameters:
      description - The new description of the WorkflowModel.
    • getVersion

      String getVersion()
      Returns the version of the WorkflowModel.
      Returns:
      The version of the WorkflowModel.
    • getNodes

      List<WorkflowNode> getNodes()
      Returns the list of WorkflowNodes contained by the WorkflowModel.
      Returns:
      The list of WorkflowNodes of the WorkflowModel.
    • createNode

      WorkflowNode createNode()
      Returns:
      the created workflow node
    • createNode

      WorkflowNode createNode(String title, String type, String description)
      Parameters:
      title - the title
      type - the type
      description - the description
      Returns:
      the created workflow node
    • setRootNode

      void setRootNode(WorkflowNode node)
      Parameters:
      node - the workflow node
    • setEndNode

      void setEndNode(WorkflowNode node)
      Parameters:
      node - the workflow node
    • getNode

      WorkflowNode getNode(String id)
      Returns the WorkflowNode with the given id
      Parameters:
      id - The ID of the WorkflowNode.
      Returns:
      The WorkflowNode or null if not found.
    • getRootNode

      WorkflowNode getRootNode()
      Returns the root/start WorkflowNode.
      Returns:
      The root WorkflowNode.
    • getEndNode

      WorkflowNode getEndNode()
      Returns the end WorkflowNode.
      Returns:
      The end WorkflowNode.
    • getTransitions

      List<WorkflowTransition> getTransitions()
      Returns the list of WorkflowTransitions contained by the WorkflowModel.
      Returns:
      The list of WorkflowTransitions of the WorkflowModel.
    • createTransition

      WorkflowTransition createTransition()
      Returns:
      the created workflow transition
    • createTransition

      WorkflowTransition createTransition(WorkflowNode from, WorkflowNode to, String rule)
      Parameters:
      from - the workflow node to begin the transition with
      to - the workflow node to end the transition with
      rule - the rule
      Returns:
      the created workflow transition
    • validate

      void validate() throws ValidationException
      Validates the model.
      Throws:
      ValidationException - in case the validation fails
    • getVariableTemplates

      Map<String,VariableTemplate> getVariableTemplates()
      Returns:
      a Map with keys as variables' names and values as VariableTemplates .
    • createVariableTemplate

      VariableTemplate createVariableTemplate(String name, String dataType)
      Parameters:
      name - the name of the variable
      dataType - the type of the variable in java fully qualified class name format
      Returns:
      the created variable template