What problem does it solve?
This Skill eliminates the complexity of implementing and debugging role-based approval flows in OrangeHRM, where tracking allowed state transitions, role-specific permissions, and post-transition side effects across leave, claims, recruitment, and other business processes requires deep, fragmented knowledge of the underlying state machine.
Core Features & Use Cases
- Generic State Machine Reference: Documents the
ohrm_workflow_state_machine table that powers all approval-style flows, including workflow type constants, per-flow action constants, and state string conventions.
- Service API Guidance: Covers
AccessFlowStateMachineService methods to query allowed actions, compute next states, retrieve actionable states for approval queues, and look up full workflow rows for notification routing.
- Implementation & Debugging Support: Includes standard transition flow patterns, two-layer authorization rules, migration seeding examples, and checklists for adding new transitions or resolving "user can't take action" issues. For example, use this Skill to diagnose why a Supervisor cannot approve a leave request by checking for missing workflow rows, data-group permission gaps, or state string mismatches.
Quick Start
Use the workflow skill to look up the allowed actions for a Supervisor role on a leave request in 'PENDING APPROVAL' state to determine which UI buttons to display for the user.