Guidewire InsuranceSuite-Developer Question Answer
A developer wrote the following query to create a list of activities sorted by activity pattern, and then returns the first activity for a failed policy bind:

This query uses the sortBy() and firstwhere() methods which are anti-patterns. Where should the developer handle the filtering and sorting to follow best practices?

