Business Rules - Date comparison

Hi,
I want to implement a business rule that depends on the number of days between two dates e.g. approve where date1 greater than date2 plus 10 days.
I'm calling Business rule via BPEL so am using XML Facts. What support is there for date types in the Business Rules?
K

There is no way to create this with a Business Rule, you have to write a custom workflow or SQL nightly job or something to update your fields.
Ok people start screaming.
"solution" if you want to call it that. USE AT YOUR OWN RISK, try in dev first :)
1. Create an Attribute / Column in your Entity and call it Today or something.
2. Go to Business Rules and create a dummy rule where you are setting this attribute (unconditionally with no Condition)
     Today equals 1/1/2000 or something.
3. Go to tblBRItem find this BR and etin ItemSQL  from N'1/1/2000' to GETDATE()
now you have Todays Date field...
OK NEVER MIND, I've tried it and it works, the problem is that tblBRItems gets updated via a stored proc and will overwrite your entry.
One can modify the code there as well but I don't have time to play with it unfortunately, as at that time you have to pass some token in to identify some values as your own special commands ... Either way this becomes messy and not a way to go.

Similar Messages

  • Business rules data condition

    Hi,
    I want to write a rules like this: If price in USD is null and (price in RUS is not null and exchange rate is not null) then calculate price in USD from RUS and exchange rate.
    How can I test null or not null in Hyperion Planning? Thank you

    If(usd==#missing)
    Do something;
    Else
    Do something else;
    Endif
    Cheers,
    Alp

  • Comparison of dates using Oracle Business Rule

    Hi to everyone! I have a business rule that has as input parameter a complex attribute with a date field inside named expiration. I want to compare the expiration field with the current date using a comparison function. I don't know where find the current date. The function Calendar.getInstance() return the current date? Any help we'll' be highly appreciated.

    Calendar.getInstance() will give you the current date, and to find out the days between two dates; use Duration.days between(date1, date2) + 1

  • Get cell value in Planning Data form and using it in a business rule

    Hi Everybody,
    if i set the data type of an Account Member as text, is there a way to get the value inserted by the user in a dataform, turning it as dimensional member and using it in a business rule?
    So, if the user insert the value "USA" in a cell, can i use any functions to tell essbase that "USA" is a dimensional member and then using it in a business rule, for example in a cross-dimension like Period1->FY12->USA?
    I tried to use the function @Member and it doesn't work, but i'm wondering if there is a way that can let me get the value inserted and use it just like a dimensional member. What are the ways that can let user input value that can be used in a business rule? I think one is by using SmartList, is there any other ways? Maybe using variables?? As an alternative i tried to use Prompt Variable but there are too many members on which the rule must run.
    Please help me, i wanna know if i can or not let the user input the member on which the rule must run...
    Thank all guys
    Bye
    Maurizio

    Thanks EW for your answer,
    YesI could use SmartList even if i think it's very tough to handle. My experience on using SmartList in caclc script is not so good. I try to enter in details of my requirement:
    I have 500 account members.
    For each one, I have to calculate the monthly budget by sharing the amount among the months. The user wants to calculate it on the basis of the actual flow(over the months) of an unspecified account of the prior year. The unspecified account must be inserted in a data form.
    So, i could use a Smart List but it colud be of 500 elements and then i should make a rule with as many IF as how many are the accounts. Or im wrong? The only way to use smart list dynamically in a business rule is by referring its values in a IF condition. Or i'm wrong.
    I tried to use execution variable ma it seems don't work. In this case the user must pay attention to write the account correctly, otherwise as you say the rule doesn't work.
    The value in PD0A020 is "PD0A000" (that is a dimensional member). The value in PD0A000 is "hello". In PD0A040 the rule returns "PD0A000" and not "hello" as i would. The function @Member appears to be not able to catch the dimensional member by the value in PD0A000.
    {Example}="test"->"Input"->"Scenario_test"->"FY12"->"PD0A020";
    Fix("test1","Input","Scenario_test","FY12")
    "PD0A040"=@Member({Example});
    endfix
    So, my doubt is: is it possible for Essbase/Planning to use the value inserted in a data form and to turn it in a dimensional member? What are the practicable ways to let the user input/choose the member on which makes the rule run?
    Thank you Ew, thank you guys
    Maurizio

  • Business rule for compare data in form

    Hi all,
    Let us explain my scenario,
    I have 2 dynamic calc members in a dataform. I just want to compare those 2 member rows( data compare) and show some message.
    is there any way i can make?
    can i create one business rule to make this happend? is it possible? If its possible can you give me your thoughts on this.
    Any information would be helpful.
    Thanks in advance.

    Sorry about that . . . . I read the first post and assumed the code was related to a business rule instead of JavaScript - should have looked closer.
    I would do a couple of things:
    1) Simplify your code. Why have a separate function? Why not drop all the logic into validateForm?
    2) Why haven't you populated the app name and form name in validateForm? (sorry if I missed this in the rest of the post somewhere)
    3) Insert alerts within the code that cycles through the cells. Something like this:
    cellVal = getCellValueXY(col,row);
    alert(" Column: " + col + "\n" +
    " Row: " + row + "\n" +
    " Cell Value: " + cellVal);
    This will tell you exactly how your JavaScript is evaluating each cell. This can help when you're dealing with floating point decimal issues. (you entered 10, but it's being evaluated as 10.00000001) If this ends up being your issue (floating point issues), let me know and I'll show you how to get around this.
    If you throw enough alerts at this code, your issue will finally show itself.
    4) I wouldn't assign values to "startCol" and "numberGridCols". I believe these variables are set elsewhere in the code (not in YOUR code, but in EnterData.js or somewhere else).
    Instead, I would use my own variables
    5) I would structure the code more like this: (I haven't validated this or tested it . . . . use this for suggestion purposes only)
    function validateForm()
    var valid = true;
    var c;
    if (equalsIgnoreCase(applicationName,"PUT YOUR APP NAME HERE")) {
    if (equalsIgnoreCase(formName,"PUT YOUR FORM NAME HERE")) {
    for (c=3; c<numCols; c++) {
    if((grid23[c] != missing) || (grid24[c] != missing)) {
    var actualVal = getCellVal(23,c);
    var budgetVal = getCellVal(24,c);
    if(actualVal != budgetVal){
    valid = false;
    if (!validated) {
    alert("The numbers you have submitted for SII are not equal to Actuals. Please adjust your numbers.\n");
    return valid;
    I hope this helps. Hopefully there aren't too many bugs in this.
    - Jake

  • IC data/booking - business rule

    Hi BPC masters,
    I am new with BPC and I have a couple of questions about IC data/booking and its business rule. I am sorry if it seems too basic.
    1) In the guide BPC440 and other guides available on the internet, we could see they are using ICDIFF01 in debit account in the IC business rule (see picture). What is that account ? Its hierarchy/parents ? Is there any screenshot to see what is its structure ?
    2) How does ICDATA retrieve records ? Does it simply find data for AR/AP and P&L where an intercompany dimension is recorded ?
    3) ICBOOKING posts the difference between IC for AR/AP. What about P&L ?
    Thank you in advance for any reply !
    Dat

    Hi Dat,
    1. ICDIFF01 is the specific dimension base member user need to create to store the result data of ICBOOKING.
    2. ICDATA calculate the results based on the business rule you defined and the source data in intercompany.
    3. You can create your owne business rule & dimension members to meet your specific requirement(P&L). BPC440 is simply an example.
    The guide BPC440 is simply an example. You need to customize all the dimension/business rule and logics according to your customer's fact business. So I suggest you not focus on the financial meaning of the account name or rule name too much in the example.
    Best Regards,
    Arjen

  • Business rule + compare date + problem in jspx

    Hi all ,
    i am useing Jdeveloper11.1.1.3 .
    i need to compare birthDate and employmentDate. birthDate must be greater than employmentDate at least 15 years.
    there is a business rule method in entity object impl file :
    * Validation method for InsuredPerson.
    public boolean validateInsuredPerson() {
    //start date must be greater than birthdate _ at lease 15 year (180 month)
    Date birthDate=getBirthDate();
    birthDate = (Date)birthDate.addMonths(180);
    Date startDate=getStartDateEmployment();
    if(birthDate.compareTo(startDate)==1) {
    return false;
    return true;
    when false eraise an error message wil genarate.
    when i test it in appmodule every thing is ok but by runnig jspx page :
    birthDate is --> 1970-05-05
    employmentDate --> 1991-05-05
    consider edit birthdate from 1970-05-05 to 1980-05-05
    so 1991-1980= 11 is < 15 --> error raise
    but in jspx year of birthdate changed to 1995 ==> 1980+15
    any body know why?or another way to develop it.
    Regards,

    I change my codes now it is ok .
    public boolean validateInsuredPerson() {
    //start date must be greater than birthdate _ at lease 15 year
    int birthYear=getBirthDate().dateValue().getYear();
    int startYear=getStartDateEmployment().getValue().getYear();
    int diff=startYear-birthYear;
    if(diff<15) {
    return false;
    return true;
    }

  • Business rules for check current date and session user

    MDS 2012
    Hi All! How to make validation business rules:
    1.  date < GETDATE()
    2.  current session user is UserName(), where UserName() - system function like in MS Analysis Services
    from Moscow with Love

    There is no way to create this with a Business Rule, you have to write a custom workflow or SQL nightly job or something to update your fields.
    Ok people start screaming.
    "solution" if you want to call it that. USE AT YOUR OWN RISK, try in dev first :)
    1. Create an Attribute / Column in your Entity and call it Today or something.
    2. Go to Business Rules and create a dummy rule where you are setting this attribute (unconditionally with no Condition)
         Today equals 1/1/2000 or something.
    3. Go to tblBRItem find this BR and etin ItemSQL  from N'1/1/2000' to GETDATE()
    now you have Todays Date field...
    OK NEVER MIND, I've tried it and it works, the problem is that tblBRItems gets updated via a stored proc and will overwrite your entry.
    One can modify the code there as well but I don't have time to play with it unfortunately, as at that time you have to pass some token in to identify some values as your own special commands ... Either way this becomes messy and not a way to go.

  • Validation business rule on a cumulative basis with periodic data storage

    Hi BPC Experts,
    Is it possible to set up a validation business rule on a cumulative basis when we have periodic data storage type?
    Appreciate your assistance with this.
    Thanks.
    Mila

    Hi Mila
    Please could you tell me how you solved the issue?
    We have it the other way round, a YTD storage, but would like to validate accounts on a periodic basis.
    Thanks for sharing your findings.
    Melanie

  • Validate data - business rules.

    Hi,
    We're using CDM Ruleframe to implement our business rules. As there was a need to bulk load a bunch of data, I disabled the business rules temporarily using the procedure disable_all_br.
    Is there a way to find out (afterwards) which of the records are in conflict with one or more business rules? I now that it can be checked for the static business rules via the procedure validate_all_statis_br, but what about the dynamic ones?
    Your replies are highly appreciated.
    Best regards,
    Nancy.

    Hi Vijay,
    just to make sure that I understand your scenario correctly:
    You import some business data in a table into the BRF+ (e. g. column1 = country, column2 = city ...). Now you want to process the lines of the table via a decision table namely one column (i. e. the corresponding business data) is equal to a condition column in your decision table (e. g. one condition  column = country).
    If this is the case I am afraid that there is no other option than to loop over your table with the data and evaluate the line with the decision table.
    Concerning your performance problems:
    In general there are a lot of notes that optimize the performance for the processing of decision tables, see these blogs:
    Great Performance Improvements in NW DSM/BRFplus
    Notes for Performance Optimization in BRFplus
    When you have your decision table in single match mode (so when the first matching entry is hit, the processing of the decision table stops and the result is returned) you can tune the performance be rearranging the row so that the ones that will match most propably are at the top of the decision table.
    Maybe there are combinations of data in your input that do not need to be processed in the decision table (I do not know your scenario, but theoretically that is possible) so perhaps you can reduce the amount of data that has to be processed by excluding these entries in the loop
    Hope that helps
    BR
    Christian

  • Error seeing business rule ( to be assocated with)in Manage Data forms list

    HI,
    I have a business rule, I see it in EAS console, but when I try to associate it with my Data form in Planning, i do not see this business rule in the list fo business rules that appear in Manage Data forms-> business rules tab. I hae associated thsi Business rule with my planning applicatiosn outline still I am not seeing it. Can someone please help.

    How does this relate to the Oracle Forms product?
    Craig...
    Edited by: CraigB on Feb 15, 2012 8:43 AM

  • Display of data after Business Rule Execution

    Hi Gurus
    We are using 11.1.2 and experiencing few problems with some of out Business Rules. The problem is, BR executed successfully and the resultant data is not displaying in the target form. As a workaround, we put a dummy value in any of the target's combination and re-execute the BR, this time BR gets populate the target cell. Pls advice what sort of problem is this???
    Thanks in advance,
    SNK

    It could be down to the business rule not creating blocks, by entering dummy data then you are creating the blocks and the rule will run as expected.
    Have a look at this post :- Re: Busines rule Issue
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Business Rule Deployment Date & Time

    Hi All,
    Can we know if a business rule is deployed or not, including the time and date for deployment?? This must be available in RDBMS i think.
    Like i tried a query which selects all the Business Rules and display created , modified and moved date and time.
    The issue is that the time provided by the result of query do not match if we access the same business rule through workspace --> calc manger--> specified application --> specified plan type--> and the rule name
    The query is
    select * from
    hsp_object ho
    where ho.OBJECT_TYPE = 115
    Regards
    Ace,

    vvipirailo wrote:
    It's in EPMA schemeIt should be in the Calc Manager schema/database if the products have been deployed to separate dbs/schemas
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to incorporate table data with Oracle Business Rule

    hello
    I want to use table with data in Oracle Business Rule can i do it.
    if yes please write how .
    with regs
    saleem

    Hi,
    like with coloring of cell according to value and so many.How to do that?
    Answer is, you can't
    Frank

  • Calculate Data Form - Business Rule

    I am a little confused on how the default "Calculate Data Form" business rule works which is available when we create a new data form.
    When run, does it calculate the entire cube as in it works like - CALC ALL; ? Or does it just calculate the dimensions/members specific to the form. I always thought that it is specific calculation for the data form - which considers the selection that we have in our POV, Page and rows and columns and it doesn't calculate the entire cube. Please correct me if I am wrong.
    If anyone has any resourse that has more about it, please share the link or information. It will be a big help.
    Please let me know.
    Thank you!
    ~ Adella

    Thank you so much John for responding to my question.
    So, if I understood it right you were telling me that it doesn't calculate the entire database, but it only calculates the subtotals for those specific member combinations that are there on the dataform and displays it on the form after the business rule is launched. Hope now I understood it right.
    Actually, I am running into an issue where I am just changing two cells on my dataform, then running the "Calculate Data Form" to see the totals changing accordingly but it is taking way too long than expected and also it is not rendering the right result. I am not sure what is causing this delay if it were only to calculate things specific to the data form and show the results.

Maybe you are looking for