interview question

chandan86patra
Tera Contributor

Hi All,

I have some doubts related to interview questions :

1. What is the difference between getXML , getXMLwait, and getXMLanswer?

2. What is decision tables and decision trees in ServiceNow, and where will they be used?

3. What is a path parameter and a query parameter?

 

Can anyone help relate this question it will be helpful for me 

 

Thanks and Regards,

Chandan Patra

1 REPLY 1

Shivalika
Mega Sage

Hello @chandan86patra 

 

1)GetXML is asynchronous method means it will proceed with next step and not wait for response from server side. Performance friendly method. 

getXMLWait is synchronous and it will wait for answer from server side, making it not performance friendly. 

getXMLAnswer directly gives you the answer attribute from response body, This is quick and friendly. 

 

2)

Decision tables and decision trees in ServiceNow are powerful tools for managing complex logic and automating decision-making processes.

### Decision Tables
**Decision tables** are used to evaluate multiple conditions and return a result based on predefined logic. They organize rules in a tabular format, where each row represents a unique set of conditions and their corresponding output. This simplifies complex decision-making and enhances readability and maintenance.

**Use Cases for Decision Tables:**
1. **Approval Processes**: Routing approvals based on criteria like purchase amount.
2. **Incident Categorization**: Dynamically categorizing incidents based on attributes such as department and issue type
3. **Workflow Automation**: Replacing complex if-then-else or case/switch constructs in workflows

 

### Decision Trees
**Decision trees** are not explicitly mentioned in ServiceNow documentation as a separate feature but can be conceptualized similarly to decision tables. They visually represent decisions and their possible consequences, making them useful for understanding and communicating complex decision logic.

**Use Cases for Decision Trees:**
1. **Troubleshooting Guides**: Guiding users through a series of steps to diagnose and resolve issues.
2. **Customer Support**: Providing automated responses based on user inputs.
3. **Risk Assessment**: Evaluating potential risks and determining appropriate actions.

Both tools help streamline decision-making processes, reduce the need for extensive scripting, and improve maintainability and collaboration within ServiceNow. 

 

3) Path Parameter and Query Parameter

 

Path Parameter

➡️A dynamic placeholder that allows to pass data/variables in the itself.
➡️They are always mandatory

These are key-value pairs passed in URL after "?" symbol. They can be used to modify, sort or filter request and make it more customer friendly.

 

Query Parameter
➡️ They are usually in the form of QueryString - that is covered in video.
➡️We have choice if we want to make them mandatory or optional.

 

Shivalika_0-1744711409167.png

 

 

This is from  my linkedin post -  https://www.linkedin.com/posts/shivalika-g-540346194_pathparameter-and-queryparameter-activity-73008...

 

Video - https://youtu.be/Hnndv5IEZ_E?si=itwRr1AbFr5qtSYs

Welcome to @ServicenowDeveloperr channel. #WhatItContains ➡️Demo of Path and Query Parameters - types covered ➡️Scripted REST API - GET - #Intermediate Level Requirement - covered ➡️Testing using #restapi #postman - covered ➡️Complete #pdf of implementation in @LinkedIn 00:00 - Introduction 00:45