Application of the rules to Instances of entity in a sequence (multiple calls necessary?)

Hello

In my OPA team, we have a situation in which it would be useful to be able to run a series of calculations on a set of instances sequentially. We wonder if there is an acceptable method for this in a single call to a modules, because the OPA does not allow a loop or a sequential processing of data in a way that seems obvious.

Context:
Consider a situation involving a computation that can be performed on a single Bill, but we have a series of bills to deal with. For example, let's say that there are a certain amount of a deduction or "co-payments" that must be subtracted from the large bills, but is deducted in greater quantity of invoices received earlier (rather than be distributed also among them) and then will deplete fairly once was subtracted in all. In this case, it is not sufficient to use a statement of the type «for each of the Bills...» "because the conditions for the calculation have to change with each invoice. This seems to require the ability to browse an ordered list, but we do not know if something like this is possible (without violating an axiom or advised).

Ideas:
The best idea we could come to would be to use a time stamp to identify the Bill earlier as a starting point and then use the function of 'unknown' to force the rules to calculate the deduction for 'other' more former Bill in sequence. The current solution will be to call several times modules by an external script that loops through the Bills.

To sum up, we wonder whether there is an acceptable approach to apply a set of rules to an entity instance before to apply the same rules to others, without requiring multiple calls for modules.

Thank you!
-Patrick

Published by: Patrick guess on July 6, 2011 19:11

You started down the right path. To quickly answer questions, there is no need for multiple calls to the basis of rules, no for ranking explicit rules or data.

The challenge when using unordered rules / systems of determinations is out procedural thinking (that loops or sequencing data explicit is required). The solution is by expressing the declarative logic equivalent (which requires no sequence with the right answer). In this case, consider the calculation from the perspective of one invoice at a time and write the rules that express properly how much to pay, what is the quota, etc. For the batch processing where running tallies are needed, there is something practical for use in the rule based systems - conclude the subtotal per each item being counted (for example, remaining annual quota through each invoice). This approach allows the declarative rules which "defined" the method calculate the score by a Bill, so that the following invoices can use the score of previous bills. Unfortunately, the description abstract approach always sounds more confused, so here is an example of rule of pseudocode that can communicate the key elements of the approach...

Assume:
Bills have numbers (or dates/hours) which can be used to conclude an absolute order for all bills (we will use Bill in ordering them in this example)
Remaining annual quota of the person is the initial amount of copay remaining before the current batch of invoices is treated
Each invoice must include a co-payment of $50 (for simplicity, although this could be concluded by rules and vary based on the services provided, etc.)
Assume all bills are more than the share (again to simplify this example, this could be dealt with in the rules of both conditions)
The main objectives of the basis of rules are to determine the share of each invoice and the balance sheet of the share of the person (i.e. copay they may still have to pay this year) after treats a batch of invoices.

Pseudo rules to get the general concept:

Set the order in which the bills need to be addressed...
-The Bill (prior Bill) is a member of previous invoices of the invoice if the s prior invoice ID< the="" invoice's="">
-The Bill (later Bill) is a member of the subsequent invoices of the invoice if the invoice later s ID > ID of the invoice
-The Bill (Bill immediately preceding) is a member of if immediately before invoice
the immediately previous invoice is a member, if the prior Bill of Bill AND
the number of previous invoices of the invoice with ID > ID of the invoice immediately before = 0

To conclude the first remaining share of each invoice... put them in a table of rules, so they can conclude the same attribute but use different logical formulas
-Initial remaining Copay of the invoice = remaining share of the person if the number of the invoice is immediately previous bills is 0 (i.e. the first Bill in the batch)
-Initial remaining Copay of the invoice = share of remaining final invoice of the immediately previous invoice (i.e. each ' initial rest copay "is the same that the invoice immediately before the 'final remaining copay)

A table is used to define how much share for each invoice - two possible scenarios...
-Share of the invoice = $50 if the original invoice remaining share > = $50
-Share of the Bill remaining share = original invoice if the original invoice remaining quota<>

A rule to determine the final remaining share of each invoice (i.e. after subtracting the share upward through this invoice of the annual overall amount of the person)
-Copay remaining final invoice = remaining share original of the invoice - share of the Bill

A rule to determine the person remains final share (i.e. After all invoices in this batch have been processed)
-remaining share final person = final remaining share of the Bill if later the invoice s County bills = 0 (i.e. the final copay remaining of the 'last' Bill in the batch)

Note that some attributes and relationships above are not absolutely necessary (i.e., it is not necessary to postpone the two remaining original co-pay and determine a final remaining share by invoice, but it retains the logic of each a little more simple rule).

Hope that helps...

Tags: Oracle Applications

Similar Questions

  • Support for the creation of instances of entity through rules

    Hello

    Y at - it helps to generate an instance of an entity purely through rules? For example, if I have an entity called "VerificationItems", can I write a rule in the OPA, which will be an instance of this entity by element of verification that the applicant must produce (as a single instance for proof of address, a single instance for SSN etc.).

    Thank you
    Sam

    Hi Sam,
    I believe that the creation of the instance through rules is coming in 10.4, otherwise you will need to use a listener of inference to generate instances.
    However if the list of things that the applicant must produce is finite and knowable, then it could probably be done only through rules without having to generate instances. You could have them as rules in terms of the applicant, such as "the applicant must provide proof of address", "the applicant must provide a SSN.
    If the person has more than one address, then the rule of the 'evidence' should perhaps for each address, for example.

    We have implemented a system like this to do with the 'actions' in Sweden that work similarly to your suggestion, and it worked fine without the need to create these instances. I don't know the size of your modules but certainly create instances will have an impact on performance, so I recommend you to avoid if you can.

    Hope this helps,
    Ben

    Senior consultant
    Solutions of Monad
    http://www.monadsolutions.com

  • Restrict the creation of Instances of entity of an entity that is deducted

    Hi all

    I'm working on a script where I cut the engine of the determinations of the creation of instances of an entity that is inferred based on some condition. Explaining the scenario below:

    Entities

    -----------

    Global

    | ___EntityA

                                  | ___Entity B

    Here the entity B is contained by entity A and one-to-many relationship.

    Entries of the attribute in entity A, multiple instances get generated in B as I infer the values of all attributes and the relationship in A1.

    Now let's say I have multiple instances of entity A. This will create instances of level B for each instance of entity A. Here's how it should look like:

    [Entity has]

    | Instance ___A #1(value of the attribute ID = ' A-I1 ')

    [Entity B]

    | _B #1 instance (the value of the attribute ID = 'B- I1 ')

    | _B instance #2 (value of the attribute ID = "B- I2" "")

    | _B instance #3 (value of the attribute ID = "B- I3" "")

    | _B instance #4 (value of the attribute ID = 'B- I5 ')

    : _B instance #5 (value of the attribute ID = "B- I6 '" ")

    : _An instance #2(value of the attribute ID = ' A-I2 ')

    [Entity B]

    | _B instance #1 (value of the attribute ID = 'B- I1 ')

    | _B instance #2 (value of the attribute ID = "B- I3" "")

    : _B instance #3 (value of the attribute ID = "B- I6 '" ")

    : _B instance #4 (value of the attribute ID = 'B- I5 ')

    : _An instance #3(value of the attribute ID = ' A-I3 ')

    [Entity B]

    | _B instance #1 (value of the attribute ID = 'B- I1 ')

    | _B instance #2 (value of the attribute ID = 'B- I4 ')

    | _B instance #3 (value of the attribute ID = "B- I7")

    | _B instance #4 (value of the attribute ID = "B- I8" "")

    | _B instance #5 (value of the attribute ID = "B- I9" "")

    : _B instance #6 (value of the attribute ID = 'B- I5 ')

    In the above scenario, each instance of entity B have several attributes and entity A has only 1 attribute. Based on the value entered for the an attribute entity A instances will be generated under the entity B

    what I want to achieve with this scenario is based on the value of the attribute identifier should not be all instances in twice throughout the entire structure. For example, if the value of the Instance of entity B with B- I1 has been generated under the Instance #1(A-I1) of the entity has then it should not create an instance with the same value (B - I1 in this case) in one of the other instances of the entity a. based on the scenario, the structure should look like this:

    [Entity has]

    | Instance ___A #1(value of the attribute ID = ' A-I1 ')

    [Entity B]

    | _B #1 instance (the value of the attribute ID = 'B- I1 ')

    | _B instance #2 (value of the attribute ID = "B- I2" "")

    | _B instance #3 (value of the attribute ID = "B- I3" "")

    | _B instance #4 (value of the attribute ID = 'B- I5 ')

    : _B instance #5 (value of the attribute ID = "B- I6 '" ")

    : _An instance #2(value of the attribute ID = ' A-I2 ')

    [Entity B]

    : _B instance #3 (value of the attribute ID = "B- I7")

                                  

    : _An instance #3(value of the attribute ID = ' A-I3 ')

    [Entity B]

    : _B instance #2 (value of the attribute ID = 'B- I4 ')

    | _B instance #4 (value of the attribute ID = "B- I8" "")

    | _B instance #5 (value of the attribute ID = "B- I9" "")

    This requirement is type of emergency and guidance on this would be a great help.

    Thanks in advance

    Leila.

    Certainly not the right approach (by using a shortcut rule is almost never correct).  You need a good model and phrasings to make sense of an approach.  You will also need to express declarative "truths" in your rules.  Indicating that which is known to be true is a better approach (for declarative rules) that describe a desired outcome, given some data (procedural programming).

    I suggest you build this simple project first, and then experiment with the conditions of a rule.

    -Create a project

    -Add an entity "parent".

    -Add void entity under the parent named "child".

    -Go to the relationship with the mother (probably default to 'all instances of the child to the parent') - change this wording to "the child of the parent.

    -Open a document in the rule

    -Add a table

    -the conclusion is "the child of the parent.

    -The first column, first row "doors and windows". Firstly the condition (in the same row) ' parent = 'Hotel.

    -The first column, second line "another child" - Condition in the second row of 'TRUE '.

    -Remove the default line "otherwise".

    -Build and debug without screens

    -Add an instance of the "parent" and change its attribute ID to 'Hotel '.

    -Develop the "child of the parent" relationship and display two child instances "doors and windows" and "another child."

    -Add another instance of the 'parent' using 'Building' as the identifying attribute

    -Expand its children and notes ONLY a child "another child."

    -Export these test data to XML (more on that soon)

    Two important things to note:

    -the condition in the first row limited the creation of a child "windows and doors" to a specific parent instance (i.e. 'hotel').  Similar conditions "say" that the children must be created for parents.

    -children of each parent instance are (by definition) separate proceedings regardless of the value that you choose to use for their identification value (the value identifies, but is not necessarily unique in all of the different parents because the children of each parent are distinct from other children of parents).

    Back to XML... To prove the second point, look at the XML and note the structure (child entity is within the structure of entity (i.e. him "contained").   Also note the "id =...". ' attribute for the child instance is different for each of the bodies of THREE children.  There were 3 child instances deducted even though two of them show the same attribute value in the debugger.  you know there are three different instances because both appear under the first parent and the third appears as the second parent.

    I hope that this clears up misconceptions with "duplicates" you saw...

  • Application of the rules of mail on only some accounts

    I have 4 accounts IMAP entering Mail - one is, of course, iCloud.  Two are not, they come from my own URL and one is an Exchange Server.  I would like to have a set of rules that apply only to NON Exchange accounts = I don't want to filter e-mail Exchange, only the others.  I know you can make the choice of 'everything', but not how to set up to apply the rules to accounts 1-3 and not #4.

    I have Mail Act-on and hub mail, but have not seen how those who can do what I want.  Otherwise I am so far happy with Mail and apps and Yosemite, and the only question is to cease to apply the rules on the Exchange account.

    Thank you very much.

    Mail, view the headers of the messages that you are interested in differentiating, next to a single SMTP header since the servers in question and (the list of headers using change... in the selector to add rules) adds that the list of things that can be selected and sorted and then base your rules out this header entry.   You can sort - of make a general sequencing in the respect of the rules by placing a rule of 'catch-all' somewhere in the middle of the list, with a "stop evaluating rules" to prevent a future regulation to take effect.   As establishing a rule that simply detects a header only associated with Exchange Server and stops to assess all of the following rules.   Or something like.

  • Application of the rules in the ORDER MODEL

    Hello

    11 GR 2 DB.

    Please see the output below...

    My understandig is that - the rule "[c1 > 1] c2 = c2 [cv () - 1] + c3 [cv () - 1] ' is getting applied together all C1 > 1, then the rule 'c3 [c1 > 1] c2 [cv () - 1] =' becomes applid for all > 1 C1."

    How can apply the rules in the order? IE - find c2 [2], then c3 [2], then c2 c3 then [3] [3]...
      with t as
    ( select 1 c1,10 c2 from dual union all
      select 2 c1,20 c2 from dual union all
      select 3 c1,30 c2 from dual union all
      select 4 c1,40 c2 from dual-- union all
    )
    select *
    from t
    model
     dimension by (c1)
     measures (c2,0 as c3)
     rules upsert sequential order
     (
      c2[c1>1]=c2[cv()-1]+c3[cv()-1],
      c3[c1>1] = c2[cv()-1]
      );
    
    C1 C2 C3
    -- -- --
     1 10  0 
     2 10 10 
     3 10 10 
     4 10 10 
    Thank you
    SQL> with t as
      2  ( select 1 c1,10 c2 from dual union all
      3    select 2 c1,20 c2 from dual union all
      4    select 3 c1,30 c2 from dual union all
      5    select 4 c1,40 c2 from dual-- union all
      6  )
      7  select *
      8  from t
      9  model
     10   dimension by (c1)
     11   measures (c2,0 as c3)
     12   rules automatic order
     13   (
     14    c2[c1 > 1] = c2[cv()-1]+c3[cv()-1],
     15    c3[c1 > 1] = c2[cv()-1]
     16    );
    
            C1         C2         C3
    ---------- ---------- ----------
             1         10          0
             2         10         10
             3         20         10
             4         30         20
     
    
  • Creating new Instances of entity within the OPA

    This is another that I think I know the answer to, but I think that it is better to confirm.

    In earlier versions, it was not possible to create instances of entity within Office RuleBurst/Haley rules. Is this always the case in the OPA?

    For example, my periods are determine the status of a case and the reasons why this status has been determined. May be denied the status of the case and the reasons can be 'client invalid Id', ' expenses ratio too high income', ' main customer don't work is not long enough "etc. I want to return all the reasons of the State. While the list of grounds is predetermined, those that apply to a particular case are dynamic, like everything, but not all may apply.

    In view of this situation by using a database, I create an instance of the reason for each of them there are and bind it to the case. In the past, with the OPA predecessor (s), it was not possible to create new instances of in. They had all be spent in the module or a list of eligible reasons all attributes had to be created and then set true to those who have applied.

    My preference is to create instances inside the OPA. Are these features available in the current version?

    Thank you
    Terry

    Hello Terry,

    Michael is correct that you can not write rules at design allowing to dynamically create instances of the entity during execution time. However, new features of alleged of v10 relations might deal with what you're trying to do.

    You can write rules that conclude the accession of an inferred relationship. So you might still have, say, 10 cases of "reason" in all cases, but as for which of these instances apply in all cases, it depends on the details of the case. You can use a relationship inferred from gather up the entity instances that apply in this case.

    First, you must set up a regular one-to-many relationship to instantiate 10 instances during execution - this would be in the usual way. Then, you must also set up an inferred relationship and write rules for the relationship inferred members concluded. Instances that are part of the inferred relationship are then actually the list of entity instances you wanted to create in your example above.

    Take a look at this article OPM help: http://www.oracle.com/technology/products/applications/policy-automation/help/opm10_1/Content/Rules%20using%20entity%20instances/Reason_about_relship_between_2_entities.htm

    See you soon,.
    Jasmine

  • Generate a rule to show several instances of entity attributes

    Hey!

    Phil (the still waiting for beginner training here). I have a little trouble getting the aliasing to work when I want to perform a check on the same entity non-singleton.

    I have a scenario set up when an entity of non-singleton attribute 5 (let's call it 'the child') will generate a maximum of 10 times (source of data-> muiltiple Oracle dbs).

    I need to generate a rule (or rules) to report a failure when the no. recovered children is > 10 AND to display each attribute of the up of 10 entities "the child."

    so far I have generated the following:



    the BusRule (limiting the number of children) works correctly if
    the number of X_children < 11

    the number of X_children = InstanceCount (text value of relationship "the child")



    SO at this point I have a check for the number of instances of 'the child' entity and one indicator if there is > 10 entity instances (so I'm halfway there!)
    I played with the following to try to display each of the attributes of each of the children (up to 10) that are returned (below is the first example, I tried with the child.firstname attribute)


    Display of up to 10 X_children attributes works if
    ForAllScope (text value for the "child" link, children)
    and
    first name of the MCH is known * the number of X_children


    HOWEVER - I get the HTTP 500 error (stack trace indicates the modules failed to load cos ' Subpremise to quantify local must be Boolean "). I kindof get the bulk of the error response, but do not understand why he thinks that it is Boolean.

    All I need essentially to know is 1. How to view each of the attributes for each instance of the entity and 2. What I'm doing wrong.

    As in my previous post, I feel that I should apologize because I'm not sure if I provide enough information or even good info for anyone to understand what I'm talking about because I have yet to attend training (I only used the tool for the last 2 days) and so I'm limited to trawl through the help files , so I appreciate any help/advice anyone can provide!

    NB: I'm using OPM v10.1

    See you soon,.

    Phil

    I have not read all the details here, but for purposes of validation, error or warning events are another option to consider.

    ForAll requires you to put your condition in the same line (the condition is generally defined as a rule by the way).

    ForAllScope allows you to continue your rule to put conditions on the following (indented) lines of the rules. If you want to disambiguate on a reference to the same entity in the bottom of your rule conditions, ForAllScope allows you also to alias of this entity in the lower part of the rules to another name. For example, this allows you to talk about "brothers and sisters" as part of one of the kids 'parents.

    Davin.

  • How to make a single instance of the application regardless of the main application and the other entry point for the application

    Hello experts,

    I explain the sceniro of my application. My request is mainly a time system as well as some other features related businesses. My app has a landing screen which is actually a custom made calendar that accumulates information captured time. There is also a time where entry screen user at will has worked time and other related information. The user has the option to run the application manually at the entrance of the time and see the reports and there the event listener to follow the events of call/SMS/e-mail that invokes the application automatically and user to the scree of time entry.

    Problem one: I used headphones to follow the events of call/SMS/e-mail. When an event is called, alternet point of entry of the application the application is running. Application then get calls time, contact information etc. and push my entry screen with pre-filled information time.

    As such, it works very well, as expected, but the problem is the number of instence that he is creating. Each track event creates a new instance of the application. I want to keep only one instance.

    Two problems: to solve this problem, I removed the other point of entry and RuntimeStore to keep the running instance of my application. This instance of the application in a way keeps in singletone as such when the listener calls the application it finds that the application is running in the background. Then she moves the application to the foreground. It works very well, I mean the application user interface called on the foreground, but he won't have to time entry screen automatically as I hope. The block of code is as follows,

    public static final long applicationID =0x8ddc44508679bd5bL;
    static NSIApplication NSIInstance=null;
    RuntimeStore runtimeStore = RuntimeStore.getRuntimeStore();
    
    if (NSIInstance != null)
                {
                    NSIInstance.requestForeground();
                }
                else
                {
                    synchronized (runtimeStore)
                    {
                        NSIInstance = (NSIApplication)runtimeStore.get(applicationID);
                                            //listener initialization
                        NSIListener.Initialze();
                    }
    
                    if (NSIInstance != null)
                    {                   NSIInstance.requestForeground();
                                        //event's info manipulation and push the time entry screen                                     NSIInstance.RUN_NSIApplication();
                    }
                    else
                    {
                        NSIInstance=NSIApplication.getInstance();
                        NSIInstance.RUN_NSIApplication();
    
                        synchronized(runtimeStore)
                        {
                            runtimeStore.put(applicationID, NSIInstance);
                        }
    
                        NSIInstance.enterEventDispatcher();
                    }
                }
    

    I expect a guideline to follow so that I can reach the expected my workflow. Thanks in advance

    I can't propose to use the runtimestore to store instances of the application, as it was used on an example RIM, he has never worked for me.

    I suggest to use a single point of entry and the automated screen using a global event or status in the runtimestore.

  • Can I have a form only for all instances of the application of the same type? (OIM 11 G 2)

    Hi all

    I have dozens of instances of the application of the same type (DBUM connector) so I was used to specify the same shape and the same user object while creating instances of the application.

    Is it safe? Or is it better to create a new/different shape for each instance of the application?

    Many thanks and best regards.

    Even if this is the answer, I would say that Yes, always use the same form name in the instance of the application. Recently came across the issue in R2BP10 and R2PS1BP02, where there are several child forms an instance of the application if different names are used for the name of the form in the instance of the application, then the form does not display data in the user interface.

    -Marie

  • How can I keep only one instance of the javafx application at the same time?

    Hello
    How can I keep only one instance of the javafx application at the same time?
    Let not the user run the javafx application is running on your PC.

    Hello. This program does what you want. You can probably find a better solution.

    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.*;
    import java.nio.channels.FileLock;
    import javafx.application.Platform;
    import javafx.stage.WindowEvent;
    
    public class Simpleapp extends Application {
    
        public static void main(String[] args) {
    
            launch(args);
        }
    
        @Override
        public void start(Stage primaryStage) throws Exception {
    
            final File file = new File("flag");
            final RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw");
            final FileLock fileLock = randomAccessFile.getChannel().tryLock();
    
            System.out.print(fileLock == null);
            if (fileLock == null) {
                Platform.exit();
            }
    
            primaryStage.setTitle("Hello World!");
            Button btn = new Button();
            btn.setText("Say 'Hello World'");
    
            StackPane root = new StackPane();
            root.getChildren().add(btn);
            primaryStage.setScene(new Scene(root, 300, 250));
    
            primaryStage.setOnCloseRequest(new EventHandler() {
    
                @Override
                public void handle(WindowEvent arg0) {
                    try {
                        fileLock.release();
                        randomAccessFile.close();
                        System.out.println("Closing");
                    } catch (Exception ex) {
                        System.out.print(ex.getMessage());
                    }
    
                }
            });
    
            primaryStage.show();
        }
    }
    
  • Cannot start the application in the Server Instance

    I use jDeveloper:

    Oracle JDeveloper 11g 11.1.1.0.0
    Studio Edition Version 11.1.1.0.0
    Build JDEVADF_MAIN. BOXER_GENERIC_081002.2127.5156
    Copyright © 1997, 2008 Oracle. All rights reserved.
    The IDE version: 11.1.1.0.31.51.56
    Product ID: oracle.jdeveloper
    Product version: 11.1.1.0.31.51.56

    Using the tutorial, I was able to create and test my WebService "HelloService". Then, I created a page of HelloClientADF. When I tried to deploy it to the Web service by default, I get this error:

    Redeploy the Application...
    < 19 February 2009 00:46:36 this > < WARNING > < J2EE > < BEA-160195 > < application version of the lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the Web service application is not versioned. >
    < 19 February 2009 00:46:39 this > < error > < HTTP > < BEA-101216 > < Servlet: 'HelloServicePort' failed by preloading at startup in a Web application: "WebService-Annotation-context-root".
    java.lang.NullPointerException
    at weblogic.wsee.wsdl.WsdlTypes.collectNamespaces(WsdlTypes.java:213)
    at weblogic.wsee.wsdl.WsdlTypes.collectNamespaces(WsdlTypes.java:229)
    at weblogic.wsee.wsdl.WsdlTypes.collectNamespaces(WsdlTypes.java:229)
    at weblogic.wsee.wsdl.WsdlTypes.parse(WsdlTypes.java:151)
    at weblogic.wsee.wsdl.WsdlDefinitions.parseChild (WsdlDefinitions.java:520

    Now, I'm not yet able to test the Web Service as it fails with the same error.

    Is there any solution for this? Please give me your feedback. Thank you.

    There is a bug in JDev 11 g that prevents you to run a single application that has a Web Services and the ADF page.
    The solution is to create an application that has Web service - and run it.
    Create another application with the parts of the ADF, and then run it.

    See: http://www.oracle.com/technology/products/jdev/htdocs/11/knownissues.html#wsdl1

    Published by: Shay Shmeltzer, February 19, 2009 16:49

  • Assignment of identifiers automatically or using the value of basic in the rules

    The question is quite simple. I want to order the instances of an entity. How these bodies are classified are of no importance. The problem is that the only information available on instances of the age, which may be one of several bodies and makes impossible to order. Is there any way to assign an identifier automatically apply this ranking, say 0... the number of instances - 1 or is - it possible to use the value of an instance of rules?

    A loop is a bad choice here - a recursive function would end in the same logical dilemma on the tie-break as you you. (If I can offer any advice it would be that the rule loops should be a last choice as a general rule, not a first, they are certainly not as easy to manage as recursive functions in a standard programming language).

    Essentially, you want to work on the price of the ticket (IE an attribute at the level of the entity of ticket):

    the price of the ticket =
    0; If the number of tickets more expensive than me + number of tickets as well as me<= number="" of="" free="">
    nominal value * number of tickets I have to pay for my price/number of tickets, the same value as me; If the number of cheaper tickets than me < number="" of="" free="" tickets="" and="" number="" of="" tickets="" more="" expensive="" than="" me="" +="" number="" of="" tickets="" same="" as="" me=""> number of free tickets
    otherwise the price of the ticket face value =

    where the number of tickets I have to pay for my price = number of cards of the same value that me - (free tickets - number of cheaper tickets than me)

    As I said, you can use alleged relationships to help you work on:
    number of cheaper tickets than me
    and
    number of tickets as well as me

    Published by: Sean Reardon on April 11, 2013 08:35

  • Fill the list with Instances

    Hi all

    Is it possible to fill the results in a drop-down list with the name of the entity instances.

    for example, I instantiated instances 4 x by the name of the child as part of the entity of children.
    HARRY
    BARRY
    SALLY
    LARRY
    Then on a separate screen, I want a drop-down list to be filled with the name of the child.

    for example
    Maybe, I have a question:
    what is your favourite child (which is a drop down showing 4 instance names (HARRY,BARRY,SALLY,LARRY)
    I'm on v10.1


    See you soon

    Hello

    There is a way to make this out-of-the-box, but all depends on your data model.

    I assume here that you have 2 entities, the person and the child. The child has an attribute called 'name of the child. "

    Creates a one-to-one between the person and the child relationship, that he calls "the child preferred person '...

    Then, create an individual question screen. Add a control to the "relationship of entry" to the screen in question. For the 'legend', write something like "Please choose your favorite child." For the "attribute" display, choose the name of the child.

    This will display the question exactly as you want - it will ask the user to select from a list of all children.
    Of course, if the person can have many favorite children, create a relationship one - several. However, this will display the names of the children as the boxes, because the user is now allowed to select more than one.

    If the relationship is just together, you can then use this relationship to access the name of the favourite on the level of the individual child (using InstanceValueIf), or you can run the rules that apply only to the favorite child.

    It's just a suggestion that Ive just tested in 10.3, I did 10.1 at hand at the moment but don't remember which is new to the brand (others, please correct me if I'm wrong). Give it a go, see if it works and get back to me, if it's not. If this does not work on 10.1 you should certainly consider the upgrade to 10.3 for a host of other reasons too. Otherwise, it is achievable with a custom control.

    See you soon,.
    Ben

    Ben Rogers
    Senior Consultant - Monad Solutions
    http://www.monadsolutions.com

  • Problem with the rule while the data is loading files

    Hello

    I'm having a problem trying to load data to an application that uses rules files. Load data files were from another application using the DATAEXPORT. I have two files for each entity. One is for the current year and one for next year. The source and target applications are different, so I do all the mapping using rule files.

    The data of the current year file contains data for CurrMonth:Dec & CurrYear. The following year data file contains data for Jan: Dec and the next. I made rules for each entity files load data into the application and has made the mapping when creating these rules files using set 12 months.

    The problem that I am facing is that I'm able to correctly load the following year in the target application, my rules file is the right month for each column mapping. But for the year underway, I have just 2 columns of data (whereas & CurrMonth = Nov) and so when I'm trying to load the data file using the rules file, it is to map the November and December months like January and February and charging at these months of FY11, which is false.

    I don't know how to solve this problem. The current year data file it will always change in terms of months then how can I modify the rules that he recognizes that the months are coming in and where to put the data.

    Please let me know your suggestions. Any help will be appreciated.

    Thank you!
    ~ Hervé

    PS ~ it was the same problem, I was faced with a few months back when I posted this question and I followed the advice in this post, but always faced to the question - DATAEXPORT and rules files

    Published by: Gwen on December 20, 2011 08:25

    Adella,
    We have faced a similar issue and we were able to solve it by sticking to these months dimension members (& currmonth: dec) and generate the header
    The export file created when paste us the dimension names in front of months on the export file
    Suppose that your export file is currmonth.txt and she Nov and Dec
    first line of your export file should look like this
    'Version' 'Year' 'Scenario' "XYZ" "123" "ABC" "Account", "Nov", "Dec".
    We have created a batch file to add this to the original export file, it looks like this
    Paste d "\0" Header.txt "D:\Hyperion\products\Essbase\EssbaseServer\app\xyz\123\currmonth.txt" > "D:\Hyperion\products\Essbase\EssbaseServer\app\xyz\121\currmonthchange.txt".

    Header.txt is a text file that it contains ("Version" "Year" "Scénario" "XYZ" "123" "ABC" "count")

    change your rules file so that it generates the header in your source (currmonthchange.txt)

    rulefile--> the properties of data source--> header--> data records source header--> recording containing the names of data filed charge (set 1)

    I hope this will solve your problem

  • Force evaluation of the rules for the non-existent entities and unknown attributes...

    Hi all

    I have another issue potentially easy for the gurus of the OPA in this forum - there must be a simple explanation to this question but I'm just not see it.

    The problem that I am having with several of my rules, it's that the conclusion is not evaluated due to the non-existent entity instances or unknown entity attributes. As an example of the first scenario, I have a rule that checks for the existence of an instance of an entity with a type and status. The conclusion is evaluated as if there is at least an instance of this entity, otherwise, the conclusion remains unknown.

    Similarly, I wrote an equation to annualize all its (financial) obligations in a case, where the frequency of the obligation can be weekly, fortnightly, monthly, etc.. I created an attribute for each type of frequency, which are then added to the equation. The issue in this example, is that the equation does not conclude if there is not a value for each attribute in the equation. For example, if:

    assign 1 = A + B + C

    where A = 1, B = 2 and C is unknown, does not examine the attribute from 1 to 3, but will remain unknown. Logically, I expect that the lack of a digital defaults to 0, and rather unknown attribute value, but this is not the case.

    I looked at the 'Certain and known operator rule examples' help topic to try to understand how assign a value to an unknown attribute, but the example at the bottom of the topic page does not provide a sufficient explanation as to how the logic:

    point of the total team = team 1 round points + points of the round 2 team + team of turn 3 points

    the team of the round 1 points = 0 if
    Round 1 team points (such as recorded by the team) is unknown

    the team from round 2 points = 0 if
    etc.

    It seems from the example that there are 2 attributes used to the same variable: [team of the Tower, 1 points] and [team of the round 1 points (such as recorded by the team)]. It is not clear to me how the original equation can be concluded if the values are stored in the alternate attribute [points of the round 1 team (such as recorded by the team)] etc.

    I have also considered using fragments of rule by the help topic "Prove an attribute using multiple rules", while I could use two equations separated to set the value of an attribute according to the circumstances, that is to say:

    assign 1 = A + B + C

    1 = 0 if attribute
    attribute 1 is unknown

    This attempt results in a logic loop error, probably because I am trying to set the value of an attribute based on the same attribute value.

    Any help will be greatly appreciated!
    Philippe

    Hi Philippe,.

    I suggest the following way to solve this problem, although there are other ways too.
    You can use a table of rules for it.

    Open a Working Document, and then press 'Alt + Z' created a rules table.

    Use the following rule: -.
    Keep the text in bold in the left-hand column and the text in italics as a condition for the title in the right column. Use a correct indentation during the compilation of the rules.

    -------------------------------------------
    Attribute 1
    -------------------------------------------
    *0*     any
    A is unknown or

    Uncertain East
    and
    any
    B is unknown or
    B is uncertain
    and
    any
    C is unknown or
    C is uncertain
    ----------------------------------------------
    Has any     
    B is unknown or
    B is uncertain
    and
    any
    C is unknown or
    C is uncertain
    ----------------------------------------------
    A + B C is unknown or     
    C is uncertain
    -----------------------------------------------
    A+B+C in the opposite case     

    Thank you
    Sofiane

Maybe you are looking for