Workflow Engine
Configurable approval workflow with steps, assignments, and history.
ahgWorkflowPlugin
3
ahg_workflow0
ahg_workflow_history0
ahg_workflow_notification8
ahg_workflow_queue3
ahg_workflow_sla_policy4
ahg_workflow_step0
ahg_workflow_task0
workflow_history0
workflow_instanceEntity Relationship Diagram
Open Full SizeForeign Key Relationships
| Constraint | Table | Column | References | Referenced Column | |
|---|---|---|---|---|---|
fk_step_workflow |
ahg_workflow_step |
workflow_id | ahg_workflow |
id | |
fk_task_workflow |
ahg_workflow_task |
workflow_id | ahg_workflow |
id | |
fk_task_step |
ahg_workflow_task |
workflow_step_id | ahg_workflow_step |
id | |
workflow_history_workflow_instance_id_foreign |
workflow_history |
workflow_instance_id | workflow_instance |
id |
ahg_workflow
16 columns
3 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
int | NOT NULL | - | auto_increment | |
name |
varchar(255) | NOT NULL | - | |||
description |
text | NULL | - | |||
| FK | scope_type |
varchar(50) | NOT NULL |
global
|
||
scope_id |
int | NULL | - | repository_id or information_object_id depending on scope_type | ||
| FK | trigger_event |
varchar(50) | NOT NULL |
submit
|
||
applies_to |
varchar(50) | NOT NULL |
information_object
|
|||
| FK | is_active |
tinyint(1) | NOT NULL |
1
|
||
| FK | is_default |
tinyint(1) | NOT NULL |
0
|
Default workflow for scope | |
require_all_steps |
tinyint(1) | NOT NULL |
1
|
Must complete all steps in order | ||
allow_parallel |
tinyint(1) | NOT NULL |
0
|
Allow parallel step execution | ||
auto_archive_days |
int | NULL | - | Auto-archive completed tasks after N days | ||
notification_enabled |
tinyint(1) | NOT NULL |
1
|
|||
created_by |
int | NULL | - | |||
created_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED | ||
updated_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
ahg_workflow_history
16 columns
0 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
int | NOT NULL | - | auto_increment | |
| FK | task_id |
int | NULL | - | Link to task (null if task deleted) | |
| FK | workflow_id |
int | NOT NULL | - | ||
workflow_step_id |
int | NULL | - | |||
| FK | object_id |
int | NOT NULL | - | ||
object_type |
varchar(50) | NOT NULL |
information_object
|
|||
| FK | action |
varchar(50) | NOT NULL | - | ||
from_status |
varchar(50) | NULL | - | |||
to_status |
varchar(50) | NULL | - | |||
| FK | performed_by |
int | NOT NULL | - | ||
| FK | performed_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED | |
comment |
text | NULL | - | |||
metadata |
text | NULL | - | JSON additional data | ||
ip_address |
varchar(45) | NULL | - | |||
user_agent |
varchar(500) | NULL | - | |||
| FK | correlation_id |
varchar(36) | NULL | - |
ahg_workflow_notification
11 columns
0 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
int | NOT NULL | - | auto_increment | |
| FK | task_id |
int | NULL | - | ||
| FK | user_id |
int | NOT NULL | - | ||
| FK | notification_type |
varchar(50) | NOT NULL | - | ||
subject |
varchar(500) | NOT NULL | - | |||
body |
text | NOT NULL | - | |||
| FK | status |
varchar(50) | NOT NULL |
pending
|
||
sent_at |
datetime | NULL | - | |||
error_message |
text | NULL | - | |||
retry_count |
int | NOT NULL |
0
|
|||
created_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED |
ahg_workflow_queue
10 columns
8 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
int unsigned | NOT NULL | - | auto_increment | |
name |
varchar(100) | NOT NULL | - | |||
| UQ | slug |
varchar(100) | NOT NULL | - | ||
description |
text | NULL | - | |||
sort_order |
int | NULL |
0
|
|||
is_active |
tinyint(1) | NULL |
1
|
|||
sla_days |
int | NULL | - | |||
icon |
varchar(50) | NULL |
fa-inbox
|
|||
color |
varchar(7) | NULL |
#6c757d
|
|||
created_at |
timestamp | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED |
ahg_workflow_sla_policy
11 columns
3 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
int unsigned | NOT NULL | - | auto_increment | |
name |
varchar(100) | NOT NULL | - | |||
| FK | queue_id |
int unsigned | NULL | - | ||
| FK | workflow_id |
int | NULL | - | ||
warning_days |
int | NULL |
3
|
|||
due_days |
int | NULL |
5
|
|||
escalation_days |
int | NULL |
7
|
|||
escalation_user_id |
int | NULL | - | |||
escalation_action |
varchar(50) | NULL |
notify_lead
|
|||
| FK | is_active |
tinyint(1) | NULL |
1
|
||
created_at |
timestamp | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED |
ahg_workflow_step
22 columns
4 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
int | NOT NULL | - | auto_increment | |
| FK | workflow_id |
int | NOT NULL | - | ||
name |
varchar(255) | NOT NULL | - | |||
description |
text | NULL | - | |||
step_order |
int | NOT NULL |
1
|
|||
step_type |
varchar(50) | NOT NULL |
review
|
|||
action_required |
varchar(50) | NOT NULL |
approve_reject
|
|||
| FK | required_role_id |
int | NULL | - | AtoM role_id or null for any authenticated user | |
| FK | required_clearance_level |
int | NULL | - | Security clearance level from ahgSecurityClearancePlugin | |
allowed_group_ids |
text | NULL | - | JSON array of allowed group IDs | ||
allowed_user_ids |
text | NULL | - | JSON array of specific user IDs | ||
pool_enabled |
tinyint(1) | NOT NULL |
1
|
Allow task claiming from pool | ||
auto_assign_user_id |
int | NULL | - | Auto-assign to specific user | ||
escalation_days |
int | NULL | - | Days before escalation | ||
escalation_user_id |
int | NULL | - | User to escalate to | ||
notification_template |
varchar(100) | NULL |
default
|
Email template name | ||
instructions |
text | NULL | - | Instructions shown to reviewer | ||
checklist |
text | NULL | - | JSON array of checklist items | ||
is_optional |
tinyint(1) | NOT NULL |
0
|
|||
is_active |
tinyint(1) | NOT NULL |
1
|
|||
created_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED | ||
updated_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
ahg_workflow_task
23 columns
0 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
int | NOT NULL | - | auto_increment | |
| FK | workflow_id |
int | NOT NULL | - | ||
| FK | workflow_step_id |
int | NOT NULL | - | ||
| FK | object_id |
int | NOT NULL | - | information_object.id or other entity | |
object_type |
varchar(50) | NOT NULL |
information_object
|
|||
| FK | status |
varchar(50) | NOT NULL |
pending
|
||
| FK | priority |
varchar(50) | NOT NULL |
normal
|
||
| FK | submitted_by |
int | NOT NULL | - | User who submitted item to workflow | |
| FK | assigned_to |
int | NULL | - | User who claimed/was assigned the task | |
claimed_at |
datetime | NULL | - | |||
| FK | due_date |
date | NULL | - | ||
decision |
varchar(50) | NULL |
pending
|
|||
decision_comment |
text | NULL | - | |||
decision_at |
datetime | NULL | - | |||
decision_by |
int | NULL | - | |||
checklist_completed |
text | NULL | - | JSON object of completed checklist items | ||
metadata |
text | NULL | - | Additional JSON metadata | ||
previous_task_id |
int | NULL | - | Link to previous step task | ||
retry_count |
int | NOT NULL |
0
|
|||
escalated_at |
datetime | NULL | - | |||
created_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED | ||
updated_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED on update CURRENT_TIMESTAMP | ||
| FK | queue_id |
int unsigned | NULL | - |
workflow_history
8 columns
0 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
bigint unsigned | NOT NULL | - | auto_increment | |
| FK | workflow_instance_id |
bigint unsigned | NOT NULL | - | ||
from_state |
varchar(50) | NULL | - | |||
to_state |
varchar(50) | NOT NULL | - | |||
transition |
varchar(50) | NOT NULL | - | |||
user_id |
int unsigned | NOT NULL | - | |||
comment |
text | NULL | - | |||
| FK | created_at |
timestamp | NOT NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED |
workflow_instance
11 columns
0 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
bigint unsigned | NOT NULL | - | auto_increment | |
| FK | workflow_id |
varchar(50) | NOT NULL | - | ||
| FK | entity_type |
varchar(50) | NOT NULL | - | ||
entity_id |
int unsigned | NOT NULL | - | |||
| FK | current_state |
varchar(50) | NOT NULL | - | ||
| FK | is_complete |
tinyint(1) | NOT NULL |
0
|
||
metadata |
json | NULL | - | |||
created_by |
int unsigned | NOT NULL | - | |||
created_at |
timestamp | NOT NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED | ||
updated_at |
timestamp | NOT NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED on update CURRENT_TIMESTAMP | ||
completed_at |
timestamp | NULL | - |
Notes
Log in to add notes.
Legend
PK Primary Key
FK Foreign Key / Index
UQ Unique Constraint
Table structures are read live from the database. Row counts reflect current data.