Interface WorkflowAttributeResolver
public interface WorkflowAttributeResolver
Interface for implementing custom workflow attribute resolvers. WorkflowAttributeResolver
provides the mechanism for resolving attribute references and expressions in workflow
definitions, allowing for dynamic attribute resolution and transformation.
Attribute resolvers are used to resolve references to attributes that may not be directly available in the current attribute set. They can resolve expressions, perform calculations, transform data, or retrieve values from external sources.
Custom attribute resolvers are registered with the workflow engine through the ExtensionProvider and are used by the workflow engine to resolve attribute references during workflow execution.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionresolve(WorkflowExecutionContext context) Resolves all attributes and returns a new MutableAttributes instance with resolved values.resolve(WorkflowExecutionContext context, String input) Resolves a single attribute reference or expression and returns the resolved value.
-
Method Details
-
resolve
Resolves a single attribute reference or expression and returns the resolved value.- Parameters:
context- the execution contextinput- the input string to resolve (it may be a variable reference or expression)- Returns:
- an Optional containing the resolved value if found, empty otherwise
- Throws:
WorkflowException- if there's an error resolving the attribute
-
resolve
Resolves all attributes and returns a new MutableAttributes instance with resolved values. This method can add computed attributes, transform existing attributes, or perform any other attribute resolution logic.- Parameters:
context- the execution context- Returns:
- a new MutableAttributes instance with resolved attributes
- Throws:
WorkflowException- if there's an error resolving the attributes
-