Durable Workflow PHP SDK — API Reference

Guides

CancellationHistory
in package

FinalYes

Observations identify a request. Only canonical history can authorize its delivery.

Table of Contents

Constants

DELIVERY_EVENT  : mixed = 'CooperativeCancellationDelivered'
REQUEST_EVENT  : mixed = 'CooperativeCancellationRequested'
FAILURE_EVENTS  : mixed = ['ActivityFailed', 'ActivityCancelled', 'Activi...
RESOLUTION_EVENTS  : mixed = ['ActivityCompleted', 'ActivityFailed', 'Activi...

Properties

$delivery  : CancellationDelivery|null
$deliveryIndex  : int|null
$request  : CancellationRequest|null
$requestIndex  : int
$failedBeforeRequest  : array<string|int, mixed>
$resolvedBeforeRequest  : array<string|int, mixed>
$selectedBeforeRequest  : array<string|int, mixed>

Methods

eligible()  : bool
fromEvents()  : self
__construct()  : mixed
invalid()  : NonDeterministicWorkflow
rangeEligible()  : bool
resolutionsBefore()  : array{array, array, array}

Constants

FAILURE_EVENTS

private mixed FAILURE_EVENTS = ['ActivityFailed', 'ActivityCancelled', 'ActivityTimedOut', 'ChildRunFailed', 'ChildRunCancelled', 'ChildRunTerminated']

RESOLUTION_EVENTS

private mixed RESOLUTION_EVENTS = ['ActivityCompleted', 'ActivityFailed', 'ActivityCancelled', 'ActivityTimedOut', 'TimerFired', 'TimerCancelled', 'ConditionWaitSatisfied', 'ConditionWaitTimedOut', 'SignalApplied', 'ChildRunCompleted', 'ChildRunFailed', 'ChildRunCancelled', 'ChildRunTerminated']

Properties

Methods

eligible()

public eligible(int $sequence[, int $span = 1 ]) : bool
Parameters
$sequence : int
$span : int = 1
Return values
bool

fromEvents()

public static fromEvents(array<int, array<string, mixed>> $events[, string $runId = '' ][, CancellationRequest|null $observation = null ]) : self
Parameters
$events : array<int, array<string, mixed>>
$runId : string = ''
$observation : CancellationRequest|null = null
Return values
self

__construct()

private __construct(CancellationRequest|null $request, CancellationDelivery|null $delivery, int $requestIndex, int|null $deliveryIndex, array<int, true> $resolvedBeforeRequest, array<int, true> $failedBeforeRequest, array<string, true> $selectedBeforeRequest) : mixed
Parameters
$request : CancellationRequest|null
$delivery : CancellationDelivery|null
$requestIndex : int
$deliveryIndex : int|null
$resolvedBeforeRequest : array<int, true>
$failedBeforeRequest : array<int, true>
$selectedBeforeRequest : array<string, true>

rangeEligible()

private rangeEligible(int $sequence, int $span) : bool
Parameters
$sequence : int
$span : int
Return values
bool

resolutionsBefore()

private static resolutionsBefore(array<int, array<string, mixed>> $events, int $requestIndex) : array{array, array, array}
Parameters
$events : array<int, array<string, mixed>>
$requestIndex : int
Return values
array{array, array, array}
On this page

Search results