Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
some_gyy
3 months, 3 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 1 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 ...