You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have Trigger Handlers on two different objects, A and B. Handler A has DML on object B. When processing handler for Object A, rflib_TriggerManager.ACTIVE_HANDLER is set. When the DML on object B is executed, the rflib_TriggerManager
.runHandlers script skips the handler.run line since ACTIVE_HANDLER is not null and goes to handler.onConsecutiveRun.
Expected behavior
Our expectation is that onConsecutiveRun logic would be written to as actions to take on consecutive runs of the same handler, not a completely unrelated one. I would expect the ACTIVE_HANDLER to be a Map<string, rflib_TriggerHandler> where the string index is the handler class name.
Screenshots
If applicable, add screenshots to help explain your problem, i.e. Chrome Dev Console.
Desktop (please complete the following information):
OS: Windows
Browser n/a
Version n/a
Additional context
I understand that we could rewrite the onConsecutiveRun methods of all our handlers to run the functional logic but this would seem to reduce the value of having the framework in place. I am not sure if there is a value proposition for treating handlers across any object/operation as consecutive.
The text was updated successfully, but these errors were encountered:
@mikbranchaud Thanks for submitting this issue. It sounds like a legit bug. Let me do a closer review over the next couple weeks and once confirmed, work on a fix. I will probably tag you on the PR.
Describe the bug
I have Trigger Handlers on two different objects, A and B. Handler A has DML on object B. When processing handler for Object A, rflib_TriggerManager.ACTIVE_HANDLER is set. When the DML on object B is executed, the rflib_TriggerManager
.runHandlers script skips the handler.run line since ACTIVE_HANDLER is not null and goes to handler.onConsecutiveRun.
Version
2.1. No
Code Snippets
private static rflib_TriggerHandler ACTIVE_HANDLER;
private static void runHandlers(rflib_TriggerManager.Args args, List handlers) {
for (TriggerHandlerInfo handlerInfo : handlers) {
rflib_TriggerHandler handler = handlerInfo.handler;
Expected behavior
Our expectation is that onConsecutiveRun logic would be written to as actions to take on consecutive runs of the same handler, not a completely unrelated one. I would expect the ACTIVE_HANDLER to be a Map<string, rflib_TriggerHandler> where the string index is the handler class name.
Screenshots
If applicable, add screenshots to help explain your problem, i.e. Chrome Dev Console.
Desktop (please complete the following information):
Additional context
I understand that we could rewrite the onConsecutiveRun methods of all our handlers to run the functional logic but this would seem to reduce the value of having the framework in place. I am not sure if there is a value proposition for treating handlers across any object/operation as consecutive.
The text was updated successfully, but these errors were encountered: