Interface IWorkflowConfig


public interface IWorkflowConfig
Author:
Michal Dobisek, Polarion Software
  • Method Details

    • getPrototype

      @NotNull String getPrototype()
      Returns the prototype for which this workflow configuration is targeted.
      Since:
      3.8.1
    • getInitialStatus

      @NotNull String getInitialStatus()
      Returns the initial status used for workflow. Returns an empty string if the initial status is not defined.
    • setInitialStatus

      void setInitialStatus(@NotNull String status)
    • getInitialActionId

      @Nullable String getInitialActionId()
      Returns id of the initial action used for workflow, or null if initial action is not defined.
      Since:
      3.1.2
    • setInitialActionId

      void setInitialActionId(@Nullable String actionId)
      Since:
      3.1.2
    • getTransitions

      @NotNull Set<ITransition> getTransitions()
      Returns the transitions defined for this configuration.
      Returns:
      Set of ITransitions in this configuration. Modifications to the returned set do apply to this congiguration.
      See Also:
    • getAction

      @Nullable IAction getAction(@NotNull String actionId)
      Returns the action with given name.
      Parameters:
      actionId -
      Returns:
      the action with given name or null if no such action exists.
    • getTransitionAction

      @Nullable IAction getTransitionAction(@Nullable String sourceStatusId, @NotNull String targetStatusId)
      Returns the transition action.
      Since:
      3.9.0
    • getActions

      @NotNull Collection<IAction> getActions()
      Returns:
      The live collection of existing IActions. Modifications to the collection apply to this configuration.
    • getActionsMap

      @NotNull Map<String,IAction> getActionsMap()
      Returns:
      The live map of actionId -> IAction. Modifications to the map apply to this configuration.
    • verify

      void verify(@NotNull IContributionsManager contribs) throws VerificationException
      Verifies the consistency of the workflow and also checks that all referenced contributions do actually exist.
      Parameters:
      contribs - Not null, used to check validity of used functions, conditions and validators.
      Throws:
      VerificationException
    • serializeToXML

      @NotNull Document serializeToXML(@NotNull IContributionsManager contribs) throws VerificationException
      Verifies this configuration and then serializes it into the XML Document.
      Parameters:
      contribs - Not null, needed for the verification.
      Returns:
      a Document representing the workflow configuration
      Throws:
      VerificationException
    • createTransition

      @NotNull ITransition createTransition(@NotNull String from, @NotNull String to, @NotNull String actionId)
      Creates new transition instance. The resulting instance is NOT inserted into this configuration.
      Parameters:
      from - Initial status id
      to - Final status id
      actionId - Id of action to perform.
      Returns:
      New transition instance.
      See Also:
    • createAction

      @NotNull IAction createAction(@NotNull String id, @NotNull String name)
      Creates new action instance. The resulting instance is NOT inserted into this configuration.
      Parameters:
      id - Action ID.
      name - User friendly action name.
      Returns:
      New action instance.
    • createOperation

      @NotNull IOperation createOperation(@NotNull String name, @NotNull Map<String,String> arguments)
      Creates new operation instance, which can be insterted into IAction.
      Parameters:
      name - Operation name (must be a name of defined operation - not checked).
      arguments - Map of String name -> String value
      Returns:
      The new instance.