12 Replies Latest reply: May 31, 2012 4:10 AM by Davin Fifield-Oracle RSS

    Boolean attributes not interpreted correctly by OPA

    933695
      Hi,

      I have a requirement where we ask few questions from user in Siebel application. It will be then send to OPA via Siebel mapping. Rules are created & deployed in Determination Server. We are invoking the rules from button click in Siebel. Result returned is then updated in Siebel. The entire scenario is working fine end to end till I pass some boolean type attributes from Siebel.

      Something Like,

      We are asking few questions such as
      Have you or a family member ever been convicted of any offense?
      are you currently facing prosecution for any offense?

      These are boolean filds in Siebel & the user checks/uncheck the ceckbox on the applet.

      I have created mapping for these two fields with attribute data type as Boolean & Static value as "Default".

      Rules corresponding to these attributes in rule base are

      The Applicant Record is eligible for public housing if
      The Applicant Record or his family is not convicted of any offence and
      The Applicant Record currently is not facing any offence and


      Also the property file entries for the attribute text (boolean)maaped to these attributes are

      The Applicant Record or his family is convicted of any offence
      The Applicant Record currently is facing any offence and

      In Siebel, If I not checking the check box for these questions (assuming it to be false), the result is coming "The Applicant Record is not eligible for public housing" which is actually not the case.

      Please let me know how to write rules for these two requirements.
        • 1. Re: Boolean attributes not interpreted correctly by OPA
          Jasminder
          Hi,

          To be sure of what values are being passed and how the conclusion is being achieved, I would suggest that you set the Decision Report level to full in the output attribute mapping.
          This will give you a detailed decision report in the output xml.

          One more thing, try using Auto data type in the mappings.
          • 2. Re: Boolean attributes not interpreted correctly by OPA
            933695
            Hi Jasminder,

            Thanks for your reply.

            I tried setting the Decision Report level to full in the output attribute mapping. I am passing 6 attribute from Siebel, out which 3 are Boolean type, 2 text type & 1 number type. However, while going through the "Decision report detail" view in Policy Automation Administration screen for different requests, I found that if


            I am passing all the 6 values from Siebel applet(check boxes are also checked), I can see 6 attribute entries for that trnx in Decision Report Detail view.However, say I am passing only text fields, number & checking 1/2 of the check boxes, I am seeing only entries for only those Boolean attribute which are left unchecked in Siebel applet.

            Can't understand this behavior. I tried changing the mapping data type to Auto also for these Boolean variables, but behavior is same. Is there any other way we can see the request going out in XML format. Pls suggest.

            Thanks
            Lovely
            • 3. Re: Boolean attributes not interpreted correctly by OPA
              Jasminder
              Hi Lovely,

              Can you see all the 6 attributes in the Outbound Xml - From Siebel to OPA ?
              The Inbound Xml Decision Report is only to view how the outcome attribute was determined. It will only show the attributes that are relevant to your outcome as per the rules you have written.
              • 4. Re: Boolean attributes not interpreted correctly by OPA
                933695
                Hi Jasminder,

                Where can I specifically look for outbound XML - From Siebel to OPA ?

                Thanks
                Lovely
                • 5. Re: Boolean attributes not interpreted correctly by OPA
                  Jasminder
                  I am not a Siebel expert but in the Policy Automation Assess workflow a request is generated, you may have to use some code to log this for debugging purposes.
                  • 6. Re: Boolean attributes not interpreted correctly by OPA
                    933695
                    Hi Jasmider,

                    I did some workaround with Policy Automation Assess workflow & now I can see the request being send from Siebel to OPA. I can now see all the 6 attributes in req XML. I also noticed that if I keep the check boxes unchecked in Siebel applet, for the corresponding attributes, it is mapping "False" in the Req XML , which is correct.

                    However, seems like my corresponding rule has some issue & its not interpreting correctly.

                    My scenario is

                    For questions like
                    Have you or a family member ever been convicted of any offense?
                    Are you currently facing prosecution for any offense?


                    Rules corresponding to these attributes in rule base are

                    The Applicant Record is eligible for public housing if
                    The Applicant Record or his family is not convicted of any offence and
                    The Applicant Record currently is not facing any offense

                    Do I need to do some changes in my rule or property file. pls suggest.
                    • 7. Re: Boolean attributes not interpreted correctly by OPA
                      Jasminder
                      Hi Lovely,

                      Now the next step is to debug your rulebase in OPM debugger using the same inputs as you see the request Xml and check what output you get.
                      This will allow you to see how rules are being interpreted in OPM and then you can update the rules if needed.

                      Please play close attention to parsing of a boolean attribute if you have more than one verb in the attribute text.
                      • 8. Re: Boolean attributes not interpreted correctly by OPA
                        933695
                        Hi Jasminder,

                        Followed the next step. I first generated the req XML & the same value of the attributes are set in Debug mode OPM. Noticed that, with same values also, the decision I am getting in Siebel & in OPM debugger are different. Debugger is behaving correctly as per the input but Siebel doesn't. I then checked the decision report captured in Siebel for that request in Policy Administration Automation - Decision report detail view & found that the decision text captured has different english structure than what I can see in OPM debug window.

                        For e.g In Siebel , when I am sending false for these attributes, decision text is like

                        The Applicant Record or his family is not never convicted of any offence.
                        The Applicant Record does not have never subject to a Lifetime Registration requirement under a State Sex Offender Registration Program.

                        Whereas in OPM debugger, for same values, the text I can see text as

                        The Applicant Record or his family is not convicted of any offence
                        The Applicant Record is not subject to a Lifetime Registration requirement under a State Sex Offender Registration Program

                        In case, I change these values to true in debugger, the text changes to

                        The Applicant Record or his family is convicted of any offence.
                        The Applicant Record is subject to a Lifetime Registration requirement under a State Sex Offender Registration Program.
                        • 9. Re: Boolean attributes not interpreted correctly by OPA
                          Jasmine Lee-Oracle
                          Mapping between OPA and Siebel is done with the attribute's Public Name, not the attribute's natural language text. Are you sure you've set up the mapping correctly?

                          A general comment about your attributes... Consider reviewing the wording, as well as constructing sentences that will negate properly. Some of these attributes are worded strangely or do not negate well, e.g.

                          "The Applicant Record or his family *is not never convicted of any offence*."
                          "The Applicant Record *does not have never subject to* a Lifetime Registration requirement..."

                          Also, you should never use gender pronouns directly in OPA attribute text. If necessary, appropriate gender pronouns can be substituted at runtime (e.g. in Web Determinations). You may have already set up gender pronoun substitution, but it's difficult to tell from the forum post, so I'm mentioning this in case.

                          For more information about proper wording/parsing of attributes, see the following:

                          Oracle Policy Modeling 10.4 User's Guide: http://docs.oracle.com/html/E27987_01/toc.htm - Particularly these articles:
                          - Choose a name for an entity, relationship or attribute --> section: Choose attribute text
                          - Compile rules and correct errors (this article explains what parsing means in OPA)

                          Oracle Policy Modeling Best Practice Guide: http://www.oracle.com/technetwork/apps-tech/policy-automation/learnmore/policymodelingbestpracticeguide-1371173.pdf - Attribute wording/parsing is covered in Chapter 4.
                          • 10. Re: Boolean attributes not interpreted correctly by OPA
                            Tan45
                            Hello,
                            The work arond which we implemented is we have written a code on WriteRecord() event of Policy Automation, where we check "Attribute Value" == "Yes", then we are setting "Attribute Value" == "True" else "Attribute Value" == "False".
                            This is under assumption that every boolean value needs undergo change.

                            Thanks
                            Nishant
                            • 11. Re: Boolean attributes not interpreted correctly by OPA
                              933695
                              Hi,

                              Jasmine & Nishant, thanks for reply.

                              Jasmine, I have used attribute's public name for mapping between OPA and Siebel , not the attribute's natural language text. Mapping seems to be correct as per the Req XML I can see.

                              I am going through the attached link. However, I didn't understand that In my case, why am I getting 2 different types of negative statement. In OPM debugger, its showing as

                              The Applicant Record or his family is convicted of any offence.
                              The Applicant Record is subject to a Lifetime Registration requirement under a State *** Offender Registration Program


                              & In Siebel Decision Report Detail view, its showing as

                              The Applicant Record or his family is not never convicted of any offence.
                              The Applicant Record does not have never subject to a Lifetime Registration requirement under a State *** Offender Registration Program.


                              I don't see the second negate set anywhere in OPM attribute text Parse statement then from where it is coming.


                              Nishant,
                              I can see in the Req XML that Siebel is passing True/false value for boolean attributes & hence I think it doesn't need any explicit conversion.

                              Thanks
                              Lovely
                              • 12. Re: Boolean attributes not interpreted correctly by OPA
                                Davin Fifield-Oracle
                                Are you sure you are deploying the same rulebase to the Siebel connector that you are testing in OPM? Is it possible that an old version of the rulebase is still cached in the Determinations Server?

                                You could test this by changing the wording of one your attributes, and redeploying.

                                e.g. change the first one to" the applicant or a member of his family has been convicted of any offence"

                                and see if the decision report changes as you would expect.

                                Davin.