6 Replies Latest reply on Sep 11, 2013 10:40 PM by ross_c

    Multiple Conclusion based on input values



      I think I have a similar request to this one: https://forums.oracle.com/message/9208952#9208952


      Basically I have a requirement to return a list of required documents someone must upload based on their application. The plan is to invoke the Determinations Server via the web service interface to get a list of the Documents (these would be URLs)  required based on some fields. I'm not quite sure how to approach the rules and web service call so that I would get a list of documents back. I want to complete it in Excel and would like the URL as the conclusion with the attributes as the entry fields.


      e.g. write rules like:


      the value of field1the value of field2document requiring upload


      and when I invoke the determinations service with values X and Y the response would be something like:


      <typ:attribute id="document_to_upload" type="string" inferred="true">



      <typ:attribute id="document_to_upload" type="string" inferred="true">




      Can I do like above and how do I structure the rules and webservice calls to get a list of documents back? Or do I have to write a table of rules for each type of document and request an outcome/conclusion for each one to get the URL as the conclusion? Does one of the example projects that comes with the installation cover (or go close) a scenario like this?




        • 1. Re: Multiple Conclusion based on input values

          What you want does not make a logical sence. How can a single attribute hold two seperate values? You'll be better off using additional attributes or a child entity to represent multiple values.

          1 person found this helpful
          • 2. Re: Multiple Conclusion based on input values
            Paul Fowler

            I will start with standard disclaimers that I don't work for Oracle, and simply writing rules that are not human readable and not based on policy can lead to less than optimal rulesets.  My answer is confined to the question at hand.


            Here is one of several answers to your question as hinted by the reply above.  See the OPM help topic "write rules that infer relationships and entities."


            Assuming that "the documents requiring upload" is relationship text to a child entity such as "the documents", then you could use a rule table in Word with inferred entities such as this example:


            the documents requiring upload



            the value of field 1 = "X" and

            the value of field 2 = "Y"



            the value of field 1 = "X" and

            the value of field 2 = "Z"


            the value of field 1 = "X" and

            the value of field 2 = "Y"

            • 3. Re: Multiple Conclusion based on input values

              Thanks @ChaseVoid and @PaulFowler


              I have written up my rules and I have tested them in the debugger, all working as expected. Now I'm trying to get them via the web service and I can't seem to get the value back, only the instance. My request is as below:


              <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://oracle.com/determinations/server/11.0/rulebase/assess/types">
                          <typ:attribute id="bin_code">
                 <typ:entity id="the_supplementary_documents" inferred="true">
                             <typ:instance id="x">
                              <typ:attribute id="supplementary_documents" outcome-style="value-only" />


              The code given as an attribute input should return two supplementary documents and one informational document, which it looks like it finds but I'm not getting the value out of the instance. The response is below:


              <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:i18n="http://www.w3.org/2005/09/ws-i18n" xmlns:typ="http://oracle.com/determinations/server/11.0/rulebase/assess/types">
                          <typ:attribute id="bin_code" type="text">
                          <typ:entity id="the_supplementary_documents" inferred="true">
                             <typ:instance id="0x74d5b205a0612b60"></typ:instance>
                             <typ:instance id="0x9163835e55979771"></typ:instance>
                          <typ:entity id="the_informational_documents" inferred="true">
                             <typ:instance id="0xc8730b5ed088cbce"></typ:instance>


              I'm sure it's a matter of passing a new element or adding an attribute to an element there but I can't work out which one. Any ideas?



              • 4. Re: Multiple Conclusion based on input values

                The reason you don't see it is because the document URL is being used as a relationship text. This is something from OPA perspective not integration. You may want to add new entity instance with an attribute say "the document URL" which will hold the necessary value (in your case the relationship text).


                Hope it makes sense.

                • 5. Re: Multiple Conclusion based on input values

                  Hey @ChaseVoid, thanks for the reply. I think I understand what you mean but I don't know how to mark it up in the rules. I will provide some more info on what I have an perhaps you could advise on where to add the changes? I'm not sure how to set an attribute for this inferred entity in the data tab or rules and then retrieve via web service. Based on the example below, through the web service I get the inferred instance for "http://domain.com/mydocument.pdf" but I can't figure out how to get the value of it.


                  Rules example:


                  the A314 document requires upload if

                       the course code = "HBPA"


                  the supplementary documents requiring upload


                  the A314 document requires upload


                  Data tab:



                            Enitity: the supplementary documents (the_supplementary _documents)

                                       Attribute Text: the supplementary documents

                                       Role: Goal

                                       Name: supplementary _documents


                                       Text: the supplementary documents requiring upload

                                       Target: Global

                                       Type: Containment (Many To One)


                  Debug example:


                  course_code = 'HBPA'




                             | - the supplementary documents requiring upload


                                 |- http://domain.com/mydocument.pdf