HR Leave · Australia

Master Guide — Development + Administration (Interview & Consultant)

ServiceNow Australia · Custom app · Arabic + English readable · scripts copy/paste ready

App typeCustom
Scopex_786686_hr_leave
sys_idc84db0e8839f0b509f02b0d6feaad3c9
Replace{BASE} = your instance
Instance URLs Users Roles ACL Update Sets

Master Guide — Development + Administration (Interview & Consultant)

الدليل الشامل للمقابلة: كل التطوير والإدارة، Workspaces، Workflows، Portals.
اقرأه كتابة — لا تحتاج PDI الآن.
الأسلوب: عربية + إنجليزية تكمّلان بعضهما — بدون ترجمة حرفية لأسماء الشاشات.


Part A — Platform Architecture (must know)

A.1 Three layers

Platform (tables, ACL, scripting, integrations)
 ↓
Applications (ITSM, CSM, HRSD, scoped apps like x_786686_hr_leave)
 ↓
Experience (Service Portal, Workspaces, Employee Center, Mobile)

A.2 Global vs Scoped

Global Scoped (x_*)
Risk on upgrade High if you edit OOTB Low — isolated
Best practice Read OOTB, extend in scope Always prefer for custom
Tables incident, sys_user x_786686_hr_leave_req_v2

Interview answer: — أبني التخصيصات في scoped application وأستخدم OOTB أولًا.


Part B — Development Full Tour

B.1 Artifact types (what runs where)

Artifact Runs on When Bypassable?
Client Script Browser onLoad/onChange/onSubmit Yes (API)
UI Policy Browser condition on form Yes
Business Rule Server before/after/async No
Data Policy Server always on save No
Script Include Server called by others N/A
Flow Designer Server trigger/conditions N/A
Workflow (legacy) Server old approvals Avoid for new
ACL Server every CRUD N/A
Scheduled Job Server cron N/A
Event + Notification Server event queue N/A

Consultant rule: — منطق الأعمال الحساس = Business Rule + Data Policy + ACL. Client Script = UX فقط.


B.2 Tables & Fields

Create: Studio → Table → columns start with u_ in scoped apps.

Key concepts:

Concept Interview point
extends Inheritance (task → incident)
Reference Foreign key to another table
Choice Dropdown values in sys_choice
Dictionary sys_dictionary defines field metadata
Coalesce Import dedup key

Our app tables: see 01_DEVELOPMENT.md §2.


B.3 Script Includes

Purpose: Reusable server functions.

Options: Client callable, Accessible from (public/package_private).

Our app: HRLXProLeaveUtilsV2, HRLXProSecurityUtilsV2, HRLXProIntegrationUtilsV2.

Deep explanation:
File: 01_SCRIPTS_FUNCTIONS_DEEP_DIVE.md


B.4 Business Rules

When Use
before Modify current before DB write; can abort
after Side effects (events, related records)
async Long jobs — don’t block user
display Dynamic form sections (rare)

Order: Lower number runs first.

Our app:
- BR1 before — calculate days, set approver
- BR2 after — fire event on submit
- BR3 after — audit + balance on state change


B.5 Client Scripts & GlideAjax

// Client calls server Script Include
var ga = new GlideAjax('x_786686_hr_leave.HRLXProLeaveUtilsV2');
ga.addParam('sysparm_name', 'ajaxGetBusinessDays');
ga.addParam('sysparm_start', startDate);
ga.addParam('sysparm_end', endDate);
ga.getXMLAnswer(function(answer) {
 g_form.setValue('u_days_count', answer);
});

g_form API (interview):
- getValue / setValue
- setMandatory / setVisible / setReadOnly
- clearValue / addInfoMessage / addErrorMessage
- onSubmit: return false blocks save


B.6 UI Policies vs Data Policies

UI Policy Data Policy
Layer Form UX Server enforcement
Mandatory Visual only Real mandatory
Use Show/hide fields Compliance, audit

B.7 Flow Designer vs Workflow

Flow Designer Workflow (legacy)
Status Current standard Maintenance mode
Use Approvals, automation Old records only
Editor $flow-designer.do Workflow Editor

Our app Flow: Record Updated → u_state=submitted → Ask for Approval → update approved/rejected.


B.8 Service Catalog

Catalog → Category → Catalog Item / Record Producer / Order Guide
 ↓ order
sc_request (REQ) → sc_req_item (RITM) → sc_task

Record Producer: Creates record directly (our leave request).
Order Guide: Multi-item bundle.

File: 03_SERVICE_CATALOG.md


B.9 Service Portal

Tech: AngularJS widgets (server.js + client.js + template.html + style.scss).

Key objects:
- sp_portal, sp_page, sp_widget, sp_rectangle_menu

Our portal: /hrlx — widgets hrlx_my_leaves, hrlx_balance.

File: 04_SERVICE_PORTAL.md


B.10 Workspaces (UI Builder)

For agents — not end users.

Workspace URL Users
Service Operations (SOW) /now/sow/home ITSM agents
CSM Agent /now/cwf/agent Customer service
FSM Dispatcher /now/fsm/dispatcher Field dispatch
HR Agent /now/hr/agent HR agents
CMDB /now/cmdb CMDB team
GRC/IRM /now/grc Risk/compliance

Components: Lists, Forms, Data Tables, Buttons, Data Resources, Event handlers.

File: 05_WORKSPACE_UIBUILDER.md


B.11 Employee Center

URL: /esc

Unified employee portal — HR, IT, facilities topics.

vs Service Portal:
- EC = employee-centric hub (topics, taxonomy)
- SP = catalog/widgets (can embed in EC)


B.12 Integration patterns

Pattern Direction Tool
REST API Explorer Test inbound $restapi.do — Table API + Scripted REST, Copy as cURL
Scripted REST Inbound REST API resource (test in Explorer first)
REST Message / HTTP Outbound RESTMessageV2 + Test button
Import Set + Transform Inbound batch Coalesce
IntegrationHub Spokes Both Flow + actions
MID Server On-prem bridge Discovery, JDBC, etc.
Email Inbound Inbound Actions

Files: 09_MODULES_AND_INTEGRATION.md, src/server/rest/*


B.13 ATF & CI/CD


Part C — Administration Full Tour

C.1 Users, Groups, Roles

User → Group Member → Group has Role → Role grants permissions

Best practice: Assign roles to groups, not users directly.

Our app roles:
- x_786686_hr_leave.employee
- x_786686_hr_leave.manager
- x_786686_hr_leave.hr_admin

Navigate: All > User Administration > Users / Groups / Roles — Open direct


C.2 ACL (Access Control)

Evaluated: Table → Field → every CRUD operation.

Types:
- record / field
- script in condition (advanced)

Order: Deny wins. Most specific wins.

GlideRecord vs GlideRecordSecure:
- GlideRecord — ignores ACL (dangerous in multi-user)
- GlideRecordSecure — always in portals/multi-tenant

File: src/security/acls.md, 02_ADMINISTRATION.md §4


C.3 Assignment Rules

Purpose: Auto-route tasks to group/user.

Navigate: All > System Policy > Assignment — Open direct

vs Business Rule assignment: — Assignment Rule = declarative, upgrade-safe. BR script assignment = last resort.

CSM: use Advanced Work Assignment (AWA) instead for cases.


C.4 Data Lookup / Priority Lookup

Purpose: Matrix lookups (Impact × Urgency → Priority).

Tables: dl_u_priority, dl_matcher pattern.

Navigate: Incident → Priority Lookup Rules.


C.5 Import Sets & Transform Maps

Load file → staging table (import set) → Transform Map → target table

Coalesce: Match field — update if exists, insert if not.

Navigate: All > System Import Sets — Open direct

File: 02_ADMINISTRATION.md §7


C.6 Update Sets

Create Update Set → develop in scope → Complete → Export XML → Import → Preview → Commit

Navigate: All > System Update Sets > Local Update Sets — Open direct

Never: Commit default Update Set. One app per set.


C.7 System Properties

Navigate: All > sys_properties.list — Open direct

Scoped: x_786686_hr_leave.config.*

File: src/properties/system_properties.md


C.8 Notifications & Events

Business Rule / Flow → gs.eventQueue('event.name', current, parm1, parm2)
 ↓
Notification (When: event fired) → email/SMS

Navigate: All > System Notification > Email > Notifications — Open direct

File: 06_NOTIFICATIONS_EVENTS_JOBS.md


Part D — All Workspaces & Portals (Quick Reference)

Audience Surface URL
Employee Employee Center /esc
Employee Service Portal /sp
Employee Knowledge /kb
Customer (CSM) Customer Portal /csm
IT Agent Service Operations /now/sow/home
IT Agent Classic lists /nav_to.do
CSM Agent Configurable Workspace /now/cwf/agent
FSM Dispatcher Dispatcher /now/fsm/dispatcher
HR Agent HR Workspace /now/hr/agent
CMDB CMDB Workspace /now/cmdb
GRC IRM Workspace /now/grc
SPM Workbenches Demand/Resource/Planning Console
Admin Classic UI /nav_to.do

Part E — Workflows (process flows)

Module Main workflow
ITSM Incident New → In Progress → Resolved → Closed
ITSM Change Normal: Assess → CAB → Implement → Close
ITSM Request REQ → RITM → sc_task
CSM Case New → Open → WIP → Resolved → Closed
FSM WO Draft → Scheduled → WIP → Complete
HRSD Case New → In Progress → Resolved → Closed
HR Leave (our app) draft → submitted → approved/rejected
GRC Control test → fail → Issue → Remediation
SPM Idea → Demand → Project → Close

Part F — Top 30 Interview Questions (Dev + Admin)

  1. Difference between GlideRecord and GlideRecordSecure?
  2. before vs after Business Rule?
  3. UI Policy vs Data Policy vs Client Script?
  4. Flow Designer vs Workflow?
  5. How does ACL evaluation order work?
  6. What is coalesce in Transform Map?
  7. REQ vs RITM vs sc_task?
  8. Impact × Urgency → Priority — where configured?
  9. Scoped app vs global customization?
  10. What is IRE in CMDB?
  11. MID Server purpose?
  12. Service Portal vs Workspace?
  13. Employee Center vs Service Portal?
  14. HR Criteria in HRSD?
  15. Entitlements in CSM?
  16. AWA vs Assignment Rules?
  17. Normal vs Standard vs Emergency Change?
  18. CSDM four domains?
  19. GRC engine: Authority → Control → Indicator?
  20. Idea → Demand → Project in SPM?
  21. What is gs.eventQueue?
  22. Async Business Rule use case?
  23. Update Set vs SDK deploy?
  24. REST inbound vs outbound?
  25. Why Script Include client callable?
  26. Field-level ACL use case?
  27. Major Incident vs P1 incident?
  28. Discovery vs Service Mapping?
  29. em_event vs em_alert?
  30. How would you secure a scoped HR app?

Answers: covered in Parts A–E and MODULES_INTERVIEW_REVISION.md.


Part G — Consultant delivery checklist

  1. Discovery workshop → requirements.
  2. OOTB-first design.
  3. Scoped app for custom.
  4. Security: roles → groups → ACL → HR Criteria (HR).
  5. Phased: data → process → portal → integration.
  6. ATF regression suite.
  7. Update Set / App Repo promotion path.
  8. Hypercare + CMDB Health (if ITOM).

Files: 10_IMPLEMENTATION_AND_CONFIG.md, ROADMAP.md