Access Interaction Properties
The following SCXML strategy shows how to access the properties of an interaction object.
<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:ixn="http://www.genesyslab.com/modules/interaction" initial="initial"> <script> var ixnid; </script> <state id="initial"> <transition event="interaction.added" target="get_ixn_properties"> <script> ixnid = _event.data.interactionid; </script> </transition> </state> <state id="get_ixn_properties"> <onentry> <script> var g_uid = _genesys.ixn.interactions[ixnid].g_uid; var category = _genesys.ixn.interactions[ixnid].category; var tenantid = _genesys.ixn.interactions[ixnid].tenantid; var parentid = _genesys.ixn.interactions[ixnid].parentid; var contactedaddr = _genesys.ixn.interactions[ixnid].contactedaddr; var parties = _genesys.ixn.interactions[ixnid].parties; var udata = _genesys.ixn.interactions[ixnid].udata; var voice = _genesys.ixn.interactions[ixnid].voice; var xdata = _genesys.ixn.interactions[ixnid].xdata; var location = _genesys.ixn.interactions[ixnid].location; </script> </onentry> <transition cond="category=='voice'" target="exit"> <log expr="'g_uid: ' + g_uid" /> <log expr="'category: ' + category" /> <log expr="'tenantid: ' + tenantid" /> <log expr="'parentid: ' + parentid" /> <log expr="'contactedaddr: ' + contactedaddr" /> <log expr="'parties: ' + uneval(parties)" /> <log expr="'udata: ' + uneval(udata)" /> <log expr="'voice: ' + uneval(voice)" /> <log expr="'xdata: ' + uneval(xdata)" /> <log expr="'location: ' + uneval(location)" /> </transition> <transition target="error" /> </state> <final id="exit"/> <final id="error"/> </scxml>
This page was last edited on August 14, 2014, at 20:21.
Comments or questions about this documentation? Contact us for support!