api.rules.wasExecuted()
. If the wasExecuted
function consumes a string containing the Rule ID, it returns true
if the Rule has already run (and otherwise, returns false
).
This is a helpful tool to prevent your logic from running twice. As soon as you disable the referenced Rule, the function returns false
and the business logic now executes in the Action.
api.rules.wasExecuted()
function, refer to Actions Triggers: post-login - API Object.
// YOUR CODE HERE
comment in the Action. It’s likely that this code is not adapted for the Actions programming model.
callback
function, it is recommended to use api.access.deny
for errors, or just return
in successful cases.