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 Summary
Modifier and TypeMethodDescriptionconvertFrom(WorkflowDefinition workflowDefinition) Converts a Workflow object to the external representation type.convertTo(WorkflowDefinitionId workflowDefinitionId, T workflow) Converts an external representation to a Workflow object.default WorkflowDefinitionConverts an external representation to a Workflow object with a default ID.voidinit(ExtensionProvider extensionProvider, Properties properties) Initializes the converter with the necessary dependencies and configuration.
-
Method Details
-
init
Initializes the converter with the necessary dependencies and configuration.- Parameters:
extensionProvider- the extension provider for resolving extensionsproperties- the configuration properties for the converter
-
convertFrom
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 workflowworkflow- the external representation to convert- Returns:
- the converted Workflow object
- Throws:
WorkflowException- if there's an error during conversion
-
convertTo
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
-