Which solution should be used to meet this requirement?

An Adobe Commerce Architect needs to log the result of a ServiceClass : : ge-Dara method execution after all plugins have executed. The method is public, and there are a few plugins declared for this method. Among those plugins are after and around types, and all have sortOrder specified.

Which solution should be used to meet this requirement?
A . Declare a new plugin with the sortOrder value higher than the highest declared plugin sortOrder and implement afterGetData method.
B. Declare a new plugin with the sortOrder value lower than the lowest declared plugin sortOrder and implement aroundGetData method
C. Declare a new plugin with the sortOrder value higher than the highest declared plugin sortOrder and implement aroundGetData method

Answer: C

Explanation:

The aroundGetData method is the best option for this requirement because it provides the flexibility to log the result of the ServiceClass::getData method execution after all plugins have executed. This is because the aroundGetData method is executed before and after the method execution, allowing the Adobe Commerce Architect to log the result of the method execution after all plugins have executed.

Reference: https://docs.adobe.com/content/help/en/experience-manager-65/developing/extending/plugins-and-events/events-and-listeners/lifecycle-events.html

Latest AD0-E718 Dumps Valid Version with 50 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments