KMP PHP API Reference

WorkflowTask extends BaseEntity
in package

WorkflowTask Entity

Represents a human task within a workflow instance. Created when a humanTask node executes, pausing the workflow until a user submits the configured form.

Table of Contents

Constants

STATUS_CANCELLED  : mixed = 'cancelled'
STATUS_COMPLETED  : mixed = 'completed'
STATUS_EXPIRED  : mixed = 'expired'
STATUS_PENDING  : mixed = 'pending'

Properties

$assigned_by_role  : string|null
$assigned_member  : Member|null
$assigned_to  : int|null
$branch_id  : int|null
$completed_at  : DateTime|null
$completed_by  : int|null
$completing_member  : Member|null
$created  : DateTime|null
$due_date  : DateTime|null
$form_data  : array<string|int, mixed>|null
$form_definition  : array<string|int, mixed>|null
$id  : int
$modified  : DateTime|null
$node_id  : string
$status  : string
$task_title  : string|null
$workflow_instance  : WorkflowInstance
$workflow_instance_id  : int
$_accessible  : array<string, bool>
Fields that can be mass assigned.

Methods

getBranchId()  : int|null
Get the branch ID for authorization checks.
isCompleted()  : bool
Check if this task has been completed.
isPending()  : bool
Check if this task is still pending.
isResolved()  : bool
Check if the task has reached a terminal state.

Constants

STATUS_CANCELLED

public mixed STATUS_CANCELLED = 'cancelled'

STATUS_COMPLETED

public mixed STATUS_COMPLETED = 'completed'

Properties

$branch_id

public int|null $branch_id

Associated branch ID (when applicable)

$form_data

public array<string|int, mixed>|null $form_data

$form_definition

public array<string|int, mixed>|null $form_definition

$_accessible

Fields that can be mass assigned.

protected array<string, bool> $_accessible = ['workflow_instance_id' => true, 'node_id' => true, 'assigned_to' => true, 'assigned_by_role' => true, 'task_title' => true, 'form_definition' => true, 'form_data' => true, 'status' => true, 'due_date' => true, 'completed_at' => true, 'completed_by' => true]

Methods

getBranchId()

Get the branch ID for authorization checks.

public getBranchId() : int|null

Child classes should override for complex branch relationships.

Return values
int|null

The branch ID, or null if no association

isCompleted()

Check if this task has been completed.

public isCompleted() : bool
Return values
bool

isPending()

Check if this task is still pending.

public isPending() : bool
Return values
bool

isResolved()

Check if the task has reached a terminal state.

public isResolved() : bool
Return values
bool
On this page

Search results