Durable Workflow PHP SDK

WorkflowContext
in package

FinalYes

Deterministic helpers available while a workflow generator is replayed.

Table of Contents

Properties

$runId  : string
$workflowId  : string
$cancellationRequested  : bool
$codec  : PayloadCodec
$history  : array<string|int, mixed>

Methods

__construct()  : mixed
activity()  : WorkflowCommand
childWorkflow()  : WorkflowCommand
continueAsNew()  : WorkflowCommand
isCancellationRequested()  : bool
sideEffect()  : WorkflowCommand
signals()  : array<int, array<int, mixed>>
sleep()  : WorkflowCommand
throwIfCancellationRequested()  : void
updates()  : array<int, array<int, mixed>>
upsertSearchAttributes()  : WorkflowCommand

Properties

$cancellationRequested read-only

private bool $cancellationRequested = false

Methods

__construct()

public __construct(string $workflowId, string $runId, array<int, array<string, mixed>> $history, PayloadCodec $codec[, bool $cancellationRequested = false ]) : mixed
Parameters
$workflowId : string
$runId : string
$history : array<int, array<string, mixed>>
$codec : PayloadCodec
$cancellationRequested : bool = false

activity()

public activity(string $activityType[, array<int, mixed> $arguments = [] ][, array<string, mixed> $options = [] ]) : WorkflowCommand
Parameters
$activityType : string
$arguments : array<int, mixed> = []
$options : array<string, mixed> = []
Return values
WorkflowCommand

childWorkflow()

public childWorkflow(string $workflowType[, array<int, mixed> $arguments = [] ][, array<string, mixed> $options = [] ]) : WorkflowCommand
Parameters
$workflowType : string
$arguments : array<int, mixed> = []
$options : array<string, mixed> = []
Return values
WorkflowCommand

continueAsNew()

public continueAsNew([array<int, mixed> $arguments = [] ][, string|null $workflowType = null ][, string|null $taskQueue = null ]) : WorkflowCommand
Parameters
$arguments : array<int, mixed> = []
$workflowType : string|null = null
$taskQueue : string|null = null
Return values
WorkflowCommand

isCancellationRequested()

public isCancellationRequested() : bool
Return values
bool

signals()

public signals(string $signalName) : array<int, array<int, mixed>>
Parameters
$signalName : string
Return values
array<int, array<int, mixed>>

throwIfCancellationRequested()

public throwIfCancellationRequested() : void

updates()

public updates(string $updateName) : array<int, array<int, mixed>>
Parameters
$updateName : string
Return values
array<int, array<int, mixed>>
On this page

Search results