Batch Processor, WIA and Inferred entity instances

Hi All,
I'm playing around with the new OPA 10.4. I bumped into an error in What-If-Analysis document when I tried to add a new worksheet for an inferred entity. Is this not possible in WIA? Does it mean it will not work as well with Batch Processor.
Here's my data model:
global
--- the applicant
--- --- the qualification
--- --- --- the exempted course (inferred instances from 'the qualification' attributes)
Thank you in advance!
Regards,
Jerome

Brad Tuckett wrote:
Jerome wrote:
Is there a possible workaround right now in 10.4 to persist inferred instances in Batch Processor?The Batch Processor will not output any inferred instances in 10.4
One more thing, I'm also using 10.2 and have implemented InferencingListener to create instances, would you happen to know if I will bump on the same issue with DSC?
There probably isn't a way of having any entity instances created by an event listener appear in the Batch Processor output for database or CSV.
However, you may be able to set the output to saved sessions. Although this isn't explicitly supported, I would expected that any instances you have created would show up in the exported sessions, which will be xml files in the xds format. This will create one session file for each case.
You can set the output to be exported sessions by using "--export <dir>" in the command line or use the xml configuration for the Batch Processor.
When 10.4.1 is released you should be able to switch to using inferred entities which will be compatible with the Batch Processor.

Similar Messages

  • Creating infered entity instances

    How can I create infered entity instances..in opa 10.4.
    When I am trying to write rule using the "exists" keyword.. its not compiling as "Infered
    Instance" but it compiles as normal conclusion.
    and how can I create inferred instances conditionally..

    Sorry for the long delay in replying Rajan, I missed your request to elaborate.
    To be specific:
    When an entity instance is inferred that means that every attribute in it must also be inferred. The rule engine cannot cope with logic like: "this entity might or might not exist, but if it does, we need to ask for more information about it"
    There are a few ways to deal with setting information in an inferred entity:
    - most obviously infer any values from other entiy attributes in the session.
    - set attribute values on related, non-inferred entities and then use rules infer those attributes on the inferred entity.
    Its worth having a think about what the inferred entity instances means. If you want to use the rules as a convenient way to create an entity instance and you still need to set non-inferred attributes, then you are better off using an inferencing listener to create the instances.
    If the instances are truly derivable from rules, then any attribute values of those instances are probably also derivable.
    Cheers
    Frank

  • Return value of inferred entity instance from relationship in SOAP Determinations

    Hey,
    I had an original thread open which indicates the problem I was trying to solve (Multiple Conclusion based on input values ). My rule base now behaves as expected and I can test it in the debugger as expected, only now I can't get the actual identifying values back I want using the determinations web service.
    I get a whole bunch of inferred entity instances back from an inferred relationship the same as the situation/screen shot at the bottom of the "Investigate an inferred relationship" page on the Oracle Policy Automation Cloud Service User Guide, but in my SOAP response I only get the instances with hashed IDs. I want the actual identifying value of the entity.
    e.g. Currently get this:
    <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">
       <SOAP-ENV:Header>
          <i18n:international>
             <i18n:locale>en_GB</i18n:locale>
             <i18n:tz>GMT-0500</i18n:tz>
          </i18n:international>
       </SOAP-ENV:Header>
       <SOAP-ENV:Body>
          <typ:assess-response>
             <typ:global-instance>
                <typ:attribute id="course_code" type="text">
                   <typ:text-val>AHPY</typ:text-val>
                </typ:attribute>
                <typ:entity id="the_supplementary_documents" inferred="true">
                   <typ:instance id="0x608c2dc220e15d8c"></typ:instance>
                   <typ:instance id="0x5b7e2d02e8780325"></typ:instance>
                </typ:entity>
                <typ:entity id="the_informational_documents" inferred="true">
                   <typ:instance id="0x19387621439a43c7"></typ:instance>
                </typ:entity>
             </typ:global-instance>
          </typ:assess-response>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    But I want something like below and I'm having a lot of trouble figuring out how to actually do this. Also is there anywhere that defines the meaning of errors you get from OPA? I have tried to modify my rulebase and I got a few OPA-EXXXXX errors but apart from the description you get in OPM, I can't find anywhere that gives more detail on these and explains what they mean/how to fix it.
    <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">
       <SOAP-ENV:Header>
          <i18n:international>
             <i18n:locale>en_GB</i18n:locale>
             <i18n:tz>GMT-0500</i18n:tz>
          </i18n:international>
       </SOAP-ENV:Header>
       <SOAP-ENV:Body>
          <typ:assess-response>
             <typ:global-instance>
                <typ:attribute id="course_code" type="text">
                   <typ:text-val>AHPY</typ:text-val>
                </typ:attribute>
                <typ:entity id="the_supplementary_documents" inferred="true">
                   <typ:instance id="http://mydomain.com/mydocument.pdf">
                   </typ:instance>
                   <typ:instance id="http://mydomain.com/mydocument.pdf"></typ:instance>
                </typ:entity>
                <typ:entity id="the_informational_documents" inferred="true">
                   <typ:instance id="http://mydomain.com/mydocument.pdf"></typ:instance>
                </typ:entity>
             </typ:global-instance>
          </typ:assess-response>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    I managed to get this working by referring to this thread: Inferred Entity Instances IDs in output response
    I had tried something similar but not quite the same. In the end my request looked something like this:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://oracle.com/determinations/server/11.0/rulebase/assess/types">
       <soapenv:Header/>
       <soapenv:Body>
          <typ:assess-request>
             <typ:config>
               <typ:outcome>
              <typ:entity id="the_supplementary_documents">
                <typ:attribute-outcome id="supplementary_documents" outcome-style="value-only"/>
              </typ:entity>
              <typ:entity id="the_informational_documents">
                <typ:attribute-outcome id="informational_documents" outcome-style="value-only"/>
              </typ:entity>
           </typ:outcome>
             </typ:config>
             <typ:global-instance>
                <typ:attribute id="course_code">
                <typ:text-val>AHPY</typ:text-val>
       </typ:attribute>
              </typ:global-instance>
          </typ:assess-request>
       </soapenv:Body>
    </soapenv:Envelope>

  • Clarify a Limitation for Inferred Entity Instances

    Hi,
    Under the section "Write rules that infer relationships and entities" in the User Guide there is the
    Notes /Limitations
    1) Combining manually created instances with inferred instances is not allowed.
    2) Combining inferred entity instances with temporal values is not supported.
    3) Only a single attribute of the entity instance can be inferred as a part of the entity rule. For example, the type of benefit ("unemployment benefit") can be set but the amount of the benefit would have to be set via a separate rule.
    4) Inferred entity instances may not contain base level attributes.
    5) A relationship that participates in an inferred entity instance rule is considered to be an inferred relationship. This means that an inferred relationship rule cannot be used to prove the same relationship used in an inferred entity instance rule.
    Can number 4 be explained in a little more detail?
    Thanks

    I'm not sure I understand the question so I'm going to guess what you're asking by suggesting a business scenario and talk about how that would work. It is always much easier to talk about a specific business requirement you have rather than product features in general - so if you have a specific requirement I strongly recommend sharing it as you'll get better quality help.
    Anyway, if we keep our existing example of an inferred entity "the product" (has attributes: the name of the product, the price of the product). Say we want to know want the price of the most expensive product you have selected (a concept which would be represented by an attribute at the global level).
    You can do that. The rules to do that are just the same as the rules you'd use if instead of inferring the products and prices you instead asked the user to provide them (ie instancemaximum across a relationship). I'd send an example showing these rules - but it's not possible to attach files to this forum. You use inferred entities in the rest of your rules as if they had been input by a user - there's no difference. The key difference between an inferred entity and a non-inferred entity is that you can't collect more information about it (ie it can't have any base level attributes).
    You can use any attribute in a rule so long as the usage of the attribute matches the entity level of the conclusion. ie You couldn't use "the price of the product" directly in a rule with a conclusion at the global level - because you revert to the problem of "the price of which product?".
    On the off chance that this is somehow a "programmer" question (ie you're trying to understand how OPA works by treating it the same as another method for creating programs, for example a programming language like Java) - attributes in OPA don't have a concept of "private" and "public". If I tried to put OPA In those terms (and it's a stretch because OPA is not Java) - in OPA: everything is public (declare once use everywhere). An entity model in OPA is different thing to a class hierarchy.

  • OPA 10.4 "Inferred Entity Instances", possible to integrate with Siebel?

    Hi,
    In OPA 10.4, I found a new feature "Inferred Entity Instances" using which we can create benefit plans, Opportunities, Service Request,Order lines using only rules.
    Does it mean we can create an Opportunity/Service Request/Order line by writing the information only in the rule when OPA 10.4 is integrated with Siebel?
    Thanks,
    Subhradeep

    The current Siebel Connector only supports OPA 10.3, which does not have inferred entity instances.
    The upcoming release of the Siebel Connector will support new 10.4 OPA features including inferred entities.
    Cheers
    Frank

  • OPA 10.4 - batch processor and Entity

    Hello all.
    I have a problem with the use of Entity with batch processor.
    The fact is we want to use OPA with csv input named like "TARIF_ONE.csv". One different csv for every way of tarification and each time a different project that will be call by a batch process (the client need)... without the use of a configuration file !
    So, if I well understood the OPA batching process, I need, for a "TARIF_ONE" project to be feed with a "TARIF_ONE.csv" file, to have a "TARIF_ONE" entity that will get all the data from the csv input file.
    I've done so.
    But my problem is that when I call the OPA zip by batch, the TARIF_ONE entity are well feed by the data from the csv file... but the calculation from the excel file are not made at all... and in a exporttsc file, the Entities (TARIF_ONE) are set as "unknown" for all the cases inputed...
    I've setted my project like this :
    my Properties file is setted like that :
    Global
    - TARIF_ONE (entity)
    --- INPUT_DATA_ONE (attribute) : Text = "Input data one"
    --- INPUT_DATA_TWO (attribute) : Text = "Input data two"
    --- OUTPUT_DATA_ONE (attribute) : Text = "Output data one"
    --- OUTPUT_DATA_TWO (attribute) : Text = "Output data two"
    And my excel rules file is setted like below
    - Declaration Sheet
    -- INPUT_DATA_ONE : Text = "Input data one from TARIF_ONE"
    -- INPUT_DATA_TWO : Text = "Input data two from TARIF_ONE"
    -- OUTPUT_DATA_ONE : Text = "Output data one from TARIF_ONE"
    -- OUTPUT_DATA_TWO : Text = "Output data two from TARIF_ONE"
    - Calculation Sheet
    -- OUTPUT_DATA_ONE = INPUT_DATA_ONE * INPUT_DATA_TWO
    As I said, when using the batch process, the inputs attribute for the TARIF_ONE entity are well feed, but the OUTPUT attribute are not (still unknown)... and the Entity itself is said as "Unknown"... any way of reflexion to soluce that ?
    Thank-you,
    Philippe,

    Philippe Carpentier wrote:
    Thank you Franck for your answer.
    I would have just one more question : is it possible to use different entity in the zero configuration mode ?
    I tried with one data file by entity, and the entities ares not created
    I tried with all the datas for entities in the global.csv file, and the same.
    It seams to me that when using differents entities in a projetc for batch, we have to use a configuration file... do you confirm my feeling ?
    Philippe,
    Edited by: Philippe Carpentier on 25 mai 2012 03:12You can definitely load entities other than global using zero configuratiuon. To do this create a csv file that has the same name as the public name of your entity. For example if you have an entity with the name "person" then create a person.csv file for each entity instance.
    You will need to have a reference to which global instance each entity instance relates to. The way to do this is to have a column named for the containment relationship for the entity to hold the foreign key to the entity instances parent.
    Example
    We have a global.csv with 3 globals (3 cases)
    #, (number_of_persons)
    1,
    2,
    3,And then a person.csv with 7 people which must all be link to their owning (parent) global. This is done through the containment relationship with the public name "all_persons"
    #,person_name,person_age,all_persons
    1,Fred,      ,27,       ,1
    2,Barney,    ,28,       ,1
    3,Homer,     ,40,       ,2
    4,Marge,     ,38,       ,2
    5,Bart,      ,10,       ,3
    6,Maggie,    ,1,        ,3
    7,Lisa,      ,8,        ,3Each value in the column "all_persons" is a foreign key to the global value which contains that person
    For more information on this, see "CSV input for the Batch Processor", and "Zero-configuration conventions for CSV input" in the "Oracle Policy Automation Developer's Guide". http://docs.oracle.com/html/E29403_01/toc.htm

  • How to Compare entity instances's attribute and find the latest one.

    Hi,
    Below is my data model
    entities: the person, the job
    Relationships: the person-> the job (the person's job) 1 to M (reverse: the person's job's person)
    the person ->the job (the person's favorite job) M to M (inferred)
    Now, the job entity has below attributes: (only important ones are listed)
    1. the job's id
    2. the job's end date
    3 the job's person id
    the person entity has below attributes:(only important ones are listed)
    1. the person's id
    2. the person's most recent job id
    Using the "member of" operator I am assigning the entity instances to "the person's favourite job". Upto this things are working fine.
    Now the problem is I want to determine -"the person's most recent job id" by comparing the entity instance's attribute "the job's end date" and then getting the job Id of the same entity instance.
    Can someone help me in this..?
    thanks,

    Hi,
    Just be aware that if you had two jobs ending at the same time, then InstanceValueIf would return uncertain (perhaps they had two jobs at the same company...?) so just make sure you handle that.
    consider renaming the relationship to the plural... "the person's favourite jobs".
    I am assuming that your system only handles jobs that have ended, as things would be much more complicated if they could have multiple jobs (which could overlap) or jobs with start dates that haven't ended yet.
    Thanks,
    Ben

  • Batch Processor and Custom Functions

    Hi,
    We're using the 10.4.2 Batch Processor, connected to an Oracle 11g database to handle large amounts of data.
    Recently, four custom functions have been added to the rulebase. Nothing complicated, just some string manipulation stuff (trim whitespace etc.). Each function is just a few lines of fairly simple code. No database calls, no web service calls or anything like that. It stays within the Java jar file.
    Suddenly the processing time of the BP has gone up from a couple of minutes to well over an hour. The only change to the rulebase has been the addition of the functions, nothing else.
    It almost looks like the BP is initialising the custom functions with every case that's processed. If this is the case then this would be massively inefficient and as a result we would not be able to implement our new functions.
    Has anybody else come across this before?
    Regards,
    Evert

    943413 wrote:
    Hi,
    We're using the 10.4.2 Batch Processor, connected to an Oracle 11g database to handle large amounts of data.
    Recently, four custom functions have been added to the rulebase. Nothing complicated, just some string manipulation stuff (trim whitespace etc.). Each function is just a few lines of fairly simple code. No database calls, no web service calls or anything like that. It stays within the Java jar file.
    Suddenly the processing time of the BP has gone up from a couple of minutes to well over an hour. The only change to the rulebase has been the addition of the functions, nothing else.
    It almost looks like the BP is initialising the custom functions with every case that's processed. If this is the case then this would be massively inefficient and as a result we would not be able to implement our new functions.
    Has anybody else come across this before?
    Regards,
    EvertEvert,
    You are correct, it does initialise the custom function for every case that is processed. This is necessary as every case is a determinations engine session.
    However, you have control over how long the initialization process. If you make the time consuming parts of your custom function static, and then make the initialization fast, then you will get a much faster custom function call. The custom function code is entirely within your control and you can make it as fast as you like.
    Cheers
    Frank

  • Remove "Add New Instance" and "Remove New Instance" Entity buttons

    Hi,
    While Adding new Entity, "Add New Instance" and "Remove New Instance" buttons will be displayed.
    I don't want to display "Add New Instance" and "Remove New Instance" because by default i have created instances. I am able to disable it but i don't want to display at all.
    For "Add New Instance" , one-to-one, Automatically disabled by OPA
    For "Remove New Instance" added below code in ButtonControl.vm:
    #if( ${control.getButtonClass()}.equals("remove"))
    #set( $disabledString = "disabled" )
         #set( $visibility = "false" )
    #end
    Please tell me how to not display these two buttons.
    Thanks,
    Sri

    Hi Sri and Patrick,
    There's no out-of-the-box configuration to hide the Add/Remove Instance buttons from entity collect screens in Web Determinations. However, this requirement can be achieved through Custom Properties. This requires a technical person to create the custom property, which the rulie then attaches to the Rule Project. The technical person also needs to modify the velocity template which renders the entity collect screens so that it will remove the Add/Remove buttons on any entity collect control where the custom property is set to True.
    I can't advise on exactly how to write the custom property or edit the velocity template (I'm a functional expert, not a programmer), but the OPA Developer Help should have guidance. Try searching on ‘custom property’. From the rulie perspective, have a look at this article for how to attach a custom property to the project and to the particular screen control:
    * Augment the rulebase with metadata: http://docs.oracle.com/html/E24270_01/Content/Integrating/Augment_the_rulebase_with_metadata.htm (particularly the sections 'Specify a custom property defintion' and 'Assign a custom property to a control'). This link is to the 10.3 version of the OPM Help. If you are using an earlier release of OPA, you can look at the equivalent article in your copy of the Help.
    (If there are technical people following this thread, perhaps you could reply with specific OPA Developer Help articles people should look at with regard to writing custom properties?)
    Cheers,
    Jasmine

  • Creating New Entity Instances within OPA

    This is another one that I think I know the answer to, but I think it is best to confirm.
    In prior versions, it was not possible to create entity instances within RuleBurst/Haley Office Rules. Is that still the case in OPA?
    For example, my rules are determining the status of a case and the reason(s) why that status was determined. The case status may be Denied and the reasons may be "invalid customer Id", "expenses to income ratio too high", "primary customer not employed long enough", etc. I want to return all the reasons for the status. While the list of reasons is pre-determined, the ones that apply to a particular case are dynamic, as any, but not all can apply.
    Given this situation using a database, I would create an instance of reason for each applicable one and link it to the case. In the past, with OPA's predecessor(s), it was not possible to create new instances from within. They either had to all be passed into the rulebase or a list of all allowable reasons attributes had to be created and then set to true for the ones that applied.
    My preference is to create the instances inside OPA. Is that functionality provided in the current version?
    Thanks,
    Terry

    Hi Terry,
    Michael is correct that you can't write rules at design time which will dynamically create new entity instances at runtime. However, perhaps the new inferred relationships functionality in v10 could address what you're trying to do.
    You can write rules which conclude membership of an inferred relationship. So you might always have, say, 10 instances of 'the reason' in every case, but as for which of those instances apply in any particular case, it depends on the details of the case. You could use an inferred relationship to collect up the entity instances which apply in the case.
    First you'd need to set up a regular one-to-many relationship to instantiate the 10 instances at runtime - this would be done in the usual way. Then you'd also need to set up an inferred relationship and write rules to conclude the members of the inferred relationship. The instances which are members of the inferred relationship are then effectively the list of entity instances you wanted to create in your example above.
    Have a look at this OPM Help article: http://www.oracle.com/technology/products/applications/policy-automation/help/opm10_1/Content/Rules%20using%20entity%20instances/Reason_about_relship_between_2_entities.htm
    Cheers,
    Jasmine

  • Can anyone suggest how to fix batch processor performance?

    The DBA's examined the OPA batch process while it was running. Oracle was sitting idle most the time waiting on the batch processor (according to the DBA staff.) Locks were not an issue and the DB was not under any load.
    The performance is absolutely dismal and we are going to open an OPA support ticket, but would like a quick answer if anyone on this forum has a quick answer.
    (Also, if you try to kill the batch job with <ctrl-c> because it is taking too long, then it leaves the sessions and cursors open. Is there a way to gracefully shut down the batch processor?)
    We have a single simple table where the first 5 columns are conditions and the last column is a conclusion.
    I filled the table with 1,000,000 rows of conditional data. I ran with a configuration like below:
    <configuration>
    <options>
    <rulebase>../output/MyRules.zip</rulebase>
    <database>
    <url>jdbc:oracle:thin:myusername/mypassword@mydatabase:1521:mySID</url>
    <driver>oracle.jdbc.OracleDriver</driver>
    <driversrc>\myjdbcdriverpath\ojdbc6.jar</driversrc>
    </database>
    <output type="db" />
    <mappings>
    <boolean-format true-value="TRUE" false-value="FALSE" />
    <mapping entity="global" table="SSPNA_IN" primary-key="ID">
    <attribute name="bHasNoCountableIncome" field="BHASNOCOUNTABLEINCOME" />
    <attribute name="bIsResidentOfNY" field="BISRESIDENTOFNY" />
    <attribute name="cSSIBenefitAmt" field="CSSIBENEFITAMT" />
    <attribute name="tFedLivingArrangementCD" field="TFEDLIVINGARRANGEMENTCD" />
    <attribute name="tManualHMOInd" field="TMANUALHMOIND" />
    <attribute name="tPaymentStatusCD" field="TPAYMENTSTATUSCD" />
    <attribute name="tPrincipleProviderCD" field="TPRINCIPLEPROVIDERCD" />
    <attribute name="cSSPNAPayment" field="CSSPNAPAYMENT" output="true" />
    </mapping>
    </mappings>
    </options>
    </configuration>

    This is definitely not something we've seen in the testing environment.
    Can you please raise a SR via Oracle Support and provide the following information?
    1. Product version. Version 10.4.1 added multi-processor support for Java database connection in case you were using 10.4.0
    2. Oracle database version
    3. Is the database installed on a physical server or a VM? What's the machine specification, i.e. CPU and memory size?
    4. Is the SSPNA_IN table indexed?
    5. What is the logging level? Does it help if you change the logging level to ERROR?
    6. Please provide the rulebase project and DDL/DML to create tables and insert sample data.

  • OPA Siebel Error - Entity instance does not exist

    Hi
    We have installed Siebel OPA connector in our environment and want to have a rule base based on below entities
    Opportunity(S_OPTY) and Opportunity Product(S_REVN)
    Created new Entities : dealProduct (1 to M) to Global
    Added attributes in dealProduct entity as below
    ao_fast_track – Text
    customizable – text
    fast_track _ Text
    Product_id - Identifying attribute
    Logic: Based on few field values in Opportunity Product we want to pass a value to Opportunity entity to display a message in UI.
    Created the rule and run in debug mode all works fine (created instances manually) but when we invoke the same rule base getting below error message
    [1]Error invoking service 'Policy Automation Determination Server', method 'Assess' at step 'Call Determination Server'.
    (SBL-BPR-00162)[2]Operation 'Assess' of Web Service 'http://oracle.com/determinations/server/10.0/server/types.DeterminationServer' at port
    'NonFastTRackDeal' failed with the following explanation: "Entity instance 'dealproduct[deal Product-1-7IGVAU]' does not exist.".(SBL-EAI-04308)
    I have checked the record with Id'1-7IGVAU' is available in the database , Please let me know if I am missing any thing here.
    Please find the details of the changes in siebel.
    1. Add a button to existing applet and added the relevant code to invoke the rule base web service.
    2. Create New Mapping as below
    Mapping Name:NonFastTRackDeal
    Business Object:Opportunity
    Default Value:UnKnown
    Outbound Poart:NonFastTRackDeal
    Created below 2 Entity Attributes:
    deal Product BC Opportunity Product
    global BC Opportunity
    Relation Ships
    Name: dealproduct(same as public name of Forward relationship)
    Source:global
    Target:deal Product
    Outcomes for global entity: deal_type
    Attributes for deal Product
    Prod_id(identify Attribute): Row Id(Opportunity Product Row Id)
    mapped to corresponding fields for below attributes
    ao_fast_track:
    customizable
    fast_track
    Please let me know if I am missing any thing here.
    Regards
    CRT

    Kristy,
    First thank you for the assisance. The Instances are create when the screen is submitted to the session. We save the session to XDS and reconstitue the session before the next screen for the first instance is submitted (instance#1 of employer type), so i would think it would not be treated as inferred ?
    Return (screen.GetInteractiveSession().Submit(screen))"entity instance whose values can be modified via the interview, you must use the facilities provided by the Interview API."
    Is there a C# example of using the Interview API with multiple instances?
    Thanks
    Alex

  • Explaining a WD Error: "Entity Instance Does Not Match Expected Entity"

    Hello,
    I'm wondering if someone can help me understand what is causing a persistent web server error that seems to be related to entities and/or instance creation. Lately, after building with screens and clicking on the top-level goal, I'll get this generic error:
    An error occurred trying to process your request.
    This error has been logged and is available in the application logs.
    For support and assistance please contact [email protected].
    I then check the Embedded Web Server Output, and see the text pasted at the bottom of this post - the key error seeming to be "java.lang.IllegalArgumentException: Entity instance does not match expected entity".
    Observations:
    - It seems to occur after I've made some significant changes to my data model: merging two entities, or switching relationships to being inferred.
    - There are no errors or warnings in the "Error List" and all documents are compiling successfully.
    - It only happens when I build with screens. I can 'build', or 'build and debug' without screens successfully.
    - The most recent occurrence was after I had converted a few relationships to "Inferred" and resolved all compiling errors.
    - It only occurs after clicking on the top-level goal, and sometimes a few screens afterwards. By switching most of my relationships back to non-inferred (except for one), I've been able to get some of the screens working - up until I arrive at the screen that involves creating instances for the second entity involved in the remaining inferred relationship.
    - The remaining inferred relationship that I was suspecting as a cause seems to be working correctly (i.e. I can see that the instances were connected in the Data tab, even after the error has appeared in the web output).
    I would be very grateful for any assistance with this error, as it's become somewhat of a time sink and I've already tried a few angles for troubleshooting it.
    Thanks!
    - Patrick
    Embedded Web Server Output:
    Deploying application
    Jul 18, 2011 2:35:18 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\projects\[project name]\Release\web-determinations\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Server startup complete!
    OK - Tomcat server started
    4 [http-127.0.0.1-9000-Processor4] ERROR com.oracle.determinations.web.platform.servlet.WebDeterminationsServletUtility - java.lang.IllegalArgumentException: Entity instance does not match expected entity
    java.lang.IllegalArgumentException: Entity instance does not match expected entity
         at com.oracle.determinations.engine.local.RelationshipRule.backwardChainInternalItem(RelationshipRule.java:209)
         at com.oracle.determinations.engine.local.RelationshipRule.backwardChainRelationshipItem(RelationshipRule.java:132)
         at com.oracle.determinations.engine.local.eval.RelationshipExpression.backwardChain(RelationshipExpression.java:216)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleSimpleValue.backwardChain(RuleSimpleValue.java:212)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.RelationshipExpression.backwardChain(RelationshipExpression.java:223)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleSimpleValue.backwardChain(RuleSimpleValue.java:211)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.ExpressionScopeSelect.backwardChain(ExpressionScopeSelect.java:40)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.RelationshipExpression.backwardChain(RelationshipExpression.java:223)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleSimpleValue.backwardChain(RuleSimpleValue.java:211)
         at com.oracle.determinations.engine.local.LocalAttribute.backwardChain(LocalAttribute.java:562)
         at com.oracle.determinations.engine.local.LocalAttribute.getRelevanceReport(LocalAttribute.java:515)
         at com.oracle.determinations.interview.engine.local.AttributeGoal.getNextScreen(AttributeGoal.java:113)
         at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getNextScreen(LocalInterviewSession.java:213)
         at com.oracle.determinations.web.platform.controller.actions.InvestigateAction.submit(InvestigateAction.java:99)
         at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doPost(WebDeterminationsServlet.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         at java.lang.Thread.run(Unknown Source)
    Edited by: Patrick Devine on Jul 18, 2011 3:23 PM

    Hi Patrick,
    The bad news is that your issue is due to a bug in the Determinations Engine. The good news is that there is a workaround. Basically there’s an implied directionality for all relationships which, for inferred relationships is defined by the direction in which you declared the relationship in the properties file. The problem only happens if you write your membership rule in the reverse direction to the one in which it was originally declared. In your case because your membership rule concludes the relationship ‘the benefits of the benefit plan’ you need to make sure that your relationship was declared in that direction as well. To do that, you’ll need to delete your existing relationship in the properties file and then create it as follows:
    Source: the benefit plan
    Target: the benefit
    Relationship Type: Inferred (Many to Many)
    Text: the benefits of the benefit plan
    Reverse Text: the benefit plan of the benefit
    We will fix the issue in the next release.
    Thanks,
    Kristy

  • JBO-25017:Error occurred while creating a new entity instance (URGENT)

    Hello, can anybody help me?
    We have a project that uses BC4J business components and UIX-based web tier. The entity object that causes this problem is based on Oracle table with 'ID' key field, the value is generated by means of 'before_ins' trigger that inserts appropriate sequence's next value.
    In the java EntityImpl-based class we redefine protected 'create' method of the base class:
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    SequenceImpl idSeq = new SequenceImpl("SEQ_CATPARAMETERS", getDBTransaction());
    setId( idSeq.getSequenceNumber() );
    The fault is in the third line - setId(...) causes the exception.
    The only description of JBO-25017 I found is
    http://www.ffpmp.ru/doc/rt/oracle/jbo/CSMessageBundle.html#EXC_ENTITY_ROW_CREATE, this one don't throw any light on the problem.
    Oracle server version - 9.2.0.1
    Oracle JDeveloper version - 9.0.3.10.35,
    BC4J version - 9.0.3.10.7
    Any ideas?

    Roman,
    It looks like you're trying to assign the Id in two places.
    EITHER:
    Override the create method to assign an Id when a new entity instance is created....
    OR:
    Define a database trigger to insert the Id (and set the "refresh after insert" attribute to true).
    [Maybe the error is thrown because you're attempting to set a field which is set to refresh?]
    Does that make any sense?
    Mike

  • PS/Bridge CS5 Batch Processor Not Working / Missing Scripts

    I'm having a bit of a problem within Photoshop/Bridge CS5 and haven't found anything that works to resolve it.
    In Bridge, I want to launch the Photoshop Batch Processor via Tools>Photoshop>Batch.
    When I select this, Photoshop launches, but the dialog to process the images never shows. On occasion, if I return to Bridge and attempt the same operation again, I'll get a notification that there's already something in progress and asks if I want to queue this operation. The other times (majority) I can return to Bridge and attempt the operation again but get no dialogues in Photoshop. I can try the other options in this menu as well (eg Image Processor, etc) and get the same results.
    Here's what I've done so far:
    1. Checked Bridge Edit>Preferences>Startup Scripts and ensured those were all checked. I even disabled all, closed Bridge and Photoshop, then re-enabled.
    2. Cleared all Preferences from Bridge and Photoshop (using Ctrl+Shift+Alt at launch).
    3. Reinstalled Photoshop (multiple times)
    4. Uninstalled Photoshop, ran the Adobe CS Cleaner application, then reinstalled Photoshop.
    It should be noted that in Bridge>Edit>Preferences and Startup Scripts, if I click the button to 'Reveal my scripts' the folder it takes me to is blank. Not sure if this folder is solely used for personal/user created scripts or for others as well, but it's completely empty.
    I have also gone to Help>Updates and updated both applications with any necessary updates from Adobe.
    If I go into Photoshop and select File>Automate>Batch or even File>Scripts>Image Processor, both dialogues open fine.
    Running Windows 8.1 Pro.
    Anyone else seen this and actually resolve the issue? Does anyone know where the scripts are supposed to be located and/or if I can get them from somewhere else? Any help is much appreciated

    Make sure Photoshop is not started and then try to use Bridge menu Tools>Photoshop>Batch does Photoshop start up?
    Bridge CS5 menu Tools>Photoshop>Batch works on my Windows 7 Pro system
    Photoshop Automate>Batch is not a script  and Photoshop does not any external java program it had its own version of java plugin.
    c:\Program Files (x86)\Adobe\Adobe Photoshop CS5\Plug-ins\Extensions\ScriptingSupport.8li
    c:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Plug-ins\Extensions\ScriptingSupport.8li
    However there are two startup scripts for the bridge involved Bridge and Photoshop  You must have them for you have a Bridge menu Tools>Photoshop>items
    two scripts on my system are:
    c:\Program Files (x86)\Common Files\Adobe\Startup Scripts CS5\Adobe Bridge\bridge-4.jsx
    c:\Program Files (x86)\Common Files\Adobe\Startup Scripts CS5\Adobe Photoshop\photoshop.jsx
    The photoshop.jsx seems to be the one the the inserts the menu Tools>Photoshop>Batch into Bridge and also invokes Photosgop Automate>batch  photoshop.jsx  also inserts the other Bridge menu Tools>Photoshop>Menu Itens that you state work.
    Here is what I see in my photoshop.jsx for batch.  I do not know or understand Bridge scripting and do not know javsscript but what I see there seems to be some checking done about Photoshop being available and if it is not the script just returns which is what you seem to be experiencing the test looks like this
      if (!photoshop.correctPSIsAvailable (availabilityCheckOptions))
      return;
    The whole batch support section follows:
    //=================================================================
    // Batch
    // Sets up Photoshop's Batch automation command to be
    // accessed from the Bridge.
    //=================================================================
    // This routine takes an array of files. If called by Photoshop,
    // it will invoke Batch with the files. If called by
    // any other app, it will send a BridgeTalk message to Photoshop
    // to invoke this routine with the same arguments.
    photoshop.batch = function (/* Array */ files, availabilityCheckOptions)
      try
      if (availabilityCheckOptions == null)
      availabilityCheckOptions = new AvailabilityCheckOptions ();
      // Make sure this can be run.
      if (!photoshop.correctPSIsAvailable (availabilityCheckOptions))
      return;
      if (BridgeTalk.appName != "photoshop")
      // Bring Photoshop to the foreground.
      BridgeTalk.bringToFront (photoshop.versionInfo.btTargetName);
      // Create a new BridgeTalk message for Photoshop to invoke
      // Batch with the selected files
      var btMessage = new BridgeTalk;
      btMessage.target = photoshop.versionInfo.btTargetName;
      btMessage.body = "photoshop.batch (" + files.toSource () + ");";
      btMessage.send ();
      else
      app.bringToFront();
      photoshop.runActionCommand ('batch', files,
      localize ("$$$/PSBI/Automate/BatchSettingsFile=Batch via Bridge Settings"));
      catch (error)
      if (error.number != 8007) // Don't report user cancelled errors.
      alert (error);
    // This routine is called when the Bridge's Batch menu item is
    // chosen.
    photoshop.batchFromBridge = function ()
      try
      var availabilityCheckOptions = new AvailabilityCheckOptions ();
      // Make sure this can be run.
      if (!photoshop.correctPSIsAvailable (availabilityCheckOptions))
      return;
      var files = photoshop.getBridgeFileListForAutomateCommand (true, false);
      if (files.length != 0)
      photoshop.batch (files, availabilityCheckOptions);
      catch (error)
      if (error.number != 8007) // Don't report user cancelled errors.
      alert (error);
    // The code below inserts the Batch menu item into the Bridge menus.
    if ((BridgeTalk.appName == "bridge") && (BridgeTalk.appVersion.indexOf (photoshop.versionInfo.bridgeTargetVersion) == 0))
      // Use temp function to keep vars out of global namespace.
      photoshop.tempFunction = function ()
      // Set up the info necessary for inserting this item into the Bridge's menus later.
      var menuItemInfo = new Object;
      menuItemInfo.text = localize ("$$$/PSBI/Menu/Automate/Batch=Batch...");
      menuItemInfo.name = 'Batch';
      menuItemInfo.onSelect = photoshop.batchFromBridge;
      photoshop.menuItemInfoArray.push (menuItemInfo);
      photoshop.tempFunction ();
      delete photoshop.tempFunction;

Maybe you are looking for