exam questions

Exam AD0-E716 All Questions

View all questions & answers for the AD0-E716 exam

Exam AD0-E716 topic 1 question 13 discussion

Actual exam question from Adobe's AD0-E716
Question #: 13
Topic #: 1
[All AD0-E716 Questions]

An Adobe Commerce developer has installed a module from a third-party vendor. This module fires a custom event named third_party_event_after and also defines an observer named third_party_event_after_observer that listens to that event. The developer wants to listen to this custom event in their own module but wants to execute their observer's logic after the third_party_event_after_observer observer has finished executing.
What would the developer do to ensure their observer runs after the observer defined by the third-party module?

  • A. Ensure the third-party module is listed in the <sequence> node of the developer's module.xml file.
  • B. Set the sortOrder of the new observer to be less than that of the third-party vendor's observer.
  • C. This is not possible as observers listening to the same event may be invoked in any order.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Nishadpn
1 month ago
Selected Answer: C
Observers listening to the same event may be invoked in any order when that event is dispatched.
upvoted 2 times
...
some_gyy
5 months, 2 weeks ago
I'm curious about this question: https://developer.adobe.com/commerce/php/best-practices/extensions/observers/#do-not-rely-on-invocation-order Your observer should not make assumptions about the order in which it will be invoked nor should it rely on the execution of another observer. Observers listening to the same event may be invoked in any order when that event is dispatched.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago