How to view all callbacks if it is not empty?

I am currently developing a scripted decision node that contains the logical and decision making if a user is eligible to authenticate. Currently I need to see all callbacks if it is not empty. How to accomplish this?

How do I see what is stored in the callbacks?

///redacted code
if (callbacks.isEmpty()) {
var infoMessage = "Sorry your account status is: " + status;
var level = fr.TextOutputCallback.INFORMATION;
action = fr.Action.send(
fr.TextOutputCallback(level, infoMessage),
fr.ConfirmationCallback(fr.ConfirmationCallback.INFORMATION, nodeConfig.BUTTONS, 0)
).build();
} else {
var userSelection = callbacks[1];
logger.error("User selected: " + userSelection);
if (userSelection === nodeConfig.OK_ACTION_PRESSED) {
return fr.Action.goTo(“False”).build();
}

There’s a good example here: Scripted decision node API :: ForgeRock Identity Cloud Docs

Depending on which version you have you might need to look at the Legacy tab.

1 Like