Policy Automation for B2C Service

Get Involved. Join the Conversation.


    Jayandan Rajaram
    Is it possible to read or write attribute which is holding...
    Topic posted February 14, 2018 by Jayandan RajaramRed Ribbon: 250+ Points 
    138 Views, 7 Comments
    Is it possible to read or write attribute which is holding more than one instance from OPA using API

    Is it possible to read or write attributes from OPA using API. Here the Scenario is we are having an Entity holding more than one instance of an attribute where we need to retrieve all the data(all instances of that attribute) from OPA using API .PFA for the explanation of scenario where an attribute holding 3 instances,can we retrieve the data of all three instances from OPA USING API??




    • Anuj Behl

      Hi Jayandan,

      Please do not create duplicate posts for the same question.

      You should provide more details for your question. Since the community users don't have a complete picture of your use case, please be as specific as possible when asking question. For example, in your question here, there are multiple instances where you mentioned 'using API', which API are you referring to here?

      Refer- How to ask a good question


    • Matt Sevin

      Look at the apis related to relationships.   Entities can have specific instances (I.e. “bob” and “Mary” are instances of the entity “the person” ) instances can have a value for a specific instance and relationships define a relation between two instances (i.e. “bob” is married to “Mary”)

    • Matt Sevin

      Clarification: Instances can have a value ( of an attribute) for each instance (I.e. bob and Mary can each have a value for the attribute “the person’s date of birth”)

    • Jayandan Rajaram

      Hi Anuj,

      We are working oracle service cloud and OPA integration where OPA would take care of interview screens and business rule

      Business rules are bit complex and its not achievable through straight forward attribute mapping

      We need to have API calls for two things

      1.To populate attribute values based on run time value selection

      2. To evaluate rule by referring to old history data based on run time value selection

      So we are trying to achieve it through either

      1.To manipulate it through Javascript (how usually interview screens attributes are manipulated)

      2. To populate it using Rule script feature

      In both these approaches we definitely need API calls to OSC to fetch value during run time

      Please help us to overcome this complex requirement

      Refer another forum entry to address the same through javascript : Read or write attributes from OPA using JavaScript



    • Matt Sevin

      We should focus on this first "Business rules are bit complex and its not achievable through straight forward attribute mapping" as that situation is fairly rare and often caused by some configuration oversight or missing mapping/model links, etc. 

      Screenshots of the entities/attributes and their mappings as well as a description of the rule you would like to express would help the community respond with specific suggestions.  


    • Jayandan Rajaram

      Hi Matt,

      Since Rulescript feature is not recommended to be used in production , we came up with workaround to handle API calls to read/write OPA attributes

      PFA recording for javascript workaround to overcome the issues



    • Matt Sevin

      Using the built-in capabilities to express rules and map data is recommended due to the inherent maintainability benefits of natural language rules and interface defined mappings over resorting to API level code (in most implementations).      

      We will work this through the existing email chains for now so that we can determine whether the business rules can, in fact, be implemented without resorting to API level implementation decisions.