WorkflowVersion
extends BaseEntity
in package
WorkflowVersion Entity
Immutable versioned snapshot of a workflow design. Each version contains the full workflow graph and optional visual canvas layout.
Table of Contents
Constants
- STATUS_ARCHIVED : mixed = 'archived'
- STATUS_DRAFT : mixed = 'draft'
- STATUS_PUBLISHED : mixed = 'published'
Properties
- $branch_id : int|null
- $canvas_layout : array<string|int, mixed>|null
- $change_notes : string|null
- $created : DateTime|null
- $created_by : int|null
- $definition : array<string|int, mixed>
- $id : int
- $modified : DateTime|null
- $published_at : DateTime|null
- $published_by : int|null
- $status : string
- $version_number : int
- $workflow_definition : WorkflowDefinition
- $workflow_definition_id : int
- $_accessible : array<string, bool>
- Fields that can be mass assigned.
Methods
- getBranchId() : int|null
- Get the branch ID for authorization checks.
- isDraft() : bool
- Check if this version is a draft.
- isPublished() : bool
- Check if this version is published.
Constants
STATUS_ARCHIVED
public
mixed
STATUS_ARCHIVED
= 'archived'
STATUS_DRAFT
public
mixed
STATUS_DRAFT
= 'draft'
STATUS_PUBLISHED
public
mixed
STATUS_PUBLISHED
= 'published'
Properties
$branch_id
public
int|null
$branch_id
Associated branch ID (when applicable)
$canvas_layout
public
array<string|int, mixed>|null
$canvas_layout
$change_notes
public
string|null
$change_notes
$created
public
DateTime|null
$created
$created_by
public
int|null
$created_by
$definition
public
array<string|int, mixed>
$definition
$id
public
int
$id
$modified
public
DateTime|null
$modified
$published_at
public
DateTime|null
$published_at
$published_by
public
int|null
$published_by
$status
public
string
$status
$version_number
public
int
$version_number
$workflow_definition
public
WorkflowDefinition
$workflow_definition
$workflow_definition_id
public
int
$workflow_definition_id
$_accessible
Fields that can be mass assigned.
protected
array<string, bool>
$_accessible
= ['workflow_definition_id' => true, 'version_number' => true, 'definition' => true, 'canvas_layout' => true, 'status' => true, 'published_at' => true, 'published_by' => true, 'change_notes' => true, 'created_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
isDraft()
Check if this version is a draft.
public
isDraft() : bool
Return values
boolisPublished()
Check if this version is published.
public
isPublished() : bool