C_CPE_2409 · Question #62
Which event phases can you use with CAP event handlers by default? Note: There are 3 correct answers to this question.
The correct answer is B. on D. before E. after. In SAP CAP (Cloud Application Programming Model), the event processing lifecycle has three built-in phases: before, on, and after. Handlers registered with before run prior to the main logic (ideal for input validation), on handlers perform the core processing (e.g., replacing…
Question
Which event phases can you use with CAP event handlers by default? Note: There are 3 correct answers to this question.
Options
- Abetween
- Bon
- Cwhile
- Dbefore
- Eafter
How the community answered
(40 responses)- A3% (1)
- B90% (36)
- C8% (3)
Explanation
In SAP CAP (Cloud Application Programming Model), the event processing lifecycle has three built-in phases: before, on, and after. Handlers registered with before run prior to the main logic (ideal for input validation), on handlers perform the core processing (e.g., replacing default CRUD behavior), and after handlers execute once the main logic completes (useful for enriching or transforming results).
"between" (A) and "while" (C) are not valid CAP event phases - they do not exist in the CAP handler registration API (srv.before, srv.on, srv.after). They are plausible-sounding distractors but have no meaning in this context.
Memory tip: Think of the acronym BOA - Before, On, After - like a boa constrictor wrapping around your event from start to finish. If a phase sounds like something other than a clear temporal position (before/during/after), it's likely a distractor.
Topics
Community Discussion
No community discussion yet for this question.