3 Replies Latest reply: Jun 12, 2013 6:37 PM by Frank.Hampshire-Oracle RSS

    Auto-Save Functionality error

    1001745
      Hi Experts,

      Need help on the auto-save functionality from OPA to Siebel
      1. Created a .JAR library file implementing "OnInvestigationEndedEventHandler" and "OnGetScreenEventHandler" event handlers
      2. Event triggered and data sent to Siebel
      3. Failure while inserting the session data into Siebel S_PA_SESSION table

      Reason for failure: S_PA_SESSION.USER_ID value is not passed while using auto-save and S_PA_SESSION.USER_ID is passed while manual save functionality

      I see that this table column is not nullable and is required column as a result inserting record fails with SBL-DBC-00111 error. Should this be fixed at Siebel end or OPA end?

      Thanks,
      Vinay
        • 1. Re: Auto-Save Functionality error
          Frank.Hampshire-Oracle
          998742 wrote:
          Hi Experts,

          Need help on the auto-save functionality from OPA to Siebel
          1. Created a .JAR library file implementing "OnInvestigationEndedEventHandler" and "OnGetScreenEventHandler" event handlers
          2. Event triggered and data sent to Siebel
          3. Failure while inserting the session data into Siebel S_PA_SESSION table

          Reason for failure: S_PA_SESSION.USER_ID value is not passed while using auto-save and S_PA_SESSION.USER_ID is passed while manual save functionality

          I see that this table column is not nullable and is required column as a result inserting record fails with SBL-DBC-00111 error. Should this be fixed at Siebel end or OPA end?

          Thanks,
          Vinay
          Hi Vinay,

          I think there is a fairly simple solution to your problem.

          In Web Determinations, A session should always have a user id allocated when it starts. If none is set you should see the query param user=guest tagged onto the end of each Web Determinations URL - 'guest' is the default user

          In your auto save code you will be calling the Data Adaptor's "save" method this takes the following parameters: SecurityToken token, String caseID, InterviewSession session

          The caseID only exists if your case is already saved. If it hasn;t been saved before it will be null. Regardless you should always get the caseID from the SessionContext object which you will have access to in your event handler (com.oracle.determinations.web.platform.controller.SessionContext getCaseID() method)

          The SecurityToken parameter is probably what is going wrong here. You may be creating your own blank SecurityToken, but you should get it from the SessionContext object (SessionContext getSecurityToken())

          So the code where you call the Data Adaptor should look like (session and sessionContext will be available in your event):
          DataAdaptor da = session.getDataAdaptor();
          String newCaseID =  da.save(sessionContext.getSecurityToken(), sessionContext.getCaseID(), session);
          sessionContext.setCaseID(newCaseID);
          
          {code}
          
          Hope this helps.
          
          Cheers
          Frank                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
          • 2. Re: Auto-Save Functionality error
            1001745

            Hi Expert,

             

            Your inputs resolved the issue however, there is one more concern that I would like to get your help upon wrt OPA web-determinations plugin.

            Currently, I have implemented auto-save functionality implementing eventhandler for OnGetScreenEventHandler and OnInvestigationEndedEventHandler. With these I see the auto-save working fine but, why is OnGetScreenEventHandler sending across decision report to be stored. Is it possible to avoid sending decision report on OnGetScreenEventHandler? As I am getting decision report in OnInvestigationEndedEventHandler which is right.

             

            Thanks,

            Vinay

            • 3. Re: Auto-Save Functionality error
              Frank.Hampshire-Oracle

              You could consider controlling this at the Siebel end. You could possibly implement a Pre-save handler and remove the Decision reports from the incoming request before they are saved.

               

              Unfortunately there's no easy way to do this from the OPA side as decision reports are controlled by the mapping settings.

               

              Cheers

              Frank