KMP PHP API Reference

WorkflowResumeTask extends Task
in package
uses ServicesTrait

Asynchronously resumes a waiting workflow instance at a specific node.

Created via: QueuedJobs->createJob('WorkflowResume', $data)

Table of Contents

Properties

$costs  : int
Activate this if you want cost management per server to avoid server overloading.
$QueuedJobs  : QueuedJobsTable
$queueModelClass  : string
$rate  : int
Rate limiting per worker in seconds.
$retries  : int|null
Number of retries before giving up.
$timeout  : int|null
Timeout for run, after which the Task is reassigned to a new worker.
$unique  : bool
Set to true if you want to make sure this specific task is never run in parallel, neither on the same server, nor any other server. Any worker running will not fetch this task, if any job here is already in progress.
$container  : ContainerInterface|null
$io  : Io
$logger  : LoggerInterface|null

Methods

__construct()  : mixed
run()  : void
Resume a waiting workflow instance.
setContainer()  : void
taskName()  : string
getService()  : T

Properties

$costs

Activate this if you want cost management per server to avoid server overloading.

public int $costs = 0

Expensive tasks (CPU, memory, ...) can have 1...100 points here, with higher points preventing a similar cost intensive task to be fetched on the same server in parallel. Smaller ones can easily still be processed on the same server if some an expensive one is running.

$queueModelClass

public string $queueModelClass = 'Queue.QueuedJobs'

$rate

Rate limiting per worker in seconds.

public int $rate = 0

Activate this if you want to stretch the processing of a specific task per worker.

$timeout

Timeout for run, after which the Task is reassigned to a new worker.

public int|null $timeout = 120

$unique

Set to true if you want to make sure this specific task is never run in parallel, neither on the same server, nor any other server. Any worker running will not fetch this task, if any job here is already in progress.

public bool $unique = false

$container

protected ContainerInterface|null $container = null

$logger

protected LoggerInterface|null $logger = null

Methods

__construct()

public __construct([Io|null $io = null ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
$io : Io|null = null

IO

$logger : LoggerInterface|null = null

run()

Resume a waiting workflow instance.

public run(array<string, mixed> $data, int $jobId) : void
Parameters
$data : array<string, mixed>

Must contain 'instanceId' and 'nodeId'; optionally 'outputPort' and 'additionalData'.

$jobId : int

The id of the QueuedJob entity

setContainer()

public setContainer(ContainerInterface $container) : void
Parameters
$container : ContainerInterface

taskName()

public static taskName() : string
Tags
throws
InvalidArgumentException
Return values
string

getService()

protected getService(T> $id) : T
Parameters
$id : T>

Classname or identifier of the service you want to retrieve

Tags
template
throws
ContainerExceptionInterface
NotFoundExceptionInterface
Return values
T
On this page

Search results