Interface WorkflowDefinition

All Superinterfaces:
Comparable<WorkflowDefinition>
All Known Implementing Classes:
WorkflowDefinitionImpl

public interface WorkflowDefinition extends Comparable<WorkflowDefinition>
A workflow definition.
  • Field Details

    • FAILURE_KEY

      static final String FAILURE_KEY
      The variable in a workflow definition that is to be replaced by the reason for an operation's failure.
      See Also:
  • Method Details

    • getId

      String getId()
      The short title of this workflow definition
    • setId

      void setId(String id)
      Sets the identifier
      Parameters:
      id - the workflow definition identifier
    • getTitle

      String getTitle()
      The title for this workflow definition
    • setTitle

      void setTitle(String title)
      Sets the title
      Parameters:
      title - the workflow definition title
    • getDescription

      String getDescription()
      A longer description of this workflow definition
    • setDescription

      void setDescription(String description)
      Sets the description
      Parameters:
      description - the workflow definition description
    • getConfigurationPanel

      String getConfigurationPanel()
      A XML String describing the configuration parameter/panel for this WorkflowDefinition.
    • getConfigurationPanelJson

      String getConfigurationPanelJson()
      A JSON String describing the configuration parameter/panel for this WorkflowDefinition.
    • getDisplayOrder

      int getDisplayOrder()
      An integer describing the display order for this workflow definition. The display order is supposed to define the order workflow lists as displayed to users. Default is 0.
    • setDisplayOrder

      void setDisplayOrder(int displayOrder)
      Set the display order
      Parameters:
      displayOrder - the workflow definition display order
    • getOperations

      The operations, listed in order, that this workflow definition includes.
    • getStateMappings

      Set<WorkflowStateMapping> getStateMappings()
      The custom state mappings to use for this workflow.
    • addTag

      void addTag(String tag)
      Tags the workflow definition with the given tag.
      Parameters:
      tag - the tag
    • removeTag

      void removeTag(String tag)
      Removes the tag from the workflow definition.
      Parameters:
      tag - the tag
    • containsTag

      boolean containsTag(String tag)
      Returns true if the workflow definition contains the given tag.
      Parameters:
      tag - the tag
      Returns:
      true if the element is tagged
    • containsTag

      boolean containsTag(Collection<String> tags)
      Returns true if the workflow definition contains at least one of the given tags. If there are no tags contained in the set, then the definition is considered to match as well.
      Parameters:
      tags - the set of tag
      Returns:
      true if the element is tagged accordingly
    • getTags

      String[] getTags()
      Returns the tags for this workflow definition or an empty array if there are no tags.
      Returns:
      the tags
    • getRoles

      Collection<String> getRoles()
      Returns the roles for this workflow definition
      Returns:
      the tags
    • clearTags

      void clearTags()
      Removes all tags associated with this workflow definition
    • getOrganization

      String getOrganization()
      Gets the organization associated with this workflow (or null, if it's global)
      Returns:
      the organization
    • add

      void add(WorkflowOperationDefinition operation)
      Appends the operation to the workflow definition.
      Parameters:
      operation - the operation
    • add

      void add(WorkflowOperationDefinition operation, int position)
      Inserts the operation at the given position into the workflow definition.
      Parameters:
      operation - the operation
      position - the position to add the workflow operation to
      Throws:
      IndexOutOfBoundsException - if position is larger than the number of operations + 1
    • get

      WorkflowOperationDefinition get(int position)
      Returns the operation at the given position.
      Parameters:
      position - the operation's position
      Throws:
      IndexOutOfBoundsException - if position is larger than the number of operations
    • remove

      Removes the workflow operation at the indicated position and returns it.
      Parameters:
      position - the operation's position
      Returns:
      the removed workflow operation
      Throws:
      IndexOutOfBoundsException - if position is larger than the number of operations