Interface MutableWorkflowDefinition

All Superinterfaces:
CanCopy<WorkflowDefinition>, HasId<WorkflowDefinitionId>, Model<WorkflowDefinition,WorkflowDefinitionId>, Validatable, WorkflowDefinition

public interface MutableWorkflowDefinition extends WorkflowDefinition
Mutable version of a WorkflowDefinition that allows direct modification of workflow elements. This interface extends WorkflowDefinition to provide methods for adding, removing, and updating workflow components without using the builder pattern.

MutableWorkflowDefinition is useful for scenarios where direct manipulation of workflow elements is needed, such as:

  • Runtime workflow modifications
  • Workflow migration and updates
  • Dynamic workflow configuration
  • Testing and debugging scenarios

This interface provides direct access to the underlying workflow structure and allows for immediate modifications to states, transitions, forks, joins, and other workflow elements.

Since:
1.0
See Also:
  • Method Details

    • setGlobalConditions

      void setGlobalConditions(Conditions globalConditions)
      Sets the global conditions for the workflow.
      Parameters:
      globalConditions - the global conditions to set
    • setMetaAttributes

      void setMetaAttributes(Map<String,String> metaAttributes)
      Sets the meta attributes for the workflow.
      Parameters:
      metaAttributes - the meta attributes to set
    • setName

      void setName(String name)
      Sets the name of the workflow.
      Parameters:
      name - the workflow name
    • setRegisters

      void setRegisters(List<Register> registers)
      Sets the attribute registers for the workflow.
      Parameters:
      registers - the list of registers to set
    • setTriggerFunction

      void setTriggerFunction(String id, Function triggerFunction)
      Sets a trigger function for the workflow.
      Parameters:
      id - the ID of the trigger function
      triggerFunction - the trigger function to set
    • addJoin

      void addJoin(Join join)
      Adds a join to the workflow.
      Parameters:
      join - the join to add
    • removeJoin

      void removeJoin(JoinId joinId)
      Removes a join from the workflow.
      Parameters:
      joinId - the ID of the join to remove
    • addFork

      void addFork(Fork fork)
      Adds a fork to the workflow.
      Parameters:
      fork - the fork to add
    • removeFork

      void removeFork(ForkId forkId)
      Removes a fork from the workflow.
      Parameters:
      forkId - the ID of the fork to remove
    • removeState

      void removeState(StateId stateId)
      Removes a state from the workflow.
      Parameters:
      stateId - the ID of the state to remove
    • addState

      void addState(State state)
      Adds a state to the workflow.
      Parameters:
      state - the state to add
    • updateState

      void updateState(State state)
      Updates an existing state in the workflow.
      Parameters:
      state - the updated state
    • updateFork

      void updateFork(Fork fork)
      Updates an existing fork in the workflow.
      Parameters:
      fork - the updated fork
    • updateJoin

      void updateJoin(Join join)
      Updates an existing join in the workflow.
      Parameters:
      join - the updated join
    • transitions

      Transitions transitions()
      Gets the transitions manager for this workflow.
      Returns:
      the transitions manager
    • copy

      WorkflowDefinition copy(WorkflowDefinitionId workflowDefinitionId, Properties properties, ExtensionProvider extensionProvider)
      Creates a copy of this workflow definition with the specified parameters.
      Parameters:
      workflowDefinitionId - the ID for the new workflow definition
      properties - the properties for the new workflow
      extensionProvider - the extension provider for the new workflow
      Returns:
      a new WorkflowDefinition instance