Forum Stats

  • 3,733,510 Users
  • 2,246,777 Discussions
  • 7,856,742 Comments

Discussions

Returning a proper structure back from OPA,

user636252
user636252 Member Posts: 17
Hi there,

I am working on a task where I need to integrate OPA with Siebel. Basically in Siebel I have HLS Case which has many Rules (hold on a different BC) and each rule has many rule summaries (hold on another BC).

I have written the rules in OPA and it is all working when testing it the in debug mode in OPA. However my problem is that the response which comes back to Siebel has a flat structure.

How can I structure the response so that it is returned in a proper structure rather than flat structure?

Rather than returning flat structure which is:
Rule 1
Rule 2
Rule 3
Rule Summary 1.1
Rule Summary 1.2
Rule Summar 2.1
Rule Summary 2.2
Rule Summary 3.1
Rule Summar 3.2

I want to return:
Rule 1
Rule Summary 1.1
Rule Summary 1.2

Rule 2
Rule Summary 2.1
Rule Summary 2.2

Rule 3
Rule Summary 3.1
Rule Summary 3.2

Does anyone know how this can be done?

I think that I need to set data model structure in OPA similar to the one in Siebel. If this is the solution, how can set this similar model in OPA?

Thanks,
Agi

Answers

  • Stephen French-Oracle
    Stephen French-Oracle Member Posts: 147 Employee
    I'm assuming here that 'rule' and 'rule summary' are what we would call entities in OPA parlance. If so then unfortunately it is not possible at present to return the nested structure you have described. However the relationships returned in the response should allow you to build this structure by following the links from rule to rule summary.

    If 'rule' and 'rule summary' are the names for the OPA rules you have written, then it sounds like you're asking for a decision report, which is just a matter of specifying this in the OPA mapping inside Siebel.
    Stephen French-Oracle
  • user636252
    user636252 Member Posts: 17
    Thanks Stephen,

    I tried following your suggestion and created an entity for the rule and another entity for the rule summary and created all the relevant attributes against both entities. Then I created the relationships between global and rule as 1 to Many and between rule and rule summary 1 to Many. However when i tried compiling the word document, it was complaining about the attributes that I reference in the 'rule summary' entity. The error I was getting was indicating that I need to use Alias to refer to the attributes in the 'rule summary' entity.

    Is there any example that I can get hold of which shows how to use relationships and write rule and how to reference the relationships in Siebel mapping. The examples (AdminSmokeTest & RulieTraining) that came with OPA installation are not very useful and I've gone through the 'OPA Connector for Siebel Developer Help' and I've gone through the 'OPM Developer Help' and I can't really see exactly how I can achieve what I am trying to do.

    Thanks
  • Stephen French-Oracle
    Stephen French-Oracle Member Posts: 147 Employee
    Without seeing your exact error it's hard to know for sure, but I suspect the reason that you're getting that error is because you're trying to refer to an attribute of "the rule summary" entity from "the rule" entity without using a relationship to do so. So if your one-to-many relationship was called "the rule summaries" then you could write:

    >
    the rule is valid if
    - ForAll(the rule summaries, the rule summary is valid)
    >

    but you couldn't write

    >
    the rule is valid if
    - the rule summary is valid
    >

    There should be some examples in the Oracle Policy Modeling online help (sorry I don't have it handy to refer to).

    Just FYI I will be away next week if you need more information, but hopefully someone else here can help point you in the right direction.
    Stephen French-Oracle
  • Hi Agi

    You can find the help that Stephen referred to at: http://www.oracle.com/technology/products/applications/policy-automation/help/opm10/Content/Rules%20using%20entity%20instances/Rules_using_entity_instances.htm (or the equivalent location on your local copy of the help that is already installed on your computer).

    Kind regards

    Anthony Bettanin | Director, Global Partner Enablement, Oracle Policy Automation | Oracle Worldwide Alliances & Channels
    Office: +61 3 8616 3683 | Mobile: +61 434 832 564 | Level 5, 417 St Kilda Road, Melbourne VIC 3004, Australia
    Anthony Bettanin-Oracle
This discussion has been closed.