# msn31124/servicenow-incident-handoff-review architecture

> Architecture diagram of the GitHub repository msn31124/servicenow-incident-handoff-review, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/msn31124/servicenow-incident-handoff-review
- Repository: https://github.com/msn31124/servicenow-incident-handoff-review

## Overview

Incident Handoff Review is a scoped ServiceNow application for detecting repeated incident handoffs and managing structured review cycles. Incident updates trigger threshold-based review creation or counter updates; reviewers then start and complete reviews, while Flow Designer handles assignment, notifications, cancellation, and reminders. Field controls and access rules govern review records, and a dashboard supports operational oversight. The scripts show the business rule and form actions; other subsystem behavior and links are based on the README, not inspected implementation.

Main entry points: [`flow-designer-automation`](https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/flow-designer-automation) (Review automation), [`business-rule/create-incident-handoff-review.js`](https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/business-rule/create-incident-handoff-review.js) (Handoff detection), [`ui-actions/start-review.js`](https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/ui-actions/start-review.js) (Start Review), [`ui-actions/complete-review.js`](https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/ui-actions/complete-review.js) (Complete Review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_detection["Detection and records"]
  node_business_rule["Handoff detection"]
  node_ihr[("Review record")]
end

subgraph group_lifecycle["Review lifecycle"]
  node_start_action["Start Review<br/>[start-review.js]"]
  node_complete_action["Complete Review<br/>[complete-review.js]"]
end

subgraph group_automation["Automation and controls"]
  node_flow["Review automation"]
  node_field_controls["Field controls"]
  node_access["Roles and ACLs"]
end

subgraph group_oversight["Operational oversight"]
  node_dashboard["Review dashboard"]
end

node_incident[("Incident record")]
node_reviewer(("Reviewer"))
node_operations(("Operations user"))

node_incident -->|"triggers evaluation"| node_business_rule
node_business_rule -->|"creates or updates"| node_ihr
node_reviewer -->|"starts review"| node_start_action
node_start_action -->|"sets status"| node_ihr
node_reviewer -->|"completes review"| node_complete_action
node_complete_action -->|"updates status"| node_ihr
node_flow -->|"assigns and cancels"| node_ihr
node_flow -->|"sends notifications"| node_reviewer
node_field_controls -->|"enforces field rules"| node_ihr
node_access -->|"controls access"| node_ihr
node_dashboard -->|"reports review data"| node_ihr
node_operations -->|"monitors reviews"| node_dashboard

click node_business_rule "https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/business-rule/create-incident-handoff-review.js"
click node_start_action "https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/ui-actions/start-review.js"
click node_complete_action "https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/ui-actions/complete-review.js"
click node_flow "https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/flow-designer-automation"
click node_field_controls "https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/field-controls-and-access"
click node_access "https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/field-controls-and-access"
click node_dashboard "https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/dashboard"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_business_rule,node_ihr,node_reviewer,node_operations toneBlue
class node_start_action,node_complete_action,node_incident toneAmber
class node_flow,node_field_controls,node_access toneMint
class node_dashboard toneRose
```

## Components

### Detection and records

- [Handoff detection](https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/business-rule/create-incident-handoff-review.js): `business-rule/create-incident-handoff-review.js`
- **Review record**

### Review lifecycle

- [Start Review](https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/ui-actions/start-review.js): `ui-actions/start-review.js`
- [Complete Review](https://github.com/msn31124/servicenow-incident-handoff-review/blob/main/ui-actions/complete-review.js): `ui-actions/complete-review.js`

### Automation and controls

- [Review automation](https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/flow-designer-automation): `flow-designer-automation`
- [Field controls](https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/field-controls-and-access): `field-controls-and-access`
- [Roles and ACLs](https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/field-controls-and-access): `field-controls-and-access`

### Operational oversight

- [Review dashboard](https://github.com/msn31124/servicenow-incident-handoff-review/tree/main/dashboard): `dashboard`

### Other components

- **Incident record**
- **Reviewer**
- **Operations user**

## Connections

- Incident record → Handoff detection: triggers evaluation (evidence: `README.md`)
- Handoff detection → Review record: creates or updates (evidence: `business-rule/create-incident-handoff-review.js`)
- Reviewer → Start Review: starts review (evidence: `README.md`)
- Start Review → Review record: sets status (evidence: `ui-actions/start-review.js`)
- Reviewer → Complete Review: completes review (evidence: `README.md`)
- Complete Review → Review record: updates status (evidence: `ui-actions/complete-review.js`)
- Review automation → Review record: assigns and cancels (evidence: `README.md`)
- Review automation → Reviewer: sends notifications (evidence: `README.md`)
- Field controls → Review record: enforces field rules (evidence: `README.md`)
- Roles and ACLs → Review record: controls access (evidence: `README.md`)
- Review dashboard → Review record: reports review data (evidence: `README.md`)
- Operations user → Review dashboard: monitors reviews (evidence: `README.md`)
