XSIAM-ENGINEER practice question 8 of 15

A sub-playbook is configured to loop with a For Each Input. The following inputs are given to the sub- playbook: Input x: W,X,Y,Z Input y: a,b,c,d Input z: 9 Which inputs will be used for the second iteration of the loop?

Full set: 59 questions
Answer options
A: a,b,c,d
B: X,b,9 Correct answer
C: X,b
D: X,b,c
Correct Answer:
B. X,b,9
Explanation

When a sub-playbook is configured to loop with the "For Each Input" option, it iterates through array inputs in parallel. For each iteration, it takes the element at the corresponding index from each input array. If an input is a single value instead of an array, that same single value is used for every iteration of the loop. In this scenario, for the second iteration, the sub-playbook will take the second element from Input x (which is 'X'), the second element from Input y (which is 'b'), and the single value provided for Input z (which is '9').

Why Incorrect

A. a,b,c,d: This is the entire array for Input y. The loop processes one element per iteration, not the whole array at once.
C. X,b: This option is incomplete as it omits the value for Input z, which is a required input and is used in every iteration.
D. X,b,c: This option incorrectly combines the second elements from Input x and Input y with the third element from Input y.

References

1. Palo Alto Networks, Cortex XSOAR 8 Administrator's Guide: In the section on "Sub-playbook Loops," the documentation states, "If you have multiple array inputs, the sub-playbook runs for each item in the array... In the second run, it uses the second IP and second domain, and so on." It also clarifies, "If you have an array input and a single value input, the sub-playbook runs for each item in the array, and uses the single value in each run." This directly supports the logic that the second iteration uses X, b, and 9. (Reference: docs.paloaltonetworks.com/cortex/cortex-xsoar/8/cortex-xsoar-administrators-guide/playbooks/playbook-tasks/sub-playbook-loops)

Scroll to Top