Interface WorkflowConverter<T>

Type Parameters:
T - the type of external representation to convert to/from

public interface WorkflowConverter<T>
Interface for converting between Workflow objects and other representations. WorkflowConverter provides a generic way to transform workflow definitions between different formats, such as converting from internal Workflow objects to external representations (like YAML, JSON, XML) or vice versa.
Since:
1.0
See Also:
  • Method Details

    • init

      void init(ExtensionProvider extensionProvider, Properties properties)
      Initializes the converter with the necessary dependencies and configuration.
      Parameters:
      extensionProvider - the extension provider for resolving extensions
      properties - the configuration properties for the converter
    • convertFrom

      T convertFrom(WorkflowDefinition workflowDefinition)
      Converts a Workflow object to the external representation type.
      Parameters:
      workflowDefinition - the workflow to convert
      Returns:
      the external representation of the workflow
    • convertTo

      WorkflowDefinition convertTo(WorkflowDefinitionId workflowDefinitionId, T workflow) throws WorkflowException
      Converts an external representation to a Workflow object.
      Parameters:
      workflowDefinitionId - the ID to assign to the workflow
      workflow - the external representation to convert
      Returns:
      the converted Workflow object
      Throws:
      WorkflowException - if there's an error during conversion
    • convertTo

      default WorkflowDefinition convertTo(T workflow) throws WorkflowException
      Converts an external representation to a Workflow object with a default ID.
      Parameters:
      workflow - the external representation to convert
      Returns:
      the converted Workflow object
      Throws:
      WorkflowException - if there's an error during conversion