Skip to content

Commit b62d2c5

Browse files
authored
Create README.md
1 parent c231ab4 commit b62d2c5

File tree

1 file changed

+17
-0
lines changed
  • Server-Side Components/Business Rules/Cancel Incomplete Playbooks on Closure

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
🛑 Auto-Cancel Playbooks on Incident Deactivation
2+
3+
Script Type: Business Rule (Server-side)
4+
Trigger: before update
5+
Table: incident
6+
Condition: active changes to false
7+
8+
📌 Purpose
9+
10+
Automatically cancel all active Playbooks (sys_pd_context) records associated with an incident when that incident is deactivated (e.g., closed or canceled).
11+
12+
🧠 Logic
13+
14+
- Finds all active playbooks (not in completed,canceled) where:
15+
- input_table is incident (or any other table)
16+
- input_record matches current incident’s sys_id
17+
- Cancels each playbook using: sn_playbook.PlaybookExperience.cancelPlaybook(playbookGR, 'Canceled due to the incident closure or cancellation.');

0 commit comments

Comments
 (0)