Question 1mediummultiple choice
Read the full Service Catalog and Workflows explanation →SNOW-CSA Service Catalog and Workflows • Complete Question Bank
Complete SNOW-CSA Service Catalog and Workflows question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
```javascript
// Catalog Client Script - onChange on variable 'department'
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') { return; }
if (newValue == 'IT') {
g_form.addOption('cost_center', 'IT_CC', 'IT Cost Center');
} else {
g_form.clearOptions('cost_center');
}
}
```Refer to the exhibit. ``` Workflow: 'New User Onboarding' - Stage: 'Request Hardware' - Activity: 'Run Script' - Script: "current.assigned_to = gs.getUserID();" - Stage: 'Approval' - Activity: 'Approval' - Approver: 'manager' - Stage: 'Fulfillment' - Activity: 'Create Task' - Task type: 'Catalog Task' ```
Refer to the exhibit.
Business Rule: 'Update CI Status'
Table: Requested Item [sc_req_item]
When: After
Condition: current.state.changesTo(3) // 'Closed Complete'
Script:
gr = new GlideRecord('cmdb_ci');
gr.get(current.variables.ci);
gr.setValue('operational_status', 1); // In Production
gr.update();
Catalog Item Variable 'ci':
Type: Reference
Reference table: Configuration Item [cmdb_ci]Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Full access to all records and configurations
Access to ITIL processes like incident, problem, change management
ServiceNow internal use, not assigned to customers
Basic access to create and view own records
Manage service catalog items and categories
function onLoad() {
g_form.setValue('category', 'software');
}if (g_form.getValue('type') == 'hardware') {
g_form.setMandatory('serial_number', true);
}{
"activity": {
"name": "Run Script",
"script": "current.state = 'pending'; current.update();",
"runScriptOn": "run"
}
}Service Catalog > Catalog Definitions > My Catalog > Items > Laptop Request Variables: - u_location (reference to cmn_location) - u_cost_center (reference to u_cost_center) - u_approver (reference to sys_user) Flow: Create Request -> Approve (Approval Group: IT Hardware) -> Fulfillment (Assignment Group: Hardware Fulfillment) Default Catalog: Service Catalog Error: 'Item variable u_location has no default value and is mandatory'
Sysapproval_approver table: Number: REQ0010001 State: approved Approver: admin Comments: "Approved on behalf of manager" Sysapproval_group table: Group: IT Hardware Member: admin Member: jane.doe Delegate: None Catalog Task: REQ0010001 Assigned to: Hardware Fulfillment State: Work in Progress Work notes: "Waiting for parts"
Catalog Item: Software Install Flow: Create Request -> Approval (Group: Software Approvers) -> Fulfillment (Assignment Group: Software Fulfillment) Variable: u_software_name (string, mandatory) Flow Logic: If u_software_name == "Adobe Photoshop": Approval group = IT Management Else: Approval group = Software Approvers Currently, requests for 'Adobe Photoshop' go to Software Approvers instead of IT Management.
Catalog Item: VPN Access Request
Variable: u_vpn_type (choice: 'Full Tunnel', 'Split Tunnel')
Catalog Client Script: onChange
Script:
function onChange(control, oldValue, newValue, isLoading) {
if (newValue == 'Full Tunnel') {
g_form.showFieldMsg('u_justification', 'Requires manager approval', 'info');
}
}
Workflow: VPN Approval Workflow
- If u_vpn_type == 'Full Tunnel', then Approval (Manager)
- else, Auto-approveRequest: REQ0010002 Catalog Item: Server Provisioning Variables: - u_server_name: "WebServer01" - u_environment: "Production" - u_cpu: 4 - u_ram: 16 Approval: Approved by John Doe (Manager) Fulfillment Tasks: - TASK001: Create VM – Assigned to: VM Team – State: Closed Complete - TASK002: Configure Network – Assigned to: Network Team – State: Work in Progress - TASK003: Install OS – Assigned to: OS Team – State: Pending Error: TASK002 is blocked because it requires TASK001 output (IP address), but TASK001 output variable is not populated.
Service Catalog > Catalog Definitions > Service Catalog Item: 'Laptop Request' Variables: - 'employee_type' (choice: full-time, contractor) - required - 'department' (reference to Department table) - required - 'laptop_model' (choice: Standard, Premium) - required - 'justification' (multi-line text) - required - 'approval_required' (boolean, default true) Flow Designer Flow: 'Laptop Request Approval' Trigger: Catalog Item Submitted -> 'Laptop Request' Conditions: - If 'employee_type' is 'contractor' -> Approval Step (Group: IT Managers) - If 'laptop_model' is 'Premium' -> Approval Step (User: Department Manager) - Else -> Auto-approve Current user: John Doe (Manager, IT department) Submitted request: employee_type = contractor, department = IT, laptop_model = Standard
sys_flow_context table record: Flow: 'Software Approval Flow' Triggered by: Catalog Task 'TASK001001' (state: Work In Progress) Current step: 'Approval Step' (name: 'Manager Approval') Step state: 'Waiting' Conditions evaluated: - 'cost' > 5000: true - 'category' is 'software': true Sysapproval_approver table: Approver: John Doe State: requested Comments: empty Sysapproval_group table: Group: IT Managers State: waiting Members: Jane Smith (pending), Bob Lee (pending)
Catalog Client Script: 'Validate Email' on variable 'email' (type: email)
Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
if (!pattern.test(newValue)) {
g_form.showFieldMsg('email', 'Invalid email format', 'error');
g_form.setValue('email', '');
}
}
Variable: 'email' (type: email, mandatory: true)
Catalog Item: 'Contact Us'sys_record_grpmember table record: Group: 'IT Hardware Approvers' User: 'Jane Smith' Source: 'direct' Group: 'IT Hardware Approvers' User: 'Bob Lee' Source: 'direct' Group: 'IT Hardware Approvers' User: 'John Doe' Source: 'direct' sysapproval_approver table: Approval record for RITM0010001: Approver: 'IT Hardware Approvers' State: 'requested' Approval record for RITM0010001: Approver: 'Jane Smith' State: 'requested' Approval record for RITM0010001: Approver: 'Bob Lee' State: 'pending' Approval record for RITM0010001: Approver: 'John Doe' State: 'not requested'
Flow Designer Flow: 'Software Request Fulfillment' Trigger: Catalog Item Submitted -> 'Software Request' Action: Create Record -> sc_task (Catalog Task) Table: sc_task Field mappings: - 'short_description': 'Install ' + record.variables.software_name + ' on ' + record.variables.workstation_id - 'assignment_group': 'Software Deployment' - 'assigned_to': empty - 'state': 1 (Open) - 'request_item': record.sys_id Current submission: Catalog item: 'Software Request' Variables: software_name = 'Adobe Photoshop', workstation_id = 'WS-102' User: John Doe Department: IT