@interaction::runInteractionScript
This method will execute a new interpreter session and block it until it completes.
Note: There are two ways to
use this script object method.
Option One:
The context of the calling script is passed into the interaction script being run.
Syntax:
@interaction::runInteractionScript(long notificationID, String interactionScript, ScriptObject scriptObj, UserSessionObject sessionObj, ContentObject contentObj, RecipientObject recipientObj, PhoneScriptObject
phoneObj)
Parameters:
- (Long) notificationID: the ID of the notification
to process.
- (String) interactionScript: the name of the interaction
script to run.
- (ScriptObject) scriptObj: default interpreter script object containing local variables
defined in the script.
- (UserSessionScriptObject) sessionObj: session script object providing information on the notification
session.
- (ContentObject) contentObj: notification content script object containing information
about the notification for the recipient.
- (RecipientObject) recipientObj: recipient script object containing information about the
recipient.
- (PhoneScriptObject) phoneObj: phone script object allowing for interaction with the phone.
Returns:
(Boolean) true if a context
is available for this notification, otherwise false.
Note: context is not available
for terminated events, and the return value may be ignored.
Option Two:
This option needs to be used in conjunction with the retrieveInteractionContext method. First retrieve the interaction context, and then call runInteractionScript.
Syntax:
@interaction::runInteractionScript(ScriptObject scriptObj,
UserSessionObject sessionObj, RecipientObject recipientObj, PhoneScriptObject
phoneObj)
Parameters:
- (ScriptObject) scriptObj: default interpreter script object containing local variables
defined in the script.
- (UserSessionScriptObject) sessionObj: session
script object providing information on the notification session.
- (RecipientObject) recipientObj: recipient script
object containing information about the recipient.
- (PhoneScriptObject) phoneObj: phone script object
allowing for interaction with the phone.
Returns:
(Boolean) true if a context
is available for this notification, otherwise false.
Note: context is not available
for terminated events, and the return value may be ignored.