3 Replies Latest reply on Aug 13, 2013 1:11 AM by Frank.Hampshire-Oracle

    How to establish self-referential OPA relationship via Siebel connector

    user12108458

      Hi,

       

      Looking for guidance on how to establish self-referential relationship using Siebel IO mapping.  OPA rulebase's data model is setup to allow linkage of instances within the same child entity.  However, this is done via OWD screen where user can manually link previous policies to the current policy record.

       

      EX.

      Global_entity

           G1

      Policy_entity

           P1

           P2 - user pick as previous policy to P1

           P3 - user pick as previous policy to P1

       

      I'm not quite sure how to specify such referential relationship using Siebel IO.  Steps taken so far:

      1. Create OPA public name for both forward and reverse relationship.

      2. Structure Siebel IO as such:

           Global

                G1

           Policy

                P1

                     Previous Policy

                          P2

                          P3

                P2

                      Previous Policy

                P3

                      Previous Policy

      3. Define Previous Policy IO Component user-properties of OPAParent = Policy and OPARelationship = public name of the parent containment relationship (Policy - Previous Policy)

       

      I plan on changing OPARelationship  = public name of the reverse containment relationship but doubt it'll work.  Any ideas will be much appreciated.

       

      Thanks,
      Kevin

        • 1. Re: How to establish self-referential OPA relationship via Siebel connector
          Frank.Hampshire-Oracle

          Kevin,

           

          That approach seems like the right one. A few things:

           

          1. In addition to the OPAParent and OPARelationship settings, you should probably set the OPAEntity field to the public name of the entity.

           

          2. Make sure that the integration components both have their "Id" field available and that you change its Data Type from "System" to "Data". This is because the same object will appear in the IO XML as different XML elements. However, if OPA can recognise them by their "Id" they should be mapped to the same entity instance.

           

          Cheers

          Frank

          • 2. Re: How to establish self-referential OPA relationship via Siebel connector
            user12108458

            Hi Frank,

             

            This setup actually causes the interview to fail to start.  Appears that OPA doesn't recognize the mapping of Siebel's Previous Policy BC to enity_policy, and that it detects conflicts w/ previous policy id [1-J1PBH] as duplicates to existing policy instance.

             

            I've defined Previous Policy IC user-property as follows:

            OPAAttribute = entity_policy

            OPAParent = entity_policy

            OPARelationship = rel_policy_previousPolicies

             

            Id field is already set as "Data" type in both Policy and Previous Policy IC.

             

            However, this results in an error and the OWD log indicating:

            1. Child entity PreviousPolicy of entity entity_policy does not exist in the rulebase.  Skipping exporter

            2. Error loading the session: error was 'Entity instance already exists in the model: entity_policy [1-J1PBH]

             

            Pretty certain that this is achievable w/ existing Siebel connector framework.  What else do you think I'm missing.

             

            Thanks,
            Kevin

             

             


            • 3. Re: How to establish self-referential OPA relationship via Siebel connector
              Frank.Hampshire-Oracle

              Kevin,

               

              You might want to see if setting the OPA Entity custom property to "entity_policy" helps, this is a long shot), but it might work.

               

              If this is 1-to-n relationship (ie a previous policy can only have one parent) then you might be able to do the following.

              1. Set an attribute in the Previous policy IC to be the parent id of the previous policy, make sure it is imported into the entity,

               

              Write a rule that does something like:

               

              the policy (previous policy) is a member of the policies previous policies if

                the previous policy parent id = the policy id

               

              in the case of the rule above the "the policies previous policies" is the text of the relationship rel_policy_previousPolicies

               

              Cheers

              Frank