count the entity instances

Hello
I want to count the entity instances. OPA provides the same InstanceCount() function. However, only works if the entity instance screen is submitted. I want to make it work any any point. Any idea?

To control a flow on a summary screen, simply create a Boolean visibility attribute:

the flow is enabled if
   InstanceCount(the thingamies) > 0

Then, set the attribute for visibility on the flow on the summary screen "the flow is activated" with a default state of persons with disabilities (or hidden). Then, it will be hidden when the number of instances is unknown.

Tags: Oracle Applications

Similar Questions

  • Returns the value of the entity instance inferred relationship in determinations of SOAP

    Hey,.

    I had an original thread open that indicates the problem I tried to solve (as several Conclusion based on input values ). My rules database now behaves as expected and I can test it in the debugger, as expected, only now I can't identify it the actual return values, I wanted by using web service determinations.


    I get a whole bunch of entity instances inferred from a relationship deemed identical to the situation/screen shot at the bottom of the page "investigate an alleged relationship" on the Oracle policy automation Cloud Service Guide to the user, but in my SOAP response I get that bodies with chopped IDs. I want the real value of identification of the entity.


    for example, now 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 to figure out how to actually. Also is there anyone defines the meaning of the errors, you get the OPA? I tried to change my modules and I had a few mistakes of OPA-EXXXXX, but apart from the description you get in OPM, I can't find anywhere that gives more details on these and explains what they average and 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 to work by referring to this thread: deducted entity instance IDs following the release

    I had tried something similar but not quite the same thing. In the end, my application looked something like this:

    
       
       
          
             
               
              
                
              
              
                
              
           
             
             
                
                AHPY
       
              
          
       
    
    
  • A loop in the entity instances

    Hello

    I have a piece of complex rule and I want to run on an entity and calculate total based on the date range.

    for example:
    I have two entities: 1 person 2. income of the person.

    Suppose, income of the person has below attributes:
    type of income
    amount of the income of the person
    start date for the income of the person
    end date for the income of the person

    Now, suppose we go back three months jan 2013, 2013 February and March 2013 with sart as starting point the date month and end as the end of the respective month.

    Also assume that there are three attributes to the level of someone like... (1.) the total income of the person for the months a, back total for two months, income total for three months.

    Now, I want to write a common rule that will calculate the total income of a person in a given month.

    I do not want to write three different rules for each month to calculate the total.

    I'm fine if I want to create new entities to achieve this goal.

    Is it possible that we can make a loop on an entity to calculate totals?

    Thank you
    Fox

    You should probably add an entity under the income. We could call it 'month of the income of the person' or something like that.

    Otherwise: what happens if you have more than three months? What happens if you have a person with an income for a few years?

  • Create an Instance of the entity that is conditional on a screen

    We must stop to create instances of entity or to disable the creation of entity instances if the answer to a question from attribute on the same screen is = 1.

    For example

    If the answer to the question on a screen as - passport how much you care-> 1

    THEN

    Disable creation of more instances of entity on the screen

    Is there a way we can achieve this?

    I think that this can be achieved by modifying VM preference patterns - EntityInstanceCollectGroup.vm etc. where we can check the value of the attribute and therefore hide the entity instance collect buttons.

    But the problem is that it must be implemented on the same screen before submitting it.

    How can we achieve two things?

    Is it possible?

    It should be possible kertis, but you will need to write java script, the basic approach that I would take would be something like:

    -Listen to change that control the number of passports - hide or show the entity collect control as desired.

    -Save with an error event in the rules to ensure consistency.

  • Inferred entity instance IDs following the release

    Hi all

    I infer rules that create instances during execution (I created the rule inferred from table to create instances).

    • When I call presumed relationship as output in my SOAP parameter request, I see the instance as ID below.

    < typ:relationship - deducted node = 'false' id = 'dn:0 '. "state = 'unknown' relationship-id ="relationship_dCode"id-entity-target ="entity_dCode"instance-hypothetical = 'false' source-instance-id ="person1"id-entity-source ="no">

    < typ:target instance id = "0x20ea68f55a25e069" / >

    < typ:target instance id = "0x5fd5ccfae28dc88b" / >

    < typ:target instance id = "0x261535ead98d5adb" / >

    < typ:target instance id = "0x880709edc9e4e407" / >

    • When I call inferred entity as output in my SOAP parameter request, I see the instance as ID below. However, I can always code my java interface logic to examine each XML node and read my required xml element.

    < deducted typ:entity = "true" id = "entity_dCode" >

    < typ:instance id = "0x6381a2136c0a3da9" / >

    < typ:instance id = "0x7273ab94beb72c8b" / >

    < typ:instance id = "0xa62411c151585ff8" / >

    < typ:instance id = "0xca178414e829faa8" / >

    In these cases, I can always code my java interface logic to examine each XML node and read my required xml element.

    Please note that I kept config node requests, but I removed the decision-report of each node to make sure my query is for you all.

    But want to check with you all, if it is possible to return the ID of Instance with name public, followed by the sequence number, as it happens with other static entities. something like entity_dCode1, entity_dCode2 etc...

    I know that these are created dynamically the time of execution and OPA runs asynchronously in a way multi-threaded rules.

    Where generation of IDs is how I see it in the answer, but still want to confirm with you all, if my interpretation is correct or not.

    Kind regards

    Mohan

    Mohan,

    Unfortunately you couldn't do this with custom code. If you set up a listener of inference, you can probably explicitly define the IDS of all instances deciphered. Other than that, it is impossible to change the id (this is a UUID generated when the entity instance is inferred to true for the first time.)

    Depending on what you're trying to do, you can ask more results for your entities inferred using the ... item in the Configuration section of the application to evaluate.

    A result like:

    ....

    Been able to specify the returned attributes in an inferred entity should give you more options. For example, you should be able to return the identifying attribute that you created in the inference of the entity instance.

    Hope this helps

    See you soon

    Frank

  • Specify a Limitation for the inferred entity Instances

    Hello

    Under the section 'rules that infer relationships and entities write' in the user's Guide, it is the
    Notes /Limitations

    (1) combining manually created instances with alleged instances is not allowed.
    (2) combining deducted from instances of entity with time values is not supported.
    (3) only one attribute of the entity instance can be deducted under the rule of the entity. For example, the type of benefit ("unemployment allowance") can be defined, but the amount of the benefit must be paid via a separate rule.
    (4) instances of entity deducted does not contain the attributes of base level.
    (5) a relationship that is involved in an inferred entity instance rule is considered to be an inferred relationship. This means that a rule of inferred relationship cannot be used to prove the same relationship used in a rule of inferred entity instance.

    Number 4 is a little more detail?

    Thank you

    I guess you know the difference between a basic attribute and an inferred attribute, so I did not explain that here.

    Point 4 simply means that all of the attributes that sit within the suspected entity instance must themselves be deducted, that is not the basic attributes.

    An example of what you can't do is infer an entity instance in the creation and then ask questions on this instance during execution.

    See you soon,.
    Jasmine

  • deduct the entity combined with a relationship

    Hello

    I have a list of countries and a much larger list of cities, each containing a reference to the country that it is. Both lists are available in Excel.

    In an interview, I need the user to select a country, after which I want to reason based on the information of all the cities in that country.

    Because I don't want seeds before the interview with all this information, I would like to deduct from the country, as well as all the cities inside.

    My datamodel looks like:

    Global

    all instances of the country (= relationship)

    the country (= entity)

    all instances of the city in the country (= relationship)

    the city

    As a general rule, I would need:

    InferInstance (all instances of the country selected)

    All the properties in the country could come from the Excel sheet, which works very well. However, now I need to deduce an instance of 'city' for every city in the country that is inferred. Is there a way to do this?

    Any help is very appreciated!

    Thank you!

    Unfortunately it is not possible to deduce the entity instances in the Excel rules. Several entities must be created in MS Word table rules.

  • Creating entity Instances

    Hello
    I am writing a custom code to create instances of entity. The code is given below:

    * InterviewEntityInstance iei is arg1.getScreenData () .createInstance ("the_children", "children", (byte) 0);.
    iei.setValue ("children_name", "Fox");
    arg1.getScreenData () .addInstance (IEI); *

    However, when I place this plugin and run it it gives me following error:
    *
    one: 242)
    ... more than 22
    Caused by: com.oracle.determinations.interview.engine.exceptions.InterviewEngine
    Exception: Entity Instance already exists in the model: the_children [the children]
    at com.oracle.determinations.interview.engine.data.model.InterviewUserDa
    ta.addInstance(InterviewUserData.java:87)
    at templates.handleEvent(templates.java:45)
    ... more than 27 *.

    So I maybe although the instance be already there so I tried to get this instance using getEntityInstance()
    But then, he said that there is not the entity instance in the model... the_children [the children]

    I don't get this strange behavior. Experts that you comment on this? Does anyone have an idea about creating entity instances using java...?

    Thank you

    Calling createInstance automatically adds the entity instance created in the InterviewUserData, so by doing this then addInstance() you are trying to add the same instance of the entity twice and therefore the error message...

    If you try to create a new instance of the entity, you need to set the InstanceStatus = 1 not 0. You should also make sure that you provide the entity instance name is unique and if you use 10.2 +, the parent of the entity instance instance is set correctly.

    I suggest that take you a look at the API document for these methods for more information.

  • There is no model entity instance: c#

    c# code:
    presentation of the values for a session
    Return to display. GetInteractiveSession(). Submit (Screen)

    I get this error:
    There is no model entity instance: employer [#1 instance]

    Even if I see the instance in the debugger:
    {instance #1 = EntityInstance {entity entity {;} employer = identifier = 1; dirty rules = 153; user defined values = 2; known values = 5; unknown values = 139; uncertain values = 0}}}

    Related issue:
    Is there a c# example on how to create several instance of an entity?

    Thank you
    A

    If you could provide me with more details on what you're trying to do and how you are going to do, I might be able to help.

    Also how this appeared entity instance? If this was done by changing the session to rule directly, for example via an inference listener then this entity instance is actually considered to be deducted and trying to define future value on it will cause this error. If you want to automatically create the entity instance whose values can be changed through the interview, you must use the possibilities offered by the API of interview.

    Thank you
    Kristy

  • By comparing the child entity instances

    I have 3 entities (including global) say (global) Contact, case, product. There are 1:m relationship between Contact-> cases and case product. Say there are two cases of case (Case1 and CAS2) and each instance case has 3 instances of product (cases1: Product1, Product2, Product3;) Case2: Product4, HCnda5, product6). Now, I need to compare if any product is different from the cases1, CAS2 and in case any other product is then I need to update a field with "New Elements" (for example). I went through all the functions available in OPM, but could not find something suitable for this requirement. Please suggest.

    Thanks in advance.

    2738155 wrote:

    debugger is unable to identify that this case must be treated case of update and therefore not give output 'uncertain '. But once the case is selected manually, everything works fine. Please suggest.

    Which is expected. The two instances of cases will be treated identically until you describe which is the former stop and which is the new case. There are two ways to do this.

    1. manually to identify new cases and the elders by assigning a case as the target of another case of 'update of the case' relationship

    2. deduce the new case and the former by making her relationship 'update of the case"a deducted (you will need to change to one-to-many) and then writes a rule to assign a case as the target of another case of 'update of the case".

    The first option is fairly simple, the second option will result in a "is a member of the rule.

    the case (new) is a member of the update of the case if

    the new case is not the case; and

    The conclusion set out in the above rule is a statement IsMemberOf who deduct membership "updated of the case", using an alias to distinguish between "affair" (source) and "new case" (possible target).

    The first premise "the new deal is not the case" makes them a case cannot be its own update.

    After that, you need to add the rules that distinguish the case of update of the former judgment.

    The complexity with trying to reason on two instances of the same entity is why I suggested originally to use difference for the old and the new housing entities.

  • How to FTP an Oracle RDS instance to a server of the entity?

    Hi all

    I'm a newbie DBA. I have a task that describes to perform a backup of the instance Oracle RDS and FTP to a server of the entity. My question is how FTP this backup?

    RDS faq seems to say you can't do, you export instead, but I don't know enough about it to know if it's relevant.  Perhaps you should ask support Amazon or an Amazon RDS on board.  It could be a case of "If you do not have access through the dashboard, you can not see it" automated backup Amazon RDS - Stack Overflow

  • Impossible to find a solution to control the next dates on multiple instances of the entity.

    Hello

    I have a simple scenario. I have two instances of an entity that match two records of a component of bussiness in Siebel. I need to put a validation that the date of the end of an instance is the eve of the start date of the other.

    Using the functions Nextdate() etc. can be useful within the same instance, but the way to check on multiple instances?

    Any suggestion is welcome.

    If you want to exclude from the last instance, there are two options. You can set a Global attribute to the start date of the last session, for example

    the date of beginning of last session = InstanceMaximum (sessions, the start date of the session)

    ... then use this attribute as a filter in your other rules. If there are some things where you want to run the logic on the same subset of instances (e.g., the subset that excludes the last instance), then it might be useful to create an inferred relationship:

    1. in the properties file, create one-to-many relationship overall to the session. (Relationships that will be deducted must always be on many-to-many.)

    2. give the new relationship a unique and descriptive name for example 'the sessions (excluding the last session) '.

    3. write a membership rule to determine which instances of the entity are part of the new relationship, for example

    the session is a member of the sessions (excluding the last session), if

    start date of the session< the="" start="" date="" of="" the="" latest="">

    4. When you want to redo the subset of instances of logic, use the relationship 'the sessions (excluding the last session)' rather than 'the sessions', for example

    the end dates of the sessions are valid if

    ForAll (sessions (excluding the last session), the session end date is certain)

    Using the cross-entity argument version of my example above, the following rule could be set to TRUE:

    the end dates of the sessions are valid if

    ForAll (sessions (excluding the last session), the session end date is certain)

    Whereas this rule would have the value FALSE:

    the end dates of the sessions are valid if

    ForAll (sessions, the closing date of the session is certain)

    I hope that gives you enough to continue their career with your specific scenario!

    See you soon,.

    Jasmine

  • Create a concatenated string of attributes on Multiple Instances of the entity

    Hello world

    I wonder if someone has met this challenge, or ideas. We have been asked if OPA could produce a string containing the concatenation of the values of an attribute of text stored on multiple instances of an entity. The number of instances is variable, generally.

    Example: Assume that the attribute is "DayOfWeek", and we have an entity called "Appointment", with the authorities:

    appointment_1 (DayOfWeek = 'Monday')

    appointment_2 (DayOfWeek = 'Thursday')

    appointment_3 (DayOfWeek = 'Sunday')

    ... we need produce a string "AllAppointmentDays" = "on Monday, Thursday, Sunday.

    We don't think that this is possible without either: (a) an external system to generate the resulting concatenated string of the output, or (b) modules with the command of the approach to read the white paper Oracle in Nov 2012 (approaches to limits, thresholds and preferences), combined with hard-coding and the constraints on the length of the string.


    I was wondering if there was a better way to do it without external script or forced / hardcode.

    Thank you

    -Patrick

    I don' t know that an external implementation would be easier, but it could be more effective if well written.  Internal or external, you must decide how you want to classify or ordering entities before concatenation.  The order must be absolute (i.e. without fasteners).  Policies to 'solve' the first entity out of string and the string output of the policy to concatenate a string to produce this entity = the entity 'before' + ', ' + attribute of the entity are fairly simple.

    I guess the answer is: it is not necessarily a better way to do it in OPM and I don't think that there are constraints, or a more effective solution is necessary unless you already know you will work with a very large number of entities or very long strings.

  • Compare the instances of the entity

    Hello

    I want to compare two entity instance and to deduce whether or not they are same...

    Considered a person and he has two instance of person. Now, how can I get just the terms of this comparison of the name, age and sex.

    Thank you

    Fox

    See the help topic

    Examples of functions of rule of the entity and relationship

    Specifically the examples:

    the product is if duplicate

    ExistsScope (products, other product)

    product code = code for other products and

    InstanceEquals (product, other product)

    the employee has a conflicting identification if

    ExistsScope (employees, other employees)

    the employee identification code = code identification of the other employee and

    InstanceNotEquals (employee, the other employee)

    Hope that helps,

    Fiona

  • Re-evaluate the relationships after adding a new instance of the entity

    Hi all

    I have an 'X' entity for which global > X 1:M relations are evaluated on the screens. For example, after we collect the instances of 'X', the next screen ask you, out of all the X, which is a member of the relationship there. The interview continues.

    The question we now face is that if the user decides to add an additional instance of 'X' after having answered the relationship screen, screen relationship there does not appear once more.

    Ideally, we would like this screen once more, now that the extra 'X' was added, since it is theoretically 'unknown', they are also in the relationship Y or not. Instead, the debugger shows the relationship there is known and empty for the new 'X' entity instance.

    Is it possible to have this screen once more, once the new instance of the entity?

    Thanks for your help,

    -Julien

    Julien,

    The solution for this is not quite easy. Once the relationship is known to 'Y', the screen will be visited not unless the user chooses explicitly (usually data review screen).

    Event Manager solution

    A solution is to implement an event handler that sets the relationship 'Y' Unknown when the user adds a new 'X' entity. This requires custom code. See 'Events and event handlers' in the Guide of the developer of automation Oracle policy

    The entity implied solution

    Another (perhaps easier) solution is to infer the relationship 'Y' and collect information on the same screen that 'X' entities are added. This is best illustrated by an example.

    For the entity 'X', I'll use "person" global to the containment relationship no one is 'the people '.

    For relationship 'Y' I will use the global relationship person '' the special people. ''

    On the person entity, I have 2 attributes "name of person" (text) and 'the person is special' (Boolean)

    I have the following rule to infer the relationship '' the special people. ''

    the person is a member of the special people if

    the person is special

    The next step is to ensure that when you add features of person, they state "name of person" and "person is special."

    It will have 2 effects:

    1. the relationship "the special people" will be deducted, that there will be no screen to associate the relationship.

    2. for the collection of instances of the person, the extraordinary selection (or not) will determine members

    I think that the solution infers entity could be your best option. It requires no code and simplifies the interview.

    Hope this helps

    See you soon

    Frank

Maybe you are looking for