I've noticed a few variations in how event handlers can be defined in FFDL involving the use of certain qualifiers or keywords. For example, I've seen the use of both POST
and ASYNC
keywords:
CREATE HANDLER SupportRequestCreate ASYNC ON /SupportRequest CREATE AS javascript:require ('scripts/SupportEventHandlers').handleSupportRequestCreate();
CREATE HANDLER UserCreate POST ON /FFUser CREATE AS javascript:require ('scripts/UserEventHandlers').handleUserCreate();
Just wondering what are the differences between these keywords (or any other keywords) as it pertains to the behavior of the event handlers?
The keywords you mention specify the timing of event handler execution relative to the triggering event itself. There are three choices:
PRE
-- event handler is triggered synchronously with the event, and execute before the event itself. This is useful for tasks such as validation.POST
-- event handler is triggered synchronously with the event, and executes after the event itself.ASYNC
-- event handler is triggered asynchronously with the event.Hope this helps!