In Workflows YAML, expressions must be wrapped in ${} to be evaluated.
Step 2: Verify other parts
Indentation is correct, http.get is valid, and URL is quoted properly.
Final Answer:
Missing ${} around the expression in return -> Option D
Quick Check:
Expressions need ${} to evaluate in return [OK]
Hint: Wrap expressions in ${} to evaluate in workflow YAML [OK]
Common Mistakes:
Forgetting ${} around expressions
Misaligning YAML indentation
Assuming http.get is invalid
Not quoting URLs
5. You want to create a workflow that calls two APIs in sequence, but only calls the second API if the first returns status "ok". Which workflow feature helps you implement this conditional logic?
hard
A. Using switch or if steps to check the first API's response
B. Using parallel steps to call both APIs at the same time
C. Using retry to repeat the first API call until status is ok
D. Using return to stop the workflow after the first call
Solution
Step 1: Understand conditional execution in workflows
Workflows support switch or if steps to decide which steps run based on conditions.
Step 2: Match the requirement
To call the second API only if the first returns "ok", use if or switch to check the first response before proceeding.
Final Answer:
Using switch or if steps to check the first API's response -> Option A
Quick Check:
Conditional steps use if/switch to control flow [OK]
Hint: Use if or switch to run steps conditionally in workflows [OK]
Common Mistakes:
Using parallel steps which run both APIs simultaneously
Using retry which repeats calls but doesn't conditionally run next
Using return which ends workflow early
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.