session.setProperty — Nuance extension

This method takes a single string as an argument. The string consists of one or more key-value pairs separated by semicolons. Each key-value pair consists of the name of the property and its value to set. The string is sent to the core engine as vendor-specific parameters under the SET-PARAMS method. There is no return value, but an exception may be thrown on failure.

You can set more than one property in a single function call by separating the key-value pairs with a semi-colon.

This example shows how get and set single and multiple properties. The com.mycorp.param1 represents a generic property (replace it with a valid one).

<script>
// set single property
  session.setProperty('com.mycorp.param1="Company Name"');
// set multiple properties
  session.setProperty('com.mycorp.param1="Company Name"; com.mycorp.param2="124324234@mycorp.com"');
// get single property
  var param1 = session.getProperty('com.mycorp.param1');
// value of variable param1 will be 'com.mycorp.param1="Company //Name"', which will //require parsing in ECMAScript to extract //the actual value. 
// This is not the same as the setProperty string.
// get multiple parameters
  var params = session.getProperty('com.mycorp.param1com.mycorp.param2');
// value of variable params will be same as the setParameter //string for multiple //parameters: 'com.mycorp.param1="Company //Name"; //com.mycorp.param2="124324234@mycorp.com"'
</script>