LocalActivityInterface
extends ActivityInterface
in package
Indicates that an interface is a local activity interface.
Only interfaces annotated with this annotation can be used as parameters to Workflow::activity() and WorkflowContextInterface::newActivityStub() methods.
Each method of the interface annotated with LocalActivityInterface including inherited from interfaces is a separate activity. By default, the name of an activity type is its method name with the first letter capitalized. Use LocalActivityInterface::$prefix or ActivityMethod::$name to make sure that activity type names are distinct.
Tags
Table of Contents
Properties
- $prefix : string
- Prefix to prepend to method names to generate activity types. Default is empty string which means that method names are used as activity types.
Methods
- __construct() : mixed
Attributes
#[Attribute]
#[Attribute]
#[Attribute]
#[NamedArgumentConstructor]
#[NamedArgumentConstructor]
#[NamedArgumentConstructor]
Properties
$prefix
Prefix to prepend to method names to generate activity types. Default is empty string which means that method names are used as activity types.
public
string
$prefix
= ''
Note that this value is ignored if a name of an activity is specified explicitly through ActivityMethod::$name.
Be careful about names that contain special characters. These names can be used as metric tags. And systems like prometheus ignore metrics which have tags with unsupported characters.
Methods
__construct()
public
__construct([string $prefix = '' ]) : mixed
Parameters
- $prefix : string = ''