Undocumented
| Class | |
Returned by functions using the dynamic_config decorator, see it for more. |
| Function | defn |
Decorator for workflow classes. |
| Function | dynamic |
Decorator to allow configuring a dynamic workflow's behavior. |
| Function | init |
Decorator for the workflow init method. |
| Function | run |
Decorator for the workflow run method. |
ClassType) -> ClassType:str | None = None, sandboxed: bool = True, failure_exception_types: Sequence[ type[ BaseException]] = [], versioning_behavior: temporalio.common.VersioningBehavior = temporalio.common.VersioningBehavior.UNSPECIFIED) -> Callable[ [ ClassType], ClassType]:Decorator for workflow classes.
This must be set on any registered workflow class (it is ignored if on a base class).
| Parameters | |
cls:ClassType | None | The class to decorate. |
name:str | None | Name to use for the workflow. Defaults to class __name__. This cannot be set if dynamic is set. |
sandboxed:bool | Whether the workflow should run in a sandbox. Default is true. |
dynamic:bool | If true, this activity will be dynamic. Dynamic workflows have to accept a single 'Sequence[RawValue]' parameter. This cannot be set to true if name is present. |
failureSequence[ | The types of exceptions that, if a workflow-thrown exception extends, will cause the workflow/update to fail instead of suspending the workflow via task failure. These are applied in addition to ones set on the worker constructor. If Exception is set, it effectively will fail a workflow/update in all user exception cases. WARNING: This setting is experimental. |
versioningtemporalio.common.VersioningBehavior | Specifies the versioning behavior to use for this workflow. |
| Returns | |
Callable[ | Undocumented |
MethodSyncNoParam[ SelfType, DynamicWorkflowConfig]) -> MethodSyncNoParam[ SelfType, DynamicWorkflowConfig]:
(source)
¶
Decorator to allow configuring a dynamic workflow's behavior.
Because dynamic workflows may conceptually represent more than one workflow type, it may be
desirable to have different settings for fields that would normally be passed to
defn, but vary based on the workflow type name or other information available in
the workflow's context. This function will be called after the workflow's init,
if it has one, but before the workflow's run method.
The method must only take self as a parameter, and any values set in the class it returns will
override those provided to defn.
Cannot be specified on non-dynamic workflows.
| Parameters | |
fn:MethodSyncNoParam[ | The function to decorate. |
| Returns | |
MethodSyncNoParam[ | Undocumented |
Decorator for the workflow init method.
This may be used on the __init__ method of the workflow class to specify that it accepts the same workflow input arguments as the @workflow.run method. If used, the parameters of your __init__ and @workflow.run methods must be identical.
| Parameters | |
initCallableType | The __init__ method to decorate. |
| Returns | |
CallableType | Undocumented |
Decorator for the workflow run method.
This must be used on one and only one async method defined on the same class as @workflow.defn. This can be defined on a base class method but must then be explicitly overridden and defined on the workflow class.
Run methods can only have positional parameters. Best practice is to only take a single object/dataclass argument that can accept more fields later if needed.
| Parameters | |
fn:CallableAsyncType | The function to decorate. |
| Returns | |
CallableAsyncType | Undocumented |