Interface DynamicWorkflow
public interface DynamicWorkflow
Use DynamicWorkflow to implement any number of workflow types dynamically. When a workflow
implementation type that extends DynamicWorkflow is registered, it is used to implement any
workflow type that is not implicitly registered with the
Worker. Only
one type that implements DynamicWorkflow per worker is allowed.
The main use case for DynamicWorkflow is an implementation of custom Domain Specific Languages (DSLs). A single implementation can implement a workflow type whose definition is dynamically loaded from some external source.
Use Workflow.getInfo() to query information about the workflow type that should be
implemented dynamically.
Use Workflow.registerListener(Object) to register signal and query listeners. Consider
using DynamicSignalHandler and DynamicQueryHandler to implement handlers that can
support any signal or query type dynamically.
All the determinism rules still apply to workflows that implement this interface.
- See Also:
-
Method Summary
-
Method Details
-
execute
-
getVersioningBehavior
- Returns:
- The versioning behavior of this dynamic workflow. See
WorkerOptions.Builder.setDeploymentOptions(WorkerDeploymentOptions)for more on worker versioning. This method must be overridden ifWorkerDeploymentOptions.Builder.setUseVersioning(boolean)is true. and no default behavior is specified.
-