WorkflowApproval
extends BaseEntity
in package
WorkflowApproval Entity
Approval gate within a running workflow instance. Tracks required/received approval counts, deadline, and escalation configuration.
Table of Contents
Constants
- APPROVER_TYPE_DYNAMIC : mixed = 'dynamic'
- APPROVER_TYPE_MEMBER : mixed = 'member'
- APPROVER_TYPE_PERMISSION : mixed = 'permission'
- APPROVER_TYPE_POLICY : mixed = 'policy'
- APPROVER_TYPE_ROLE : mixed = 'role'
- STATUS_APPROVED : mixed = 'approved'
- STATUS_CANCELLED : mixed = 'cancelled'
- STATUS_EXPIRED : mixed = 'expired'
- STATUS_PENDING : mixed = 'pending'
- STATUS_REJECTED : mixed = 'rejected'
Properties
- $allow_parallel : bool
- $approval_token : string|null
- $approved_count : int
- $approver_config : array<string|int, mixed>|null
- $approver_lookup_branch_id : int|null
- $approver_lookup_branch_mode : string|null
- $approver_lookup_branch_type : string|null
- $approver_lookup_context_id : int|null
- $approver_lookup_id : int|null
- $approver_lookup_name : string|null
- $approver_lookup_type : string|null
- $approver_type : string
- $branch_id : int|null
- $created : DateTime|null
- $current_approver_id : int|null
- $deadline : DateTime|null
- $escalation_config : array<string|int, mixed>|null
- $execution_log_id : int
- $id : int
- $modified : DateTime|null
- $node_id : string
- $rejected_count : int
- $request_title : string|null
- $requester_member : Member|null
- $requester_member_id : int|null
- $required_count : int
- $status : string
- $version : int
- $workflow_approval_responses : array<string|int, WorkflowApprovalResponse>
- $workflow_approval_triage_states : array<string|int, WorkflowApprovalTriageState>
- $workflow_execution_log : WorkflowExecutionLog
- $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.
- hasReachedThreshold() : bool
- Check if the approval threshold has been reached.
- isPending() : bool
- Check if this approval gate is still pending.
- isResolved() : bool
- Check if this approval gate has been resolved (approved, rejected, expired, or cancelled).
Constants
APPROVER_TYPE_DYNAMIC
public
mixed
APPROVER_TYPE_DYNAMIC
= 'dynamic'
APPROVER_TYPE_MEMBER
public
mixed
APPROVER_TYPE_MEMBER
= 'member'
APPROVER_TYPE_PERMISSION
public
mixed
APPROVER_TYPE_PERMISSION
= 'permission'
APPROVER_TYPE_POLICY
public
mixed
APPROVER_TYPE_POLICY
= 'policy'
APPROVER_TYPE_ROLE
public
mixed
APPROVER_TYPE_ROLE
= 'role'
STATUS_APPROVED
public
mixed
STATUS_APPROVED
= 'approved'
STATUS_CANCELLED
public
mixed
STATUS_CANCELLED
= 'cancelled'
STATUS_EXPIRED
public
mixed
STATUS_EXPIRED
= 'expired'
STATUS_PENDING
public
mixed
STATUS_PENDING
= 'pending'
STATUS_REJECTED
public
mixed
STATUS_REJECTED
= 'rejected'
Properties
$allow_parallel
public
bool
$allow_parallel
$approval_token
public
string|null
$approval_token
$approved_count
public
int
$approved_count
$approver_config
public
array<string|int, mixed>|null
$approver_config
$approver_lookup_branch_id
public
int|null
$approver_lookup_branch_id
$approver_lookup_branch_mode
public
string|null
$approver_lookup_branch_mode
$approver_lookup_branch_type
public
string|null
$approver_lookup_branch_type
$approver_lookup_context_id
public
int|null
$approver_lookup_context_id
$approver_lookup_id
public
int|null
$approver_lookup_id
$approver_lookup_name
public
string|null
$approver_lookup_name
$approver_lookup_type
public
string|null
$approver_lookup_type
$approver_type
public
string
$approver_type
$branch_id
public
int|null
$branch_id
Associated branch ID (when applicable)
$created
public
DateTime|null
$created
$current_approver_id
public
int|null
$current_approver_id
$deadline
public
DateTime|null
$deadline
$escalation_config
public
array<string|int, mixed>|null
$escalation_config
$execution_log_id
public
int
$execution_log_id
$id
public
int
$id
$modified
public
DateTime|null
$modified
$node_id
public
string
$node_id
$rejected_count
public
int
$rejected_count
$request_title
public
string|null
$request_title
$requester_member
public
Member|null
$requester_member
$requester_member_id
public
int|null
$requester_member_id
$required_count
public
int
$required_count
$status
public
string
$status
$version
public
int
$version
$workflow_approval_responses
public
array<string|int, WorkflowApprovalResponse>
$workflow_approval_responses
$workflow_approval_triage_states
public
array<string|int, WorkflowApprovalTriageState>
$workflow_approval_triage_states
$workflow_execution_log
public
WorkflowExecutionLog
$workflow_execution_log
$workflow_instance
public
WorkflowInstance
$workflow_instance
$workflow_instance_id
public
int
$workflow_instance_id
$_accessible
Fields that can be mass assigned.
protected
array<string, bool>
$_accessible
= ['workflow_instance_id' => true, 'node_id' => true, 'execution_log_id' => true, 'approver_type' => true, 'approver_config' => true, 'current_approver_id' => true, 'approver_lookup_type' => true, 'approver_lookup_id' => true, 'approver_lookup_name' => true, 'approver_lookup_branch_id' => true, 'approver_lookup_branch_mode' => true, 'approver_lookup_branch_type' => true, 'approver_lookup_context_id' => true, 'request_title' => true, 'requester_member_id' => true, 'required_count' => true, 'approved_count' => true, 'rejected_count' => true, 'status' => true, 'allow_parallel' => true, 'deadline' => true, 'escalation_config' => true, 'version' => true, 'approval_token' => true, 'workflow_approval_triage_states' => 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
hasReachedThreshold()
Check if the approval threshold has been reached.
public
hasReachedThreshold() : bool
Return values
boolisPending()
Check if this approval gate is still pending.
public
isPending() : bool
Return values
boolisResolved()
Check if this approval gate has been resolved (approved, rejected, expired, or cancelled).
public
isResolved() : bool