1 Reply Latest reply: Jul 23, 2014 10:35 PM by Vrams RSS

    Batch Processor - Many to Many Relationship - Same Entity

    887112

      Can someone explain how to setup many to many relationships with CSV files for use with the batch processor that reference the same entity?

       

      Here is a modified version of the config:

       

      <configuration>

          <options>

              <csv>csv</csv>

              <output type="csv">output</output>   

              <processors>1</processors>   

              <rulebase>../../rulebases/compiled/Amount.zip</rulebase>

          </options>

          <mappings>

              <mapping entity="global" table="global" primary-key="#">

                  <attribute name="Amount" field="Amount" output="true"/>

              </mapping>

              <mapping entity="person" table="person" primary-key="person1individ">

                  <attribute name="attribute1" field="attribute1" />

                  <attribute name="attribute2" field="attribute2" />

                  <relationship name="people" source-entity="global" rel-source="global" foreign-key="case_fk"/>

                  <relationship name="manytomanyrelationship" source-entity="person" rel-source="manytomanyrelationship" source-key="person1id" target-key="#"/>

              </mapping>

          </mappings>

      </configuration>

       

       

      manytomanyrelationship.csv

       

      person1individ,#

       

      This does not seem to work as there is no way to identify the 2nd person identified with the default # column in the many to many relationship, is there a way to define 2 primary keys for the same entity?

       

      If you were to add rows to the manytomanyrelationship.csv file, the batch processor fails.

        • 1. Re: Batch Processor - Many to Many Relationship - Same Entity
          Vrams

          Modify Insurance Fraud score example batch as below. lets establish many to many relationship between previous claims.

           

          1) Modify the insurance fraud score using Oracle Policy Modeling.  Add a new Many to Many relationship on the previousclaim entity. Name it as (previousclaimmother) shown in the attached screenshot.InsuranceFraudScore - Oracle Policy Modeling.png

           

          2) Add a new csv file. Name it as previousclaimrels with below text.Place it in examples\determinations-batch\InsuranceFraudScoreBatch\csv path.

           

          previousclaim,relpreviousclaim

          1,1

          1,2

          1,3

           

          3) Modify FRAUDSCORECONFIG.XML to include new many to many relationship on previousclaim entitiy as shownbelow.

          <mapping entity="previousclaim" table="previous_claim" primary-key="#">

            --

            --

            <relationship name="previousclaimmother" source-entity="previousclaim" rel-source="previousclaimrels" source-key="previousclaim" target-key="relpreviousclaim"/>

          </mapping>

           

          Oracle Policy Automation - General Discussion