Documentation

WorkflowRunInterface

Represents a running workflow execution. Can be used to wait for the completion result or error.

Table of Contents

Methods

describe()  : WorkflowExecutionDescription
getExecution()  : WorkflowExecution
Returns attached workflow execution.
getResult()  : mixed
Returns workflow result potentially waiting for workflow to complete.

Methods

describe()

public describe() : WorkflowExecutionDescription
Return values
WorkflowExecutionDescription

getResult()

Returns workflow result potentially waiting for workflow to complete.

public getResult([string|ReflectionClass|ReflectionType|Type|null $type = null ][, int|null $timeout = null ]) : mixed

Behind the scene this call performs long poll on Temporal service waiting for workflow completion notification.

// Map to array
$result = $run->getResult(Type::TYPE_ARRAY);

// Map to list of custom class
$result = $run->getResult(Type::arrayOf(Message::class));
Parameters
$type : string|ReflectionClass|ReflectionType|Type|null = null
$timeout : int|null = null

Timeout in seconds. Infinite by the default.

Tags
throws
WorkflowFailedException
see
DateInterval

        
On this page

Search results