Courseiva

CCNA Discovery Pattern Design Questions

68 questions · Discovery Pattern Design · All types, answers revealed

1
Multi-Selectmedium

Which TWO steps are essential for parsing a command output that contains key-value pairs formatted as 'key = value'?

Select 2 answers
A.Execute an external shell script
B.Convert the output to XML
C.Define the Line Delimiter
D.Configure the key-value separator (e.g., '=')
E.Apply a JSON Path
AnswersC, D

Defining the line delimiter tells the parser where one record ends and the next begins, so each 'key = value' pair is processed as a discrete entry. Without it, the output cannot be split into individual records for attribute extraction.

Why this answer

For key-value parsing, identifying the line delimiter and the key-value separator is essential.

2
MCQhard

You are building a pattern for a network device that exposes data only through an SSH session requiring a non-standard prompt and a two-step authentication exchange. Your pattern must run several commands after login and parse each result. Which approach correctly addresses the interactive login and command execution within the pattern?

A.Set the connection type to 'WMI' and provide the device's SNMP community string so the MID Server can retrieve the data without an interactive login.
B.Use a single 'Run Command' step with all commands concatenated by semicolons and parse the combined output with one regex.
C.Configure the pattern's connection section with the SSH credentials, set the prompt pattern to match the device's custom prompt, and add command steps that execute after the session is established.
D.Create separate patterns for each command and rely on the MID Server's automatic session reuse to keep the SSH connection alive across pattern runs.
AnswerC

The connection section handles protocol, credentials, and prompt detection, and command steps run within that established session. Matching the custom prompt ensures the MID Server knows when output ends before sending the next command. This is the designed mechanism for non-standard SSH devices and supports multiple sequential commands with parsing between them.

Why this answer

Interactive SSH devices with custom prompts are handled by configuring the pattern's connection with credentials and a prompt match, then issuing command steps inside that session. Separate patterns, concatenated commands, or unrelated protocols like WMI and SNMP cannot establish or maintain the required interactive SSH session for sequential command execution and parsing.

Exam trap

The trap here is assuming the MID Server keeps an SSH session alive between separate pattern runs, when each pattern execution opens its own connection.

3
MCQeasy

What is the primary role of the MID Server during pattern execution?

A.To define pattern logic.
B.To store the CMDB.
C.To execute the pattern commands on the target.
D.To design the pattern.
AnswerC

The MID Server acts as the execution proxy, running pattern commands against targets on behalf of the instance, since Discovery cannot reach those systems directly. It satisfies the requirement for remote command execution during pattern runs.

Why this answer

The MID Server executes the commands on the target on behalf of the instance.

4
MCQmedium

You are creating a custom pattern to identify a new type of load balancer. You need to verify that the identification section correctly maps the serial number to the cmdb_ci_lb_device table. Which debugging tool within the Pattern Designer should you use to validate the identification section without running a full Discovery schedule?

A.Identification Reconciliation Engine (IRE) Log
B.ECC Queue Monitor
C.Pattern Debugger
D.Discovery Log
AnswerC

Pattern Debugger runs a single pattern step-by-step against a target host and displays the parsed variables, letting you confirm the serial number maps correctly to cmdb_ci_lb_device. It validates the identification section without triggering a full Discovery schedule.

Why this answer

The Pattern Debugger in Pattern Designer lets you run a pattern against a specific input (such as a saved probe result or a manually supplied payload) and step through each section — Identification, Exploration, and Parsing — showing exactly which step produced which output. This validates the identification section's serial-number mapping to cmdb_ci_lb_device without needing to execute a full Discovery schedule. It is the purpose-built debugging tool for pattern development.

Exam trap

The trap is confusing debugging tools that operate at different layers — IRE Log (reconciliation), ECC Queue (transport), Discovery Log (run status) — with the Pattern Debugger, which is the only tool that lets you step through pattern sections in isolation.

How to eliminate wrong answers

Option A is wrong because the IRE Log shows how discovered CIs were reconciled and merged into the CMDB after discovery — it is a post-processing audit tool, not a pattern-section debugger. Option B is wrong because the ECC Queue Monitor displays raw probe and sensor payloads flowing between the MID Server and the instance; it shows input/output data but does not let you step through pattern logic. Option D is wrong because the Discovery Log records status and errors of discovery runs at a high level; it does not provide step-by-step pattern section validation.

5
MCQmedium

What happens to the data extracted by a pattern if it is not mapped to an attribute?

A.It is kept as a temporary CI.
B.It is stored in the error table.
C.It is discarded.
D.It is saved in the discovery log.
AnswerC

Unmapped pattern data is discarded because Discovery only persists extracted values that a pattern maps to a CI attribute or related field. The mapping step defines the target column; without it, the identification and exploration engine has nowhere to write the value, so it is dropped rather than stored in a staging table.

Why this answer

If data extracted by a pattern is not mapped to an attribute, it is discarded. ServiceNow Discovery only retains data that is explicitly mapped to a CI attribute or used in a step; unmapped data is not stored.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests the fate of unmapped data, causing candidates to think it is stored somewhere when it is actually discarded.

How to eliminate wrong answers

Option A is wrong because unmapped data is not kept as a temporary CI; it is simply discarded. Option B is wrong because it is not stored in the error table; the error table is for errors, not unmapped data. Option D is wrong because it is not saved in the discovery log; the log records events, not raw unmapped data.

6
MCQeasy

What is the purpose of 'Discovery' patterns?

A.To generate incident reports.
B.To populate the CMDB with CI data.
C.To manage user access.
D.To create business services.
AnswerB

Discovery patterns are reusable, rule-based definitions that query and classify devices, then map discovered attributes into the CMDB as configuration items. They populate the CMDB with CI data, including relationships, rather than merely scanning the network.

Why this answer

Discovery patterns are used to populate the CMDB with CI data from infrastructure components.

7
MCQhard

A pattern designer is creating a pattern to discover a Linux server. The pattern needs to extract the operating system version from the output of the 'uname -a' command. The output format varies slightly across distributions. Which parsing strategy should be used to reliably extract the version?

A.XML parsing
B.JSON parsing
C.Delimiter-based parsing
D.Regular expression
AnswerD

Regular expressions are ideal for extracting data from unstructured or semi-structured text where the format may vary. In this case, the 'uname -a' output can differ across distributions, so a regex can be crafted to match the version pattern regardless of surrounding text. It provides flexibility and precision. This is the recommended approach for parsing such command output.

Why this answer

Regular expressions are the most reliable way to extract data from command output that may have variable formatting. They allow pattern matching around the target data, ignoring surrounding inconsistencies. XML and JSON parsing require structured data, and delimiter-based parsing assumes consistent field positions, which is not the case here.

Exam trap

The trap here is assuming that any text can be parsed with a simple delimiter split, overlooking the variability in command output across different Linux distributions.

8
Multi-Selectmedium

Which TWO of the following can be configured in a Pattern step?

Select 2 answers
A.Run as (user privilege)
B.User password rotation
C.Continue on error
D.MID Server selection
E.CI Class Manager update
AnswersA, C

Run as specifies the user privilege under which a pattern step executes, allowing discovery to authenticate with the credentials required to query restricted targets. This satisfies the requirement that configurable step attributes include the execution identity, not merely parsing or probe behaviour.

Why this answer

In a Pattern step, option A "Run as (user privilege)" is correct because each step can be configured with a Run as value that specifies the user account or privilege under which the step's operation executes, which is essential for controlling access to the target systems during discovery. Option C "Continue on error" is also correct because Pattern steps include an error-handling setting that allows the pattern to continue processing subsequent steps even if the current step fails, which is useful for robust discovery when some data may be unavailable. Option B "User password rotation" is not a Pattern step setting; password rotation is handled through credential management and password policies, not within individual pattern steps.

Option D "MID Server selection" is not configured per Pattern step; MID Server assignment is determined at the discovery schedule or configuration level, not inside a step. Option E "CI Class Manager update" is unrelated to Pattern step configuration, as CI Class Manager is used to manage class definitions and hierarchies, not step-level execution behavior.

9
MCQmedium

When should you use the 'Lookup' step in a pattern?

A.To create a new CI.
B.To retrieve data from an existing CMDB record.
C.To delete a CI.
D.To identify the primary CI.
AnswerB

The Lookup step queries existing CMDB records to return values for pattern population, rather than discovering them from the target device. This satisfies the scenario's requirement to reuse already-stored data, such as resolving a related CI's attributes, instead of performing redundant probes or relying on Microsoft Entra ID or other external sources.

Why this answer

The 'Lookup' step in a pattern is used to retrieve data from an existing CMDB record. It allows you to query the CMDB for a CI based on certain criteria and then use the returned data in subsequent steps. This is useful for correlating discovered data with existing records or for populating related fields.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests the purpose of the Lookup step, and candidates may confuse it with Identification or Creation, but the key is that Lookup retrieves existing data.

How to eliminate wrong answers

Option A is wrong because creating a new CI is done in the Identification or Creation steps, not Lookup. Option C is wrong because deleting a CI is not a function of the Lookup step; deletion is typically handled by other processes. Option D is wrong because identifying the primary CI is done in the Identification step, not Lookup.

10
Multi-Selectmedium

Which TWO of the following are valid parsing strategies available in the Pattern Designer when processing data retrieved from a device?

Select 2 answers
A.SQL Query
B.SOAP Envelope
C.Binary Stream
D.JSON
E.Delimited Text
AnswersD, E

JSON parsing in Pattern Designer deserialises structured device output into key-value pairs, satisfying the stem's requirement for a valid parsing strategy. It handles REST API and modern device responses where nested attributes must be extracted directly, unlike delimiter-based or regex approaches that cannot natively traverse hierarchical JSON structures.

Why this answer

The Pattern Designer supports various parsers including 'Delimited' (for tables) and 'JSON' (for object data).

11
MCQmedium

When configuring a 'Set Parameter' step, where is the value retrieved from if you select 'Variable'?

A.From the MID server configuration.
B.From a memory variable created earlier in the pattern.
C.From the CMDB table.
D.From a system property.
AnswerB

Selecting 'Variable' as the source retrieves the value from a memory variable previously created earlier in the pattern, such as one populated by an earlier step. This allows dynamic values to flow between steps rather than using static text.

Why this answer

A 'Variable' parameter type retrieves its value from a previously defined variable in the pattern session.

12
MCQmedium

You are designing a pattern to discover Windows servers. You need to collect the installed software list. The command output is a large text block with multiple lines, each containing a software name and version separated by a tab. Which parsing strategy in the Pattern Designer is best suited for this data?

A.Delimited Text
B.JSON
C.Regular Expression
D.XML
AnswerA

Delimited Text parsing is ideal for structured text where fields are separated by a consistent delimiter, such as a tab or comma. In this scenario, each line contains a software name and version separated by a tab, so Delimited Text can split each line into columns and extract the required values efficiently.

Why this answer

Delimited Text parsing is the most appropriate for tab-separated values. It splits each line into fields based on the delimiter, allowing straightforward extraction of software names and versions. Regular expressions, XML, and JSON are unnecessary or incorrect for this data format.

Exam trap

The trap here is overcomplicating the solution by choosing Regular Expression when a simpler delimited approach suffices.

13
MCQmedium

You are creating a pattern to capture a version number from a command line output. The output is 'Version: 1.2.3.4'. Which parsing strategy is most efficient for this specific string?

A.Name-Value pair parsing
B.Delimiter parsing
C.Regex parsing
D.XML parsing
AnswerC

Regex parsing extracts the version substring directly by matching the literal "Version:" anchor and capturing the numeric pattern \d+\.\d+\.\d+\.\d+, satisfying the need to isolate 1.2.3.4 from surrounding text in a single pass. Fixed-index or delimiter splitting would require extra steps to strip the label and punctuation.

Why this answer

Regex is the standard tool for extracting specific patterns from a single line of text.

14
MCQeasy

A pattern designer wants to reuse a set of steps that are common across multiple patterns, such as steps to gather basic system information. What should the designer do to avoid duplicating these steps in each pattern?

A.Define the common steps as a 'Subflow' in Flow Designer and call it from the pattern.
B.Copy and paste the steps into each pattern and maintain them separately.
C.Use the 'Include' directive in the pattern XML to import steps from a library.
D.Create a new pattern that contains the common steps and then reference it from other patterns using a 'Pattern' step.
AnswerD

ServiceNow Discovery patterns support a 'Pattern' step that allows you to call another pattern as a subroutine. By creating a separate pattern with the common steps and invoking it from other patterns, you promote reusability and maintainability. This is the recommended approach for sharing logic across patterns.

Why this answer

The 'Pattern' step in ServiceNow Discovery allows one pattern to invoke another, enabling modular design. By extracting common steps into a reusable pattern, you avoid duplication and simplify updates. This is the standard method for sharing pattern logic across multiple discovery patterns.

Exam trap

The trap here is confusing pattern reuse with other ServiceNow features like Flow Designer subflows or XML includes, which do not apply to pattern design.

15
MCQeasy

Which field in the Pattern Designer is used to define the criteria for identifying a CI based on specific attributes like serial number or name?

A.Connection Section
B.Infrastructure Section
C.Identification Section
D.Extension Section
AnswerC

The Identification Section in the Pattern Designer defines the criteria used to match and identify a CI, such as serial number or name. It satisfies the requirement to specify identifying attributes, distinguishing it from the Connections or Steps sections, which handle relationships and discovery actions.

Why this answer

The Identification Section is where you define the criteria used by the IRE to uniquely identify CIs.

16
Multi-Selecthard

Which TWO of the following are valid ways to debug a pattern?

Select 2 answers
A.Restart the instance
B.Review the 'Pattern Log' in the Discovery Status
C.Modify the MID Server source code
D.Use the 'Test' mode in the Pattern Designer
E.Run the pattern from the command line
AnswersB, D

The Pattern Log records each pattern's execution steps, including which commands ran and where parsing failed, so reviewing it in Discovery Status reveals the exact point of failure. This satisfies the need to trace pattern behaviour during debugging.

Why this answer

Option B is correct because the 'Pattern Log' in the Discovery Status provides the execution trace and error details generated when a pattern runs during discovery, making it the primary place to inspect what a pattern actually did and where it failed. Option D is correct because the 'Test' mode in the Pattern Designer lets you execute a pattern against a specific CI or host in a controlled, interactive environment, showing step-by-step results and allowing iterative debugging without running a full discovery. The other options do not belong: restarting the instance (A) is a generic troubleshooting action that does not expose pattern logic or execution details, modifying the MID Server source code (C) is unsupported and unrelated to pattern debugging, and running the pattern from the command line (E) is not a valid debugging method for patterns in this platform.

17
MCQmedium

You are creating a new Discovery pattern and need to extract data from a command output where lines are separated by a consistent delimiter. Which parsing strategy should you use to map these specific values to table attributes?

A.JSON parsing
B.XML parsing
C.Delimited parsing
D.Regex parsing
AnswerC

Delimited parsing splits command output on a consistent separator, extracting each field into distinct values for attribute mapping. Because the stem specifies lines separated by a uniform delimiter, this strategy directly matches the data structure and populates the target attributes reliably.

Why this answer

The Delimited parsing strategy is specifically designed for structured text outputs where fields are separated by characters like commas, tabs, or pipes.

18
MCQeasy

Which action allows you to test a pattern against a specific Discovery status record without running a full Discovery scan?

A.Modify Discovery Schedule
B.Submit a change request
C.Re-run Discovery
D.Pattern Designer Test mode
AnswerD

Pattern Designer's Test mode runs a pattern against a chosen Discovery status record's input payload, letting you validate parsing and step logic without launching a full scan. This satisfies the requirement to test in isolation.

Why this answer

Pattern Designer's Test mode lets you execute a pattern against a specific Discovery status record (a saved Discovery log entry) and step through each step to inspect inputs/outputs, without scheduling or running a full Discovery. This is the standard debugging workflow for pattern development in ServiceNow Discovery. It isolates the pattern logic from the broader Discovery run so you can iterate quickly.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests whether candidates confuse pattern-level debugging (Pattern Designer Test mode) with schedule-level or run-level operations (modify schedule, re-run Discovery).

How to eliminate wrong answers

Option A is wrong because modifying a Discovery Schedule changes when/what Discovery runs but does not provide a targeted pattern test harness. Option B is wrong because a change request is a governance/ITIL artifact and has no role in pattern testing. Option C is wrong because re-running Discovery executes the entire discovery process against a target, which is heavier and not a pattern-level test.

19
MCQeasy

You are creating a new Discovery pattern for a custom application. You need to define the pattern's entry point and specify which CI type it will discover. Where in the Pattern Designer do you configure the CI type that the pattern will create or update?

A.Step conditions
B.Create CI step
C.Pattern properties
D.Parse Variable settings
AnswerC

Pattern properties include the CI type that the pattern discovers. This setting determines the base CI class for the pattern and is essential for the pattern to correctly create or update CIs in the CMDB. It is configured at the pattern level, not within individual steps.

Why this answer

The CI type that a pattern discovers is defined in the pattern properties. This setting is crucial because it determines the CMDB class for the CI records created or updated by the pattern. Other areas like step conditions, Parse Variable settings, and Create CI steps do not define the overall CI type.

Exam trap

The trap here is assuming that the Create CI step defines the CI type, when it actually inherits it from the pattern properties.

20
MCQhard

When debugging a pattern that fails to parse a JSON response, which tool in the Pattern Designer provides the most granular view of the variable state after a 'Parse JSON' step?

A.The 'Variables' tab in the Debugger
B.Pattern Log
C.The CMDB CI Class Manager
D.The Discovery Status record
AnswerA

The Variables tab shows the content of the temporary memory during the current debug session.

Why this answer

The 'Debug' panel in the Pattern Designer allows you to inspect variable values step-by-step after execution.

21
MCQhard

You are parsing a multi-line string containing key-value pairs separated by colons. Which tool is most appropriate for a single step extraction?

A.Parse Name-Value pair
B.Regex
C.Parse Delimited
D.XPath
AnswerA

Parse Name-Value pair extracts key-value pairs from a multi-line string in one step, splitting on the colon delimiter and returning each key with its value. This directly satisfies the single-step extraction constraint, avoiding manual scripting or repeated string operations.

Why this answer

The 'Parse Name-Value pair' step is designed to automatically extract multiple key-value pairs from a text block.

22
MCQmedium

When using the 'Parse Variable' step to extract data, which component is required to capture a specific substring from a larger variable using a capture group?

A.Regular Expression
B.Delimited Parsing
C.XML Path
D.JSONPath
AnswerA

A regular expression supplies the pattern and capture group that the Parse Variable step uses to isolate the required substring from the larger variable. Without a regex defining the capture group, the step cannot identify which portion of the source string to extract.

Why this answer

A Regular Expression is required in the 'Parse Variable' step to capture a specific substring using a capture group. The Parse Variable step supports multiple parsing methods, but only Regular Expression allows you to define a pattern with parentheses (capture groups) to extract a targeted portion of a larger string.

Exam trap

The trap is that candidates see 'capture group' and think of any parsing method, but only Regular Expression supports capture groups — delimited, XML, and JSON parsing use different extraction mechanisms.

How to eliminate wrong answers

Option B is wrong because Delimited Parsing splits a string by a delimiter (comma, pipe, etc.) and returns fields by position — it cannot capture an arbitrary substring pattern. Option C is wrong because XML Path (XPath) is used to extract values from XML documents, not to capture substrings from a plain variable. Option D is wrong because JSONPath is used to extract values from JSON structures, not to perform regex-based substring capture.

23
Multi-Selectmedium

When debugging a pattern that fails during the identification phase, which TWO areas should you inspect in the Pattern Designer?

Select 2 answers
A.Credentials
B.Schedule
C.Identification section
D.Identification rules
E.Discovery log
AnswersC, D

The Identification section defines the CI identification rules, so failures there stem from incorrect identifier entries, conditions or table selection. Inspecting it directly reveals why the pattern cannot match incoming data during the identification phase.

Why this answer

In the Pattern Designer, the identification phase is driven by the Identification section (option C), which defines what data the pattern collects and how it maps to the application model, so inspecting it reveals whether the pattern is gathering the right attributes to recognize the target. The Identification rules (option D) are equally essential because they specify the exact conditions (e.g., process name, file path, registry key, or command-line arguments) that must match for the pattern to positively identify the application; a faulty or overly strict rule is a common cause of identification failure. Options A (Credentials) and B (Schedule) relate to authentication and execution timing, which affect discovery or execution phases rather than the identification logic itself.

Option E (Discovery log) is an output artifact used for troubleshooting discovery runs, not a configuration area within the Pattern Designer that defines identification behavior.

24
Multi-Selecthard

Which THREE common challenges arise when using Regex to extract data from command outputs in patterns?

Select 3 answers
A.Potential for catastrophic backtracking on large strings
B.Regex does not support capture groups
C.Changes in command output format can break the regex
D.Regex is automatically converted to JSON
E.Complexity of maintaining long regex strings
AnswersA, C, E

Catastrophic backtracking occurs when nested quantifiers force the regex engine to explore exponentially many match paths as input length grows, so a pattern that succeeds on small command outputs can hang indefinitely on large ones. This directly satisfies the stem's focus on extraction challenges, since command outputs are often lengthy and unpredictable.

Why this answer

Option A is correct because certain regex patterns with nested quantifiers can trigger catastrophic backtracking, causing exponential runtime on large command outputs. Option C is correct because command output formats can change across software versions or configurations, silently breaking patterns that were tightly coupled to the old layout. Option E is correct because long, complex regex strings are hard to read, document, and maintain, especially when they encode many assumptions about output structure.

Option B is wrong because regex engines widely support capture groups (e.g., parentheses in PCRE, Python re, and .NET). Option D is wrong because regex is a pattern-matching language and is never automatically converted to JSON.

25
MCQmedium

Which of the following parsing strategies is best for a response formatted as a list of key-value pairs separated by equal signs?

A.Delimiter parsing
B.Regex
C.JSON parsing
D.Name-Value pair parsing
AnswerD

Name-Value pair parsing splits each line on the delimiter, here the equal sign, mapping the left token to a field name and the right to its value. This directly matches the stated key-value format, unlike regex or XML strategies that assume different structural delimiters.

Why this answer

The Name-Value pair parser is specifically designed for such formats.

26
MCQhard

You are designing a pattern to discover Linux servers. You need to ensure that the pattern only runs the 'Identify' step if the server's hostname matches a specific naming convention (e.g., starts with 'prod-'). Which Pattern Designer feature should you use to implement this conditional logic?

A.Debug mode
B.Pattern precondition
C.Parse Variable
D.Step condition
AnswerD

A step condition allows you to specify a condition that must be true for a particular step to execute. In this scenario, you can add a condition to the Identify step that checks if the hostname starts with 'prod-'. If the condition is false, the step is skipped. This provides granular control over step execution within the pattern.

Why this answer

To conditionally execute a specific step, you must use a step condition. This allows you to define logic that evaluates pattern variables or other data to determine if the step should run. Preconditions apply to the whole pattern, while debug mode and Parse Variable serve different purposes.

Exam trap

The trap here is assuming that a pattern precondition can control individual step execution, when it only gates the entire pattern.

27
MCQmedium

When a pattern step fails, how can you determine which step caused the failure?

A.Re-run the Discovery as admin.
B.Check the MID Server service.
C.Review the Discovery Status record log.
D.Look at the CMDB class manager.
AnswerC

The Discovery Status record log captures per-step execution output, including the exact error and the step that threw it, so it directly identifies the failing step. This satisfies the stem's requirement to pinpoint causation after a pattern step failure, rather than inferring it from device classification or schedule data.

Why this answer

The Discovery status log shows the step that failed in the execution flow.

28
MCQmedium

While validating a newly built pattern in the Pattern Designer, you need to confirm that a step extracting the 'hostname' attribute from a device's command output is capturing the correct value before you commit changes to production. Which action best validates the extraction without deploying the pattern to a full discovery schedule?

A.Enable verbose logging on the MID Server and search the agent logs for the parsed hostname string after the next discovery cycle.
B.Publish the pattern to production and monitor the CMDB for records whose hostname field is populated correctly.
C.Create a discovery schedule scoped to the single device and wait for the next scheduled run to review the resulting CI record.
D.Use the Pattern Designer's test/debug run against a target device to step through execution and inspect the variable values captured by each step.
AnswerD

The Pattern Designer provides a test capability that executes the pattern against a specified device and exposes step-by-step results, including parsed variable values. This lets you confirm the hostname extraction is correct in isolation, without waiting for or affecting a scheduled discovery. It is the intended validation workflow during pattern development.

Why this answer

The Pattern Designer's test/debug run executes the pattern against a chosen device and reveals each step's captured variables, allowing direct confirmation of the hostname extraction before publishing. Scheduled discovery, log review, and production monitoring are slower, less isolated, and risk affecting live data, so they are inferior validation methods.

Exam trap

The trap here is assuming you must run a full discovery schedule to validate a pattern step, when the designer can test a pattern directly against a device.

29
MCQmedium

When dealing with a nested XML response from an API, which parsing method should be used to drill down into a specific child node?

A.Parse Delimited Text
B.Parse JSON
C.Parse XML with XPath
D.Parse Name-Value pair
AnswerC

XPath addresses the nested structure directly by navigating the XML hierarchy with path expressions, selecting a specific child node without manual iteration. This satisfies the stem's requirement to drill down into a particular node within a nested response, unlike flat parsing approaches that cannot target depth precisely.

Why this answer

XPath is the standard query language for navigating XML documents and drilling into specific child nodes by path expression (e.g., /root/parent/child). ServiceNow's 'Parse XML with XPath' step is purpose-built for extracting values from nested XML API responses. It handles namespaces, attributes, and hierarchical traversal that flat parsers cannot.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests whether candidates pick a generic parser (JSON, delimited, name-value) for XML data instead of the XPath-aware XML parser.

How to eliminate wrong answers

Option A is wrong because Parse Delimited Text handles CSV/pipe-delimited flat data, not hierarchical XML. Option B is wrong because Parse JSON parses JSON structures, not XML — using it on XML would fail or produce garbage. Option D is wrong because Parse Name-Value pair handles flat key=value strings (like HTTP headers or query strings), not nested XML trees.

30
MCQhard

If you have a pattern that identifies a CI but fails to update its attribute, which log should you check first?

A.System Log
B.Discovery Pattern Log
C.CMDB Health Dashboard
D.MID Server Log
E.Node Log
AnswerB

The Discovery Pattern Log records each pattern step's execution, including the values returned and any attribute-mapping errors. When a CI is identified but an attribute is not written, this log exposes the failing step, unlike horizontal discovery logs that only report overall probe outcomes.

Why this answer

The Discovery Pattern Log provides the most detail regarding step execution and attribute assignment failures.

31
Multi-Selectmedium

Which THREE of the following are valid ways to handle command output in a pattern?

Select 3 answers
A.Parse it with regex
B.Use it in a condition
C.Delete it from the MID Server
D.Email it to the admin
E.Assign it to a variable
AnswersA, B, E

Regex parsing extracts structured attribute values from raw command output, feeding them into the pattern's CI population logic. It satisfies the requirement for a valid output-handling method by transforming unstructured text into discrete fields the identification and exploration steps can consume.

Why this answer

Option A is correct because regex parsing is a standard mechanism for extracting structured values from raw command output within a pattern, allowing specific fields to be captured for later use. Option B is correct because command output can be evaluated in a condition (e.g., checking for a specific string or exit status) to control the pattern's execution flow. Option E is correct because assigning the output to a variable lets subsequent pattern steps reference and reuse that data, which is a core capability of pattern-based orchestration.

Option C is not a valid handling method since deleting output from the MID Server is not a pattern operation and the MID Server does not store command output in that manner. Option D is not a pattern-level handling mechanism; emailing output to an admin is an external notification action, not a way to process command output inside a pattern.

32
MCQmedium

Which functionality allows a pattern to call another pattern, thereby promoting modularity and reuse of common identification logic?

A.Pattern Inheritance
B.Call Pattern step
C.Pattern Extension
D.Global Function Library
AnswerB

The Call Pattern step invokes another pattern from within the current one, so shared identification logic lives in a single reusable pattern rather than being duplicated. This directly delivers the modularity and reuse the stem requires.

Why this answer

The 'Call Pattern' step in ServiceNow Pattern Designer allows one pattern to invoke another pattern as a subroutine, passing inputs and receiving outputs. This enables modular design where common identification logic (e.g., Linux hostname parsing) is defined once and reused across multiple patterns.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests whether candidates confuse Pattern Inheritance/Extension (structural reuse) with Call Pattern (runtime invocation), leading them to pick inheritance for modular subroutine behavior.

How to eliminate wrong answers

Option A is wrong because Pattern Inheritance is about a pattern extending a base pattern's steps, not dynamically invoking another pattern at runtime. Option C is wrong because Pattern Extension is a related but distinct concept (extending OOB patterns) and doesn't provide the callable subroutine behavior. Option D is wrong because the Global Function Library provides reusable JavaScript functions, not full pattern invocation with its own step execution context.

33
MCQhard

During pattern debugging, you notice that a specific step is failing to run on a MID Server. You want to see the exact input and output of that step. Where should you look?

A.Discovery Log
B.ECC Queue
C.MID Server Agent Log
D.Pattern Designer Debugger
AnswerD

The Pattern Designer Debugger executes a pattern step-by-step on the MID Server, exposing each step's exact input and output values. This satisfies the requirement to inspect the specific failing step's data, which the standard pattern log does not capture.

Why this answer

The Debugging mode in Pattern Designer provides an 'Input/Output' tab that captures the raw data for every step executed.

34
MCQhard

If a pattern step fails due to a timeout, where should you investigate the specific output of the command that was executed just before the failure occurred?

A.Discovery Status record
B.Pattern Debugger Output
C.MID Server Log
D.Discovery Dashboard
AnswerB

Pattern Debugger Output captures each step's raw command execution, including stdout and stderr, so you can inspect the exact output produced immediately before the timeout. This satisfies the stem's requirement to investigate the specific preceding command's output, which the Discovery log alone does not expose at step-level granularity.

Why this answer

The 'Debug' session output in the Pattern Designer records the output of every step, including those immediately preceding a failure.

35
MCQmedium

A pattern designer is testing a new pattern for a network switch. The pattern includes a step that runs a command and parses the output. During testing, the designer notices that a specific attribute is not being populated even though the command output contains the expected value. The parsing step uses a regular expression. What is the most likely cause?

A.The MID Server does not have the necessary credentials to run the command.
B.The attribute is not defined in the CI class.
C.The step is marked as 'Continue on error' and is silently failing.
D.The regular expression does not match the output due to case sensitivity or whitespace differences.
AnswerD

Regular expressions are case-sensitive by default and may fail if the output has extra spaces or different formatting. This is a common issue when parsing command output. The pattern designer should test the regex against actual output and adjust for case insensitivity or whitespace. This is the most likely cause of the attribute not being populated.

Why this answer

When a regular expression fails to match, the attribute remains unpopulated. Common reasons include case sensitivity, unexpected whitespace, or slight format variations. The other options would typically cause more obvious failures, such as command failure or pattern validation errors, rather than silent non-population.

Exam trap

The trap here is overlooking the subtle differences in command output that can cause regex mismatches, such as extra spaces or capitalization.

36
MCQmedium

When a pattern step needs to run as root, where is this configuration set?

A.In the step properties, 'Run as' field.
B.In the MID Server property.
C.In the Discovery Schedule.
D.This cannot be done in a pattern.
AnswerA

The 'Run as' field on the individual pattern step specifies the OS user account under which that command executes, so setting it to root satisfies the requirement for privileged execution without elevating the whole pattern.

Why this answer

The 'Run as' field in the step properties allows you to specify the execution context (e.g., sudo/root).

37
Multi-Selecthard

You are designing a pattern to discover virtualization hosts and their guest virtual machines. You need the pattern to correctly associate each guest VM with its parent host so the CMDB reflects the containment relationship. Which TWO pattern design practices support building this relationship correctly? (Choose two.)

Select 2 answers
A.Create a separate pattern for guest VMs that runs independently and sets the parent host as a static value in each guest record.
B.Configure the guest steps to run before the host steps so the guest CI exists first and the host can adopt it afterward.
C.Rely on the identification engine to infer the host-guest relationship automatically from matching serial numbers on both CIs.
D.Use a 'Set Relation' step in the guest section to define the parent-child link between the guest CI and the host CI using the captured host identifier.
E.Capture the host's identifying value during host processing and store it as a variable that the guest VM steps can reference to set the parent relationship.
AnswersD, E

A Set Relation step explicitly defines a relationship between the CI being built and another CI. Referencing the previously captured host identifier ensures the guest is linked to the correct parent. This is the designed construct for expressing containment during pattern execution, so relationships appear in the CMDB after identification and reconciliation.

Why this answer

Building host-guest containment requires capturing the host's identifier in a variable and then using a Set Relation step in the guest section to link each guest to that parent. Inference from serial numbers, static parent values, or reversing execution order cannot produce correct dynamic relationships, so those approaches fail in a multi-host environment.

Exam trap

The trap here is expecting the identification engine to derive virtualization containment automatically, when relationships must be explicitly declared in the pattern.

38
MCQhard

When using 'Parse JSON' for a complex structure, how do you access a nested property named 'id' inside an array 'servers'?

A.servers[0].id
B.servers->id
C.servers.id
D.id(servers)
AnswerA

Dot notation with an array index, `servers[0].id`, traverses the parsed JSON object to the first element of the `servers` array, then reads its `id` property. This satisfies the stem's requirement to reach a nested property inside an array, since Parse JSON exposes the structure as addressable objects and arrays.

Why this answer

To access a nested property named 'id' inside an array 'servers' when using 'Parse JSON', you use the syntax servers[0].id. This is standard JSONPath-like notation where the array name is followed by the index in brackets, then a dot and the property name. This correctly retrieves the 'id' value from the first element of the 'servers' array.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests the correct syntax for accessing array elements in JSON, tricking candidates into using dot notation without an index or invalid arrow notation.

How to eliminate wrong answers

Option B is wrong because 'servers->id' uses arrow notation, which is not valid for accessing array elements in JSON parsing within ServiceNow. Option C is wrong because 'servers.id' would attempt to access a property 'id' directly on the 'servers' object, but 'servers' is an array, so this would not work without an index. Option D is wrong because 'id(servers)' is not a valid syntax for accessing nested properties in JSON.

39
MCQeasy

Which type of credential is primarily used by Discovery patterns to execute commands on a Linux-based target via SSH?

A.SSH Credentials
B.API Key
C.SNMP Community String
D.Windows Credentials
AnswerA

Discovery connects to Linux targets over SSH, so it requires SSH credentials — typically a username with either a password or private key. These authenticate the MID Server before patterns run commands such as uname or cat /etc/os-release.

Why this answer

SSH Credentials are the credential type used by Discovery patterns to authenticate and execute commands on Linux-based targets over SSH (port 22). ServiceNow stores SSH credentials (username, password, or private key) in the Credentials table and associates them with the appropriate Discovery schedule or MID server. When a pattern runs against a Linux host, it retrieves the SSH credential to establish the SSH session and run commands like 'uname -a' or 'cat /etc/os-release'.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests the mapping between credential type and target OS/protocol — candidates pick 'Windows Credentials' or 'SNMP' because they recognize those as Discovery credential types, but the question specifies Linux via SSH, which requires SSH Credentials.

How to eliminate wrong answers

Option B is wrong because API Keys are used for REST/SOAP API authentication to cloud services or applications, not for SSH command execution on Linux hosts. Option C is wrong because SNMP Community Strings are used for network device discovery (routers, switches, printers) via SNMP on UDP 161, not for SSH access to Linux servers. Option D is wrong because Windows Credentials (WMI, PowerShell, SMB) are used for Windows target discovery, not Linux — Linux targets require SSH or optionally SNMP for network-level data.

40
MCQmedium

Which of the following is the correct order of operations in a horizontal pattern?

A.Connection, Identification, Extension
B.Identification, Extension, Connection
C.Extension, Identification, Connection
D.Identification, Connection, Extension
AnswerD

Horizontal discovery begins by identifying the device via probes and sensors, then establishes a connection using the appropriate credentials, and finally extends into the device to collect configuration data. This sequence satisfies the stem's requirement for the correct order of operations, since extension cannot occur before identification and connection succeed.

Why this answer

The standard flow is Identification, then Connection, then Extension sections.

41
MCQmedium

You are designing a Discovery pattern that runs a command on a Linux host and then parses the output to populate the 'CPU core count' field on the CI. The command's output contains multiple lines, and the relevant number appears on the same line as the label 'CPU(s):'. Which Pattern Designer step configuration should you use to reliably extract the numeric value?

A.Use a 'Get Next' step to iterate through lines until one contains 'CPU(s):' and then write that entire line to the CI.
B.Use a 'Parse Variable' step with a regular expression that captures the digits after 'CPU(s):'.
C.Use a 'Parse Table' step configured with the column header 'CPU(s):' and a single row.
D.Use a 'Set Parameter' step with a static value of 'CPU(s):' and reference the line index.
AnswerB

A Parse Variable step applies a regex to the prior command output, and the capture group isolates the numeric value regardless of surrounding text. This is the standard, robust approach when the value is embedded in a line with a stable label, and it avoids brittle line-position assumptions that break when output formatting changes across OS versions.

Why this answer

When a value is embedded in a labeled line, a regex-based Parse Variable step is the reliable extraction method because it isolates the capture group independent of line position or surrounding whitespace. Static assignment, table parsing, and whole-line iteration each fail to produce a clean numeric value for the CI attribute in this scenario.

Exam trap

The trap here is assuming any step that can read command output can also extract a substring, when only a regex-capable parse step isolates the needed digits.

42
MCQeasy

Which action must you perform before a pattern can be used in Discovery?

A.Run a full scan.
B.Publish the pattern.
C.Add it to an Update Set.
D.Clear the MID Server cache.
AnswerB

Publishing transitions the pattern from Draft to Active, which is the prerequisite state that makes it selectable by Discovery. An unpublished pattern cannot be referenced by a discovery schedule, so publishing must precede any use.

Why this answer

Patterns must be published to be active in the production environment.

43
MCQhard

What is the difference between 'Identification' and 'Connection' in terms of CI ownership?

A.There is no difference.
B.Connection creates the CI; Identification sets attributes.
C.They are the same.
D.Identification handles the primary CI; Connection links it to dependent CIs.
AnswerD

Identification probes create or update the primary CI record itself, whereas Connection probes establish the relationship links between that CI and its dependent CIs. This division satisfies the stem's ownership question: identification owns the CI, connection owns its dependencies.

Why this answer

The Identification section identifies the 'primary' CI, while Connection links it to others.

44
Multi-Selecthard

Which TWO of the following steps are required when adding a new CI relationship in a pattern?

Select 2 answers
A.Add 'Modify Attribute' step
B.Add 'Define Relationship' step
C.Add 'Related CI' step
D.Add 'Validate' step
E.Add 'Delete CI' step
AnswersB, C

The 'Define Relationship' step specifies the relationship type and direction between the pattern's CIs, which is mandatory for the pattern to generate the correct CMDB relationship records during discovery. Without it, no relationship type is declared.

Why this answer

You need to identify the related CI and then define the relationship between them.

45
Multi-Selecthard

Which THREE factors influence the successful identification of a CI in a pattern?

Select 3 answers
A.Pattern execution speed
B.Correct identification rules in the CI Class Manager
C.Correct CI class selection
D.Accurate attribute mapping in the pattern
E.MID Server memory
AnswersB, C, D

Rules determine how the CI is matched.

Why this answer

Identification rules, attribute mapping, and valid CMDB class structure are critical.

46
MCQhard

You are writing a pattern that requires data from a REST API endpoint that returns a nested JSON array. Which step type is most appropriate to extract a specific attribute from an object located at the third index of the nested array?

A.Table Transformation
B.Parse JSON
C.Set Variable
D.Regex Extraction
AnswerB

Parse JSON extracts values from nested JSON structures using path expressions, so an attribute at the third index of a nested array can be targeted precisely. Other step types, such as REST or JDBC, retrieve data but cannot navigate array indices within the returned payload.

Why this answer

The Parse JSON step type is most appropriate to extract a specific attribute from an object located at the third index of a nested JSON array. This step is designed to parse JSON data and allows you to navigate through arrays and objects using JSONPath expressions.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests the choice between Parse JSON and Regex Extraction, causing candidates to pick regex for structured data when Parse JSON is more appropriate.

How to eliminate wrong answers

Option A is wrong because Table Transformation is used to transform data into a table format, not to extract specific attributes from JSON. Option C is wrong because Set Variable is used to assign values to variables, not to parse JSON. Option D is wrong because Regex Extraction is used for pattern matching in text, not for structured JSON parsing.

47
MCQmedium

You are designing a Discovery pattern for a network switch. You need to create a CI Relationship between the switch and its connected devices. In the Pattern Designer, which step type should you use to create this relationship?

A.Create Relation
B.Parse Variable
C.Create CI
D.Identification
AnswerA

The Create Relation step is specifically designed to establish relationships between CIs in the CMDB. In this scenario, you would use it to define the connection between the switch and its connected devices, specifying the relationship type and the two CIs involved. This step ensures the relationship is recorded properly in the CMDB.

Why this answer

To create a CI Relationship during Discovery, you must use the Create Relation step. This step allows you to define the relationship type and link the two CIs. Other steps like Create CI, Parse Variable, and Identification serve different purposes and cannot establish relationships.

Exam trap

The trap here is confusing the Create CI step with the Create Relation step, assuming that creating a CI automatically creates its relationships.

48
Multi-Selectmedium

Which THREE of the following are common parsing strategies used in pattern design?

Select 3 answers
A.Regex
B.SQL Queries
C.JSON
D.Java Class
E.Delimited text
AnswersA, C, E

Regex is a core parsing strategy in pattern design, matching event fields against defined regular-expression patterns to extract values. It complements other strategies such as delimiters and key-value pairs, and is essential where field content follows predictable textual structures.

Why this answer

Regex (A) is a common parsing strategy because regular expressions define character-level patterns that are matched against input text to extract or validate fields. JSON (C) is a common parsing strategy because its structured key-value and array syntax is parsed by dedicated JSON parsers to navigate and extract data reliably. Delimited text (E) is a common parsing strategy because records and fields separated by delimiters such as commas, tabs, or pipes are split and tokenized to obtain individual values.

SQL Queries (B) are a data retrieval and manipulation language, not a parsing strategy for pattern design, and Java Class (D) is a programming construct or data model, not a parsing approach.

49
MCQhard

When a pattern step executes an external script (e.g., Python), how can you ensure the pattern waits for the script to finish before proceeding to the next step?

A.Use an asynchronous flag in the script
B.The pattern automatically waits for the step process to return
C.Configure the MID Server to process sequentially
D.Add a Wait step
AnswerB

The pattern engine blocks on the step process and resumes only when that process returns, so no explicit polling or sleep is needed. This satisfies the requirement that execution pauses until the external script finishes before the next step runs.

Why this answer

ServiceNow patterns are synchronous by default; the pattern engine waits for each step to return a status (Success/Failure) before moving to the next step.

50
MCQeasy

What is the benefit of using an Extension section in a pattern?

A.To bypass the need for identification.
B.To allow for modularity and reuse of logic.
C.To increase the execution speed.
D.To automatically update CMDB schemas.
AnswerB

Extension sections let common parsing or identification logic be defined once and called from multiple patterns, so changes propagate rather than being duplicated. This satisfies the stem's modularity requirement by promoting reuse of shared logic across patterns.

Why this answer

Extension sections promote code reusability across multiple patterns.

51
MCQmedium

What is the purpose of the 'Table' attribute in the 'Identification' step?

A.To specify the target CMDB class.
B.To set the CI relationship type.
C.To filter the input data.
D.To name the variable.
AnswerA

The Table attribute names the CMDB table that discovery populates, so the Identification step knows which class to query for matching records. It satisfies the stem's requirement by defining the target CMDB class, ensuring identification rules and reconciliation run against the correct table rather than a default or unrelated class.

Why this answer

The 'Table' attribute defines which CMDB class the identified CI belongs to.

52
MCQeasy

A pattern you authored is producing CI records, but a required attribute named 'serial_number' is sometimes populated and sometimes left blank depending on the device model. You want the pattern to attempt one command and, if it yields no serial number, automatically try a fallback command before finalizing the CI. Which pattern design construct should you use?

A.Mark the primary command step as 'Continue on error' so the pattern proceeds even when the serial is missing.
B.Add a conditional step that evaluates whether the serial variable is empty and, if so, executes an alternative command step.
C.Create a second pattern for the fallback command and rely on the identification engine to merge results from both patterns.
D.Set the serial_number attribute as a 'dependent' attribute so the platform automatically queries the device again when it is blank.
AnswerB

Conditional logic within a pattern allows branching based on a variable's value, so the pattern can run a fallback command only when the primary result is empty. This keeps a single pattern handling multiple device behaviors without duplicating the entire pattern, and it ensures the CI receives a serial number when any supported command succeeds.

Why this answer

Handling model-specific attribute availability is done with conditional branching inside the pattern: evaluate whether the parsed variable is empty and, if so, run an alternate command. Continue-on-error, separate patterns, and nonexistent dependent-attribute retries do not provide the required fallback behavior for a blank but successful result.

Exam trap

The trap here is confusing 'Continue on error' (step failure handling) with conditional branching for empty but successful command results.

53
MCQmedium

What is the purpose of the 'Pre-sensor' script?

A.To stop a pattern from running.
B.To perform custom logic before the payload is processed.
C.To reset the MID server cache.
D.To run commands on the target device.
AnswerB

The Pre-sensor script executes custom JavaScript before the payload is processed, allowing manipulation or enrichment of collected data prior to pattern evaluation. This satisfies the requirement to run custom logic ahead of processing, so downstream steps receive adjusted input.

Why this answer

Pre-sensor scripts allow developers to manipulate data before it is processed by the identification engine.

54
MCQhard

Which of the following correctly describes the use of the 'Pattern Designer's' 'Search' feature?

A.It searches for available MID servers.
B.It searches for CIs in the CMDB.
C.It searches for patterns in the store.
D.It allows locating specific steps or variables in the pattern.
AnswerD

The Search feature queries pattern contents by step name, variable, or activity, letting developers jump directly to a specific element rather than scrolling the canvas. This satisfies the need to locate particular steps or variables quickly within large, complex patterns during debugging or editing.

Why this answer

The search feature allows you to find specific steps or configurations within a large, complex pattern.

55
Multi-Selectmedium

Which TWO of the following are key components of the Pattern Designer?

Select 2 answers
A.Update Set Manager
B.Debug panel
C.CMDB Health dashboard
D.Step palette
E.CI Class Manager
AnswersB, D

The Debug panel runs a pattern against a target CI and displays each step's raw output, errors and parsed results. This satisfies the stem's requirement for a key Pattern Designer component by enabling step-level troubleshooting during pattern development and validation.

Why this answer

The designer consists of the step palette and the execution/debug environment.

56
MCQhard

When using the 'Parse Delimited' step, what is the 'Separator' attribute used for?

A.To define the row identifier.
B.To define the character that splits the data fields.
C.To identify the end of the file.
D.To escape special characters.
AnswerB

The Separator attribute specifies the delimiter character, such as a comma or pipe, that marks boundaries between fields in the delimited input. The Parse Delimited step uses it to split each row into individual field values for downstream mapping.

Why this answer

The separator defines the character (e.g., comma, pipe) that splits the columns in the text.

57
MCQeasy

What does the 'Debug' mode in the Pattern Designer require to function?

A.A new CI class.
B.A valid user session.
C.A selected Discovery status record (node).
D.The MID Server to be in debug mode.
AnswerC

Debug mode runs against a specific Discovery status record, so a node must be selected for the pattern's execution trace to display. Without that selected status record, the debugger has no active discovery context to step through.

Why this answer

Debug mode requires a target node to execute the pattern against, which is provided by a Discovery status record.

58
MCQmedium

What is the result of using a 'Delimiter' of '\n' in a 'Parse Delimited' step?

A.It splits the text into separate lines (rows).
B.It splits the text into individual characters.
C.It removes all spaces.
D.It converts the text to JSON.
AnswerA

The delimiter defines the character marking each field boundary. Specifying the newline escape sequence '\n' makes the parser treat every line break as a row separator, so the input text is split into individual lines, each becoming a distinct row.

Why this answer

The '\n' (newline) delimiter splits the text into separate rows.

59
MCQmedium

You want to run a command only if a previous step was successful. How is this configured?

A.This is not possible.
B.Using a 'Pre-condition' on the step.
C.Using an Extension section.
D.Using a 'Wait' step.
AnswerB

Step conditions allow for logic-based execution flow.

Why this answer

You can use the 'Condition' field on a step to check the state of previous steps.

60
Multi-Selectmedium

Which TWO of the following are considered 'best practices' for pattern design?

Select 2 answers
A.Add comments to steps to describe logic
B.Hardcode all credentials in the pattern
C.Use extension sections for modular logic
D.Create one giant section for everything
E.Never use variables
AnswersA, C

Commenting steps documents the logic behind each operation, so other developers can maintain and troubleshoot the pattern without reverse-engineering it. This directly satisfies the maintainability and readability best practice for pattern design, reducing the risk of errors when patterns are revised or reused across discovery schedules.

Why this answer

Keeping patterns modular and documenting the steps are essential practices.

61
MCQmedium

You need to store the result of a WMI query in a variable that can be accessed across different sections of the pattern. Which step type should you use?

A.Parse JSON
B.Table Transformation
C.Set Variable
D.Registry Extraction
AnswerC

Set Variable writes a value into a pattern variable that persists across sections, unlike step-local outputs. This satisfies the requirement to store the WMI query result so later sections of the same pattern can reference it.

Why this answer

The 'Set Variable' step type is used to store a value, such as the result of a WMI query, into a variable that can be accessed across different sections of the pattern.

Exam trap

SERVICENOW-CIS-DISCOVERY often tests the confusion between step types, leading candidates to choose parsing or transformation steps instead of variable storage.

How to eliminate wrong answers

Option A is wrong because Parse JSON is for parsing JSON data, not storing WMI results. Option B is wrong because Table Transformation is for transforming data between tables. Option D is wrong because Registry Extraction is for extracting registry data, not general variable storage.

62
MCQmedium

A discovery pattern must ensure that a CI is only created (not updated) when the identification process cannot find an existing record. The pattern currently has an Identification step that runs successfully. You need to configure the next step to execute only if the CI was not found. Which condition should you use in the step's 'Run if' condition?

A.Set the condition to '${ci.sys_id}' != null
B.Set the condition to '${identification.status}' == 'found'
C.Set the condition to '${ci.sys_id}' is not empty
D.Set the condition to '${ci.sys_id}' is empty
AnswerD

When the Identification step fails to find a matching CI, the pattern's context variable for the CI's sys_id is empty. Using the condition '${ci.sys_id}' is empty ensures the step runs only when no existing CI was identified, which is exactly what is needed to create a new CI only when none exists.

Why this answer

The Identification step populates the pattern's CI context with the sys_id of a matched CI. If no match is found, that sys_id remains empty. Therefore, to run a step only when no CI exists, the condition must check that the sys_id is empty.

This prevents duplicate CI creation and ensures the pattern follows the intended create-only logic.

Exam trap

The trap here is assuming that a dedicated status variable exists for identification, when the actual indicator is the emptiness of the CI sys_id in the pattern context.

63
MCQeasy

Which UI tool is used to visualize the pattern execution flow?

A.Discovery Dashboard
B.Pattern Designer
C.Service Mapping view
D.CI Class Manager
AnswerB

Pattern Designer renders the execution flow of a pattern graphically, showing each step, the activities performed and their outcomes. This directly satisfies the requirement to visualise how a pattern runs, which the Discovery pattern log or configuration records alone cannot depict.

Why this answer

The Pattern Designer includes a graphical interface that displays the steps and flow of the pattern.

64
MCQmedium

A pattern includes a step that runs a command to retrieve a list of installed software. The command output is large and needs to be processed to create multiple CI records. Which pattern step type should be used to iterate over each line of output and create a CI for each?

A.Parallel step
B.For each step
C.Conditional step
D.Parse step
AnswerB

A for each step iterates over a collection, such as lines of command output, and executes a set of steps for each item. This is perfect for processing multiple entries and creating multiple CIs. It allows dynamic creation of records based on the data. This step type is designed for such repetitive tasks within a pattern.

Why this answer

The for each step is specifically designed to iterate over a collection of items and execute a set of steps for each one. This allows the pattern to process each line of software output and create a CI for each entry. Other step types do not provide iteration capabilities.

Exam trap

The trap here is confusing the for each step with the parallel step, assuming that parallel execution also handles iteration over collections.

65
MCQhard

What happens if a pattern execution encounters an error in a step that is marked as 'Continue on error'?

A.The error is logged, and the pattern restarts.
B.The entire pattern execution stops.
C.The pattern proceeds to the next step in the sequence.
D.The pattern skips to the next section.
AnswerC

'Continue on error' overrides the default abort behaviour, so the pattern engine logs the failure and advances to the subsequent step rather than halting the whole execution. This satisfies the stem's question about the outcome of an error in such a step.

Why this answer

The 'Continue on error' flag allows the discovery to proceed to the next step despite failure.

66
MCQmedium

You are building a ServiceNow Discovery pattern for a Linux server that hosts multiple network interfaces. During pattern execution, you need to populate the CI's 'IP Address' field with the IP address of the interface that has the default route. The pattern step that runs the command 'ip route get 8.8.8.8' returns output similar to: '8.8.8.8 via 192.168.1.1 dev eth0 src 192.168.1.100'. You want to reliably extract only the source IP (192.168.1.100) and assign it to the CI attribute. Which pattern step type and configuration should you use?

A.Use a 'Parse' step with a regex that captures the entire line, then assign the whole line to the CI attribute.
B.Use a 'Command' step to run 'hostname -I' and assign its output directly to the CI attribute.
C.Use a 'Condition' step to check if the output contains 'src', then use a 'Set Attribute' step to assign the first IP found in the output.
D.Use a 'Parse' step with a regular expression that captures the 'src' IP, then map the captured group to the CI attribute.
AnswerD

This is correct because a Parse step with a regex targeting the 'src' token extracts the exact IP from the command output. The captured group can be mapped to the CI attribute in the pattern's data model, ensuring only the desired value is stored. This approach is robust and handles variations in other parts of the output.

Why this answer

The correct solution extracts the source IP from the command output using a Parse step with a regex that captures the value after 'src'. This ensures the CI attribute receives only the valid IP address associated with the default route. Other options either assign incorrect data or fail to isolate the required token, leading to inaccurate CI records.

Exam trap

The trap here is assuming that any IP in the command output is the correct one, rather than specifically extracting the source IP tied to the default route.

67
MCQmedium

If you need to extend an existing pattern for a network switch, which action ensures that your custom logic is executed during the Discovery process while maintaining the original functionality?

A.Create an Extension Section
B.Override the CI Class
C.Create a new Discovery Schedule
D.Modify the Base Pattern directly
AnswerA

An Extension Section appends custom logic to an existing pattern without altering the base steps, so the original functionality is preserved while your code runs during Discovery. This satisfies the constraint of extending the network switch pattern while keeping its shipped behaviour intact.

Why this answer

The 'Extension Section' is the designated feature for adding custom logic to an existing pattern without modifying the base, OOB pattern steps.

68
MCQmedium

You are modifying a pattern and need to extract a specific attribute from a JSON response returned by an API. Which step type is most appropriate for this task?

A.Parse Variable
B.Set Parameter
C.Regex Extract
D.Parse JSON
AnswerD

Parse JSON extracts named attributes from a JSON payload returned by an API, satisfying the requirement to pull a specific attribute. It converts the response into structured values usable by later pattern steps, unlike simple string or regex operations.

Why this answer

The Parse JSON step type is purpose-built to parse a JSON payload and extract specific attributes by navigating the JSON structure using JSONPath or dot notation. When a pattern receives an API response in JSON format, Parse JSON lets you map individual fields (e.g., $.data.id) into variables that subsequent steps can use. This is the correct and most efficient way to pull a specific attribute from a JSON response.

Exam trap

The trap here is confusing Parse JSON with Regex Extract; candidates who see 'extract a specific attribute' may default to regex, but the exam expects recognition that structured JSON requires the dedicated Parse JSON step.

How to eliminate wrong answers

Option A is wrong because Parse Variable is used to parse a string variable into structured components (such as splitting a delimited string), not to interpret JSON structure. Option B is wrong because Set Parameter is used to assign or modify a value in the pattern's context, not to extract data from a JSON payload. Option C is wrong because Regex Extract is used to pull substrings from text using regular expressions; while it can technically extract from JSON text, it is not the appropriate or maintainable step type for structured JSON parsing.

Ready to test yourself?

Try a timed practice session using only Discovery Pattern Design questions.