Tutorial: Save a case immediately on completing an interview

This tutorial enables you to save interview session data immediately upon completion of an interview. Rather than having to manually click on the Save link at the end of the interview, an out-of the-box event handler packaged with the Connector is provided to serve this purpose.

 

To register the event handler, do the following:

  1. Stop the server where the CRM On Demand Web Determinations is running.
  2. Open <WD deploy dir>\WEB-INF\classes\configuration\application.properties.
  3. Edit the plugin.libraries property by adding the fully-qualified name of our event handler:

plugin.libraries =com.oracle.determinations.web.crmod.plugins.CrmodAdapter;com.oracle.determinations.web.crmod.plugins.CrmodEventHandlers;

  1. Save the file and restart the server.

 

Test the event handler

To test the event handler, do the following:

  1. Create a simple rulebase with a simple mapping, to insert an object instance in CRM On Demand; for example:












  2. Deploy the rulebase on CRM On Demand Web Determinations and restart the server.
  3. Start a screening interview for the rulebase; for example: http://localhost:8080/crmod-connector/startsession/SimpleInsert?caseID=new
  4. Once the interview has ended (when Web Determinations thinks it can already get the goal value), the Interview data will be automatically saved in CRM On Demand. This will happen before the summary screen is displayed.
  5. Verify the saved record in CRM On Demand.