Question 1mediummultiple choice
Study the full ACL explanation →SNOW-CSA Application Rules, ACL and Notifications • Complete Question Bank
Complete SNOW-CSA Application Rules, ACL and Notifications question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
```
Business Rule: "Set Priority"
Table: [incident]
When: before
Order: 100
Condition: current.category == 'database'
Script:
(function executeRule(current, previous /*null when async*/) {
if (current.state == 1) {
current.priority = 1;
}
})(current, previous);
```
ACL: "Incident Read"
Type: record
Operation: read
Name: incident.*
Role: (empty)
Condition: current.assignment_group == 'a1b2c3d4e5f6g7h8i9j0k1l2'
Script: (empty)
Requires role: true(function executeRule(current, previous /*null when async*/) {
if (current.state == 3) {
current.comments = "State changed to resolved";
current.update();
}
})(current, previous);(function evaluateRule(current, user) {
if (current.caller_id == user.sys_id) {
return true;
}
return false;
})(current, user);(function evaluateRule(current) {
return current.state == 2 || current.state == 3;
})(current);sys_security_acl table record:
name: incident.write
operation: write
type: record
condition: gs.hasRole('admin') || gs.getUser().getDepartmentId() == current.caller_id.department
Script debug output:
*** Script: gs.hasRole('admin') -> false
*** Script: gs.getUser().getDepartmentId() -> 'IT'
*** Script: current.caller_id.department -> 'Finance'Notification 'Incident Assignment' configuration: Table: incident When to send: Record inserted or updated Condition: state changes AND assigned_to is not empty Who will receive: Assignment group Email template: incident_assigned sys_trigger record: name: Notification - Incident Assignment next_action: 2023-01-15 14:00:00 state: waiting document: sys_notification_trigger
ACL Rule: incident.*
Name: incident.read
Type: record
Operation: read
Condition: gs.hasRole('snc_internal') || gs.getUserID() == 'admin'
Script debug:
gs.hasRole('snc_internal') returns false
gs.getUserID() returns 'john.doe'
User 'john.doe' is a member of role 'itil' only.sys_notification table: Name: Incident Update Table: incident When to send: Record updated Condition: state changes AND active is true Who will receive: Assigned user Email template: incident_update syslog: 2023-01-10 10:00:00 - Incident INC001 updated: state from 'New' to 'In Progress', active remains true. Notification not sent.
sys_notification.email_config name: Incident Assignment table: incident when: record.assigned_to.changes() who will receive: assignment group members email template: Assignment Template condition: current.state != 6
sys_script_include
name: validateUserAccess
script:
var user = gs.getUser();
if (!user.hasRole('admin')) {
return false;
}
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', user.getID());
gr.addQuery('group', 'd7e4b8c0c0a8010e00f3b4c5a6b7c8d9');
gr.query();
if (gr.next()) {
return true;
}
return false;sys_notification name: Critical Incident Alert table: incident when: after condition: current.priority == 1 && current.state != 6 message: Priority 1 incident created recipient: "user@example.com" type: email
Refer to the exhibit. ``` Notification: "Incident Created" Table: incident When to send: - Condition: State changes to 'new' Who will receive: - Recipients: Assigned user - Also send to: Caller Email template: (none) ``` A user creates an incident via self-service portal. The incident state is set to 'new'. The assigned user is empty. The caller is the user. The notification is active.
Drag or tap steps into the slots.
Drag a concept onto its matching description — or click a concept then click the description.
Restore normal service operation as quickly as possible
Control the lifecycle of all changes to the IT environment
Identify and manage root causes of incidents
Provide a menu of services for users to request
Capture and share knowledge articles
Application rule (Business Rule):
Name: Set Priority
Table: incident
When: before
Order: 100
Condition: current.state == 1
Script:
gs.log('Setting priority to 1', 'test');
current.priority = 1;
current.setWorkflow(false);
ACL on incident.priority:
Name: priority.write
Type: field
Operation: write
Condition: gs.hasRole('admin')ACL: sys_user
condition: gs.getUserID() == 'admin'
operation: write
script:
answer = gs.getUser().hasRole('admin');
if (answer) {
answer = gs.getUser().isMemberOf('admin_group');
}sys_acl
name: incident.read
type: record
operation: read
condition: gs.hasRole('itil')
script:
answer = gs.getUser().getDepartmentID() == gs.getProperty('dept_hr_id');
order: 100