Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Business Rules/Decision Table API/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Integrate Decision tables via business rules to update CSF pillar and CSF Domain on Risk Record based on CSF Capability.
If the business have any multiple permutations and combinations for OOB fields CSF Capability, CSF Domain, CSF Pillar-
Before, Insert/Update BR and specify your conditions based on update
11 changes: 11 additions & 0 deletions Business Rules/Decision Table API/decisionTable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var sysID = 'custom_sys_id';
var dt = new sn_dt.DecisionTableAPI(); //Calling Decision Table API
var inputs = new Object();
inputs['u_csf'] = current.u_csf_capability; //Map to Decision Table Question Inputs
var response = dt.getDecision(sysID, inputs);
if (response != null) {
var csfDomain = response.result_elements.u_csf_domain;
var csfPillar = response.result_elements.u_csf_pillar;
current.u_csf_domain = csfDomain;
current.u_csf_pillar = csfPillar; //works well for multiple permutations and combinations on Risk Record
}
2 changes: 2 additions & 0 deletions GlideSystem/Dynamic Email Notification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
USE CASE: send a custom email directly from a script.
Triggers a scheduled email event dynamically using eventQueueScheduled()
5 changes: 5 additions & 0 deletions GlideSystem/Dynamic Email Notification/dynamicEmail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(function() {
var subject = 'Incident Update';
var body = 'Hello, this is an automated update for your incident.';
gs.eventQueueScheduled('custom.email.event', current, subject, body, new GlideDateTime().addSeconds(10));
})();
Loading