WorkflowClient
in package
implements
WorkflowClientInterface
uses
ClientContextTrait
Table of Contents
Interfaces
Constants
- ERROR_WORKFLOW_START_DUPLICATION = 'Cannot reuse a stub instance to start more than one workflow execution. ' . 'The stub points to already started execution. If you are trying to wait ' . 'for a workflow completion either change WorkflowIdReusePolicy from ' . 'AllowDuplicate or use WorkflowStub.getResult'
Properties
- $clientOptions : ClientOptions
- $converter : DataConverterInterface
- $interceptorPipeline : Pipeline<WorkflowClientCallsInterceptor, mixed>
- $reader : WorkflowReader
- $starter : WorkflowStarter|null
Methods
- __clone() : mixed
- __construct() : mixed
- countWorkflowExecutions() : CountWorkflowExecutions
- Get count of workflow executions using List Filter Query syntax.
- create() : static
- getServiceClient() : ServiceClientInterface
- getWorkflowHistory() : WorkflowExecutionHistory
- listWorkflowExecutions() : Paginator<string|int, WorkflowExecutionInfo>
- Get paginated list of workflow executions using List Filter Query syntax.
- newActivityCompletionClient() : ActivityCompletionClientInterface
- Creates a new `ActivityCompletionClient` that can be used to complete activities asynchronously.
- newRunningWorkflowStub() : T
- Returns workflow stub associated with running workflow.
- newUntypedRunningWorkflowStub() : WorkflowStubInterface
- Returns untyped workflow stub associated with running workflow.
- newUntypedWorkflowStub() : WorkflowStubInterface
- Creates workflow untyped client stub that can be used to start a single workflow execution. After workflow is started it can be also used to send signals or queries to it.
- newWorkflowStub() : T
- Creates workflow client stub that can be used to start a single workflow execution.
- signalWithStart() : WorkflowRunInterface
- Starts untyped and typed workflow stubs in async mode. Sends signal on start.
- start() : WorkflowRunInterface
- Starts workflow in async mode.
- startWithSignal() : WorkflowRunInterface
- updateWithStart() : UpdateHandle
- Starts untyped and typed workflow stubs in async mode. Sends Update on start.
- createReader() : ReaderInterface
- getStarter() : WorkflowStarter
Constants
ERROR_WORKFLOW_START_DUPLICATION
private
mixed
ERROR_WORKFLOW_START_DUPLICATION
= 'Cannot reuse a stub instance to start more than one workflow execution. ' . 'The stub points to already started execution. If you are trying to wait ' . 'for a workflow completion either change WorkflowIdReusePolicy from ' . 'AllowDuplicate or use WorkflowStub.getResult'
Properties
$clientOptions
private
ClientOptions
$clientOptions
$converter
private
DataConverterInterface
$converter
$interceptorPipeline
private
Pipeline<WorkflowClientCallsInterceptor, mixed>
$interceptorPipeline
$reader
private
WorkflowReader
$reader
$starter
private
WorkflowStarter|null
$starter
= null
Methods
__clone()
public
__clone() : mixed
__construct()
public
__construct(ServiceClientInterface $serviceClient[, ClientOptions|null $options = null ][, DataConverterInterface|null $converter = null ][, PipelineProvider|null $interceptorProvider = null ]) : mixed
Parameters
- $serviceClient : ServiceClientInterface
- $options : ClientOptions|null = null
- $converter : DataConverterInterface|null = null
- $interceptorProvider : PipelineProvider|null = null
countWorkflowExecutions()
Get count of workflow executions using List Filter Query syntax.
public
countWorkflowExecutions(string $query[, string|null $namespace = null ]) : CountWorkflowExecutions
Parameters
- $query : string
- $namespace : string|null = null
-
If null, the preconfigured namespace will be used.
Tags
Return values
CountWorkflowExecutionscreate()
public
static create(ServiceClientInterface $serviceClient[, ClientOptions|null $options = null ][, DataConverterInterface|null $converter = null ][, PipelineProvider|null $interceptorProvider = null ]) : static
Parameters
- $serviceClient : ServiceClientInterface
- $options : ClientOptions|null = null
- $converter : DataConverterInterface|null = null
- $interceptorProvider : PipelineProvider|null = null
Return values
staticgetServiceClient()
public
getServiceClient() : ServiceClientInterface
Tags
Return values
ServiceClientInterfacegetWorkflowHistory()
public
getWorkflowHistory(WorkflowExecution $execution[, string|null $namespace = null ][, bool $waitNewEvent = false ][, int $historyEventFilterType = HistoryEventFilterType::HISTORY_EVENT_FILTER_TYPE_ALL_EVENT ][, bool $skipArchival = false ][, int $pageSize = 0 ]) : WorkflowExecutionHistory
Parameters
- $execution : WorkflowExecution
- $namespace : string|null = null
-
If null, the preconfigured namespace will be used.
- $waitNewEvent : bool = false
-
If set to true, the RPC call will not resolve until there is a new event which matches, the $historyEventFilterType, or a timeout is hit. The RPC call will be resolved immediately if the workflow was already finished.
- $historyEventFilterType : int = HistoryEventFilterType::HISTORY_EVENT_FILTER_TYPE_ALL_EVENT
- $skipArchival : bool = false
- $pageSize : int = 0
-
Size of the pages to be requested. It affects internal queries only. Use it if you want to load limited number of events from the history.
Tags
Return values
WorkflowExecutionHistorylistWorkflowExecutions()
Get paginated list of workflow executions using List Filter Query syntax.
public
listWorkflowExecutions(string $query[, string|null $namespace = null ][, int $pageSize = 10 ]) : Paginator<string|int, WorkflowExecutionInfo>
Parameters
- $query : string
- $namespace : string|null = null
-
If null, the preconfigured namespace will be used.
- $pageSize : int = 10
-
Maximum number of workflow info per page.
Tags
Return values
Paginator<string|int, WorkflowExecutionInfo>newActivityCompletionClient()
Creates a new `ActivityCompletionClient` that can be used to complete activities asynchronously.
public
newActivityCompletionClient() : ActivityCompletionClientInterface
Tags
Return values
ActivityCompletionClientInterfacenewRunningWorkflowStub()
Returns workflow stub associated with running workflow.
public
newRunningWorkflowStub(string $class, string $workflowID[, string|null $runID = null ]) : T
Parameters
- $class : string
- $workflowID : string
- $runID : string|null = null
Tags
Return values
TnewUntypedRunningWorkflowStub()
Returns untyped workflow stub associated with running workflow.
public
newUntypedRunningWorkflowStub(string $workflowID[, string|null $runID = null ][, string|null $workflowType = null ]) : WorkflowStubInterface
Parameters
- $workflowID : string
- $runID : string|null = null
- $workflowType : string|null = null
Tags
Return values
WorkflowStubInterfacenewUntypedWorkflowStub()
Creates workflow untyped client stub that can be used to start a single workflow execution. After workflow is started it can be also used to send signals or queries to it.
public
newUntypedWorkflowStub(string $workflowType[, WorkflowOptions|null $options = null ]) : WorkflowStubInterface
Parameters
- $workflowType : string
- $options : WorkflowOptions|null = null
Tags
Return values
WorkflowStubInterfacenewWorkflowStub()
Creates workflow client stub that can be used to start a single workflow execution.
public
newWorkflowStub(string $class[, WorkflowOptions|null $options = null ]) : T
Parameters
- $class : string
- $options : WorkflowOptions|null = null
Tags
Return values
TsignalWithStart()
Starts untyped and typed workflow stubs in async mode. Sends signal on start.
public
signalWithStart(mixed $workflow, string $signal[, array<string|int, mixed> $signalArgs = [] ][, array<string|int, mixed> $startArgs = [] ]) : WorkflowRunInterface
Parameters
- $workflow : mixed
- $signal : string
- $signalArgs : array<string|int, mixed> = []
- $startArgs : array<string|int, mixed> = []
Tags
Return values
WorkflowRunInterfacestart()
Starts workflow in async mode.
public
start(mixed $workflow, mixed ...$args) : WorkflowRunInterface
Parameters
- $workflow : mixed
- $args : mixed
Tags
Return values
WorkflowRunInterfacestartWithSignal()
public
startWithSignal(mixed $workflow, string $signal[, array<string|int, mixed> $signalArgs = [] ][, array<string|int, mixed> $startArgs = [] ]) : WorkflowRunInterface
Parameters
- $workflow : mixed
- $signal : string
- $signalArgs : array<string|int, mixed> = []
- $startArgs : array<string|int, mixed> = []
Tags
Return values
WorkflowRunInterfaceupdateWithStart()
Starts untyped and typed workflow stubs in async mode. Sends Update on start.
public
updateWithStart(mixed $workflow, string|UpdateOptions $update[, array<string|int, mixed> $updateArgs = [] ][, array<string|int, mixed> $startArgs = [] ]) : UpdateHandle
Parameters
- $workflow : mixed
- $update : string|UpdateOptions
-
Name of the update handler or update options.
- $updateArgs : array<string|int, mixed> = []
- $startArgs : array<string|int, mixed> = []
Tags
Return values
UpdateHandlecreateReader()
private
createReader() : ReaderInterface
Return values
ReaderInterfacegetStarter()
private
getStarter() : WorkflowStarter