|
|
Employee Onboarding Path Graph - Role-based Training Sequences
Author: Venkata Sudhakar
ShopMax India onboards new hires with a structured sequence of training modules tailored to their role. A new backend developer in Bangalore must complete security training before accessing production systems, and architecture training before touching microservices. Modeling these prerequisites as a directed graph in Neo4j lets the HR system compute the optimal training path for any role, track which modules each employee has completed, and flag missing prerequisites before access is granted.
Training modules are stored as Module nodes. A PREREQUISITE_OF relationship from module A to module B means A must be completed before B. To find the onboarding path, traverse the prerequisite graph using topological ordering - modules with no incoming edges come first. Employee completion is tracked as a HAS_COMPLETED relationship between the Employee node and each Module node, with a completedOn date property. Queries can then identify which modules remain for a given employee and what they are blocked on.
The example below creates a training graph for ShopMax India Engineering onboarding. It builds modules like Security Basics, Git Workflow, System Architecture, and Deployment Pipeline with their prerequisites, then computes the ordered training path and shows which modules a new hire has remaining.
It gives the following output,
Onboarding status for Suresh Pillai:
[Blocked] API Standards (3h) | Prereqs: Security Basics
[Blocked] Deployment Pipeline (6h) | Prereqs: System Architecture, API Standards, Code Review Process
[Blocked] System Architecture (8h) | Prereqs: Security Basics
[Ready] Code Review Process (2h) | Prereqs: Git Workflow
In production, add a role property to Module nodes and filter by role before computing the path, so backend developers and logistics staff see different onboarding sequences. Store completedOn as a Neo4j Date type rather than a string for range queries like 'modules completed in the last 30 days'. Use apoc.path.subgraphAll from the APOC library to extract the full prerequisite subgraph for a module in one call. For compliance-sensitive modules like security training, add an expiresAfterDays property and flag employees whose completion has lapsed.
|
|