Compile-time business rules

using apt i have embedded compile-time checks for particular relationships, e.g. AnnotationA exists (only) on ClassB, AnnotationC exists on subclass of ClassD, ClassE has 0..n refs to ClassF, ClassG declares AnnotationH, ClassI has 0..n fields/methods annotated (by), etc.
with a declarative programming approach, knowing what functionality a particular annotation declares, the absence/existence of this metadata can tell us about business relationships
with apt business rules can be enforced at compile-time
this approach provides an alternative to another thread posting
http://forum.java.sun.com/thread.jspa?threadID=5180602&tstart=0
and is available without spec change
i am interested in hearing if others are doing this
additional relationship
Message was edited by:
developer_jbs

Declarative programing has all but gone the way of
the doe doe because...
1: It is not flexible (It is extremely difficult to
change a complex system in a predetermined way)isn't this the "expert system" model?
2: It lengthens the development cycle (see item 1)
3: It normally forces the developer to add many
things to there code to get things to work, that have
nothing to do with the intent of the code.more things? the declarations or the declaration processing?
In its defense (I like a declarative model but, do
not like being forced into one)...not advocating a forced change in Java
1: It increases code safety.
2: It can shorten the development cycle, in certain
circumstances (especially if it is not overused),
because it can greatly increase the readability of
code.
3: It follows many best practices (although this is
also possible in a Non-Declarative model).as for best practices what I'd like to see are declarative design patterns, Adapter, Singleton, Factory, Delegate, Strategy, Interpreter, Proxy, Visitor
too often the design intent is lost in an implementation or design details can only be deduced by class/field/method names, comments, and accompanying docs
So, if everyone had unlimited time, and an unlimited
budget, yes declaritive is the way to go. Since that
is not the case, we filtered out 99% of what it gave
us, made sure the stuff that was getting in the way
was removed, and what do you have???
You guessed it OOA&D.
Now having said that should we be more declarative? I
think so, but I will tell you now, REQUIRING
declarative elements in code is a sure fire way to
get the majority of development groups to drop the
language (and I think Java as it stands currently CAN
be declarative, so if you have one of those unlimited
budgets, go for it!).no need to require it
I believe given good (reusable) declarative options, on top of OOP, will become the chosen approach
reusable design declarations would lessen overall cost and increase readability

Similar Messages

  • Question about compile-time legality rules for cast conversion

    Hi, In the rules which explain compile-time legality for cast conversion, it is often mentioned the following scenario in the cast conversion of a compile-time type S to a compile-time type T:
    if S is a class type then:
    if T is a class type then either |S| <: |T| or |T| <: |S| or a compile time error occurs. Furthermore, if there exist a supertype X of T and a supertype Y of S such that X and Y are provably distinct parameterized types and that the erasures of X and Y are the same, a compile-time error occurs.
    As regards the quote in bold, I imagine the following scenario:
    1) S <: T and extends Y
    2) Y<T1...Tn>
    3) X<T1..Tn>
    4) T extends X
    Does the above represents a supertype X of T and a supertype Y of S such that X and Y are provenly distinct parameterized types? If that holds, what does it mean that the erasure of X and Y is the same?

    Declarative programing has all but gone the way of
    the doe doe because...
    1: It is not flexible (It is extremely difficult to
    change a complex system in a predetermined way)isn't this the "expert system" model?
    2: It lengthens the development cycle (see item 1)
    3: It normally forces the developer to add many
    things to there code to get things to work, that have
    nothing to do with the intent of the code.more things? the declarations or the declaration processing?
    In its defense (I like a declarative model but, do
    not like being forced into one)...not advocating a forced change in Java
    1: It increases code safety.
    2: It can shorten the development cycle, in certain
    circumstances (especially if it is not overused),
    because it can greatly increase the readability of
    code.
    3: It follows many best practices (although this is
    also possible in a Non-Declarative model).as for best practices what I'd like to see are declarative design patterns, Adapter, Singleton, Factory, Delegate, Strategy, Interpreter, Proxy, Visitor
    too often the design intent is lost in an implementation or design details can only be deduced by class/field/method names, comments, and accompanying docs
    So, if everyone had unlimited time, and an unlimited
    budget, yes declaritive is the way to go. Since that
    is not the case, we filtered out 99% of what it gave
    us, made sure the stuff that was getting in the way
    was removed, and what do you have???
    You guessed it OOA&D.
    Now having said that should we be more declarative? I
    think so, but I will tell you now, REQUIRING
    declarative elements in code is a sure fire way to
    get the majority of development groups to drop the
    language (and I think Java as it stands currently CAN
    be declarative, so if you have one of those unlimited
    budgets, go for it!).no need to require it
    I believe given good (reusable) declarative options, on top of OOP, will become the chosen approach
    reusable design declarations would lessen overall cost and increase readability

  • Business rule takes time to open

    Hi,
    Business rule takes much time when trying to open it.
    I'm new to essbase. Can any one tell in which log i can get the information like why it takes much time like that.
    Thanks
    Kumar

    we are facing this issue for particular user. In the same system, we tried with two different users. for 1st user that BR is opened in a minute, but the same BR took around 20mins to open for 2nd user
    OS - Window XP
    EAS version - 9.3.1
    Example
    A is 1st user --> XX business rule took 1min to open
    B is 2nd user --> XX business rule took 20mins to open
    Here both the users are having same access on the BR and the applications
    Thanks
    Kumar

  • Members on rows, can they be passed to run-time prompt in a business rule?

    Hi!
    I have a input form which has a business rule with properties "Run on Save" and "Use members on Form".
    The business rule has run-time prompts (local variables) as follows (showing only the fix part of br...)
    FIX ([V_Year],[V_Version],[V_Scenario],@LEVMBRS ("Offering", 0),[V_Entity],
    [V_ICP], [V_Account])
    calculation...
    endfix
    Now my accounts are on rows and I would like pass those account members to the [V_Account] variable through run time prompt. The [V_Account] ís a local variable with Type "Members" in Account dimension. I have also selected 0-level accounts as limits. Other dimension members from page/pov seem be passed successfully to run-time-prompts.
    The run-time-prompt does not seem to be able to catch those account members on rows? Is it at all possible to pass members on dataform rows to run time prompts?
    kind regards,
    user637777

    Hi!
    Thanks John!
    I just have live with that and find another way to restrict the calculation regarding those accounts.
    kind regards,
    user637777

  • BPC 10.0 NW - How do I make Business Rules run one Period at a time

    I was wondering if anyone has a way to make business rules run one period at a time before moving on to the next to the next time period (i.e. January 2014 calc prior to moving on to February 2014).  In past SQL this could be achieved with a piece of script *CALC_EACH_PERIOD.  Is there anything like this that can be applied in the NW platform for Business Rules?  I have some logic that I want to run through a package on multiple periods at once.  Part of this logic contains a Business Rule that uses a value from the preceding period.  the Business rule appears to be calculating all time periods selected in the package at once so it is missing the piece that is supposed to come from the prior month unless the package is run one period at a time.  I need the logic to run sequentially by time period (oldest first) when more than one time period is selected.
    thanks,
    Keith

    Hi Vadim,
    Script for the business rule is below, it runs along with the FX_Trans rule in the same package  ( I have also attached a screen shot of the actual Business rule its self)
    *RUN_PROGRAM CALC_ACCOUNT CATEGORY = %CATEGORY_SET% ENTITY = %ENTITY_SET% CURRENCY = USD //GROUPS = %GROUPS_SET% TID_RA = %TIME_SET% //OTHER = [AUDITTRAIL=%AUDITTRAIL_SET%] CALC = CALC_HIST_USD *ENDRUN_PROGRAM
    Thanks, Keith Carlson

  • Sequence will not validate with run time prompts in business rules

    I am in Hyperion Planning v 1.1.1.3, with Workforce initialized. I am creating a sequence of business rules. The rules use run time prompts within them and validate when used on their own. However, when I insert them in a sequence the sequence will not validate, apparently due to the run time prompts.
    The sequence returns the error: Cannot calculate. Essbase Error(1200323): Error parsing formula for [FIX STATEMENT] (line 7): expression expected after [(].
    Line 7 in the business rule is as follows:
    FIX ([rtpYear],[rtpScenario],[rtpVer],[rtpCC],[rtpBU],[rtpEmp])
    The problem is not isolated to this business rule, it occurs with any rule I try.
    Can sequences function with run time prompts in the included business rules?
    Stephen

    I have figured out that if any rtp is hidden in the business rule, the sequence will not validate. Is this expected behavior for sequences?
    Additionally, hiding the variables in the sequence has no effect if the variables are not hidden in the rule. When launched from a menu in a web form, the user is prompted for values for all variables (except for the Execution Database Name) although they are prepopulated based on the members in the POV, Page, etc. Is this also expected behavior?
    I also find that it won't validate if "Merge launch variables" is selected (I have included rules associated with different plan types and with different dimensionality, so this may be expected). The user is prompted to provide values for every variable in each rule in the sequence, many of them duplicates (though, again, they are prepopulated based on members in the form).
    Stephen

  • Execution time of Business Rule

    Hi,
    My rule is taking more than a day to run. How can i watch its exact execution time. I can't see it in job console as it shows that the business rule is still in processing. And i have also checked in HSP_JOB_STATUS table. It also shows that it is in processing.
    Is there an other way to see the exact execution time of business rule.
    Thanks and Regards.

    To see the exact execution time, you can check in HBRlaunch.log file in planning.
    If you want to track the execution time of different parts of your calculation script/business rule then see the essbase application log in detail in EAS.
    To see log specific to your business rule, use maxl and spool log to text file, this will give you the logs related to your business rule only and the execution time.
    Thanks
    YSP

  • Business Rule Run Time Prompts not saving last values entered

    Hello all,
    We've had an SR open with Oracle support for several months in regards to this issue and they have yet to give us any constructive feedback. I'm hoping that someone out there has run into this and maybe found a resolution to the issue. We're running EPM Planning/Calc Mgr 11.1.1.3.04.
    Our Planning end users are trying to "use last entered value" to get the prompts to default to users last used values, in Calc Mgr for a variable which has limits idesc(dim) and is limited to the planning application scope. The variable has no default value set.
    However when they run the rule with a given value in the prompt, when they relaunch the rule later the prompt is not defaulting back to the last used value. We tried to redeploy the rule, just to see if it makes any difference but that seems to have no effect.
    Thanks in advance,
    -Bob

    Spoke to my EPM Analyst who is working this issue with support and has more functional knowledge of what is going on.
    She checked the members/member selection and this did not change the results.
    While working with Oracle support they did try to select "Use Members in Form" and this also did not change the results.
    No matter what they select with the business rules, it is not retaining that value the next time that it is run. The BR's require that you select a value when running so there is no way to use nothing as the default. My apologies if my description was misleading.
    Our analyst has been logging on and off using just her credentials and sees this behavior.
    The Global Variables checkbox for save last value is selected.
    Regards,
    -Bob

  • 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/

  • Edit Business Rules a Run Time

    Hi Friends,
    We can edit business rules at run time using SOA Composer if they belong to a SOA composite.
    Is it possible to edit business rules in non-SOA application at run time using SOA Composer or otherwise?
    Thanks,
    Sachin.

    Hi Ashish,
    Yes. I am referring to non-soa applications using Business Rules similar to grades application in below link:
         Creating a Rule-enabled Non-SOA Java EE Application
    When I deploy above application, I do not see the business rules dictionary available for editing in 'SOA Composer'. Does this mean that SOA composer can only show dictionaries belonging to SOA composite?
    And cannot show dictionaries in Non-SOA apps similar to one in above link?
    Thanks,
    Sachin.

  • Business Rule err The following value is not valid for the run time prompt.

    Hyperion Planning v 9.3.3
    I have created a new BR with 2 local variables (created at the time of the BR), Variables are set as run time prompts. They are created as "Member" (not Members). The BR basically does a calc dim on dense and Agg on Sparce other than the prompt on Entity and Version dimensions. The entity variable has a limit on level 0 of the dimension. The Version variable limits to the input (Submit and Sandboxes)
    The BR is associated in Planning with an input web form. Entity and Version are in the page. Is set to Run on Save and Use members on form.
    If the run time prompts Hide boxes are checked, an empty Prompt pops up with only a Submit button. Click the button and an error comes up: "The following value is not valid for the run time prompt it was entered for:. But it does not indicate what member - just ends in the :.
    The BR will run sucessfully only if the Run-time prompt is not hidden - "Hide" in the BR is unchecked. So the syntax and logic of the BR is correct and security should not be an issue.
    The client wants no prompt. In production we have similar situations in which the BR works with the Web Forms without a prompt.
    What am I doing wrong - I have tried restarting the Planning service and the EAS service.

    My preferred method of doing this is:
    1. In business rule, do not hide the run-time prompts. This makes it easy to validate the business rule as you are building it. I only use Global Variables.
    2. On the form, have business rule set to run on save, use members on data form and hide prompt.
    Check that in the business rule, for the variables (Run-Time prompts), that they are all in use. If not, delete them from the business rule. Are all your variables global? Are some local and some global? This could be the issue.
    Deanna

  • Business Rules (Planning 9.3.1) Failure when run time prompts....

    Has anyone experienced an issue where the Business rules failed because user entering in a fully numeric member name without the double quotes. We seem to be experiencing this in 9.3.1 planning. What is funny, is that I figured I would have caught onto this issues in previous versions. So I am wondering if it is just specific to 9.3.1. We have member names that are numeric (Empl ID, Entity, etc) so we'll use a business rule to do an employee transfer. Well users would enter this in without quotes and effectively crash business rules in all forms. When we test with the quotes, all is well. I am also wondering if the 9.3.1.1.7 patch release fixes this issue. Thanks for any insight to this.

    Hi,
    I always thought that you had to surround numeric values with quotes, it would be nice if it could distinguish that you were entering a member name so treat everything as text.
    I just had a look at a version of planning running 9.3.1.1.7 patch and it seems to be the same that you need to enclose in quotes otherwise you will get this :-
    [Wed Oct 15 09:14:36 2008]Local/BUDGET/north/hypadmin/Error(1200315)
    Error parsing formula for [REGION DEFINITION] (line 0): invalid object type
    [Wed Oct 15 09:14:36 2008]Local/BUDGET/north/hypadmin/Warning(1080014)
    Transaction [ 0x4b0002( 0x48f5a66c.0xaba18 ) ] aborted due to status [1200315].
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Using Y-T-D values in Business Rules

    Hi All,
    I am using Hyperion Planning 11.1.1.1.0.
    I have enabled Y-T-D dynamic time series in the application.
    I need to calculate YTD variance% , the formula to be used is :
    (Y-T-D(Oct)Budget - Y-T-D(Oct) Actual) / Y-T-D(Oct)Budget * 100.
    I have a business rule(created in EAS) that does the other variance % calculations which are pretty simple like Budget-Actual/Budget*100.
    The formuls for the normal variance Percentage works but i get an error when writing a formula for :
    "Variance%(YTDActual&YTDBudget)"
    ("Variance%(YTDActual&YTDBudget)"="Y-T-D(&CurrentMonth)"->Budget - "Y-T-D(&CurrentMonth)"->Actual / "Y-T-D(&CurrentMonth)"->Budget *100;)
    The error that comes up is as follows:
    Detail:Cannot calculate. Analytic Server Error(1200497): Error compiling formula for [Variance%(YTDActual&YTDBudget)] (line 2): unknown member name ["Y-T-D(&CurrentMonth)"] in function [operator @X]
    Can somebody please advice as how to use Y-T-D values in the formulas?
    Kind Regards.
    Mirka

    Here are a couple of tips that may help:
    1) You cannot directly reference dynamic-time-series members in a business rule or a member formula. These are "virtual" members. This is a common misconception.
    2) Even if you could reference these members in a formula, you couldn't store a value in them anyway, as they are dynamic.
    3) It usually doesn't make a lot of sense to calculate variances like these in a business rule. I would recommend making them dynamic, two-pass member formulas (not business rules) in your Scenario dimension. They don't need to be "Two pass" in the typical sense (eg. recalculating a ratio at the quarters), but they need to fire last, so set them as two pass. (otherwise you will end up with order of calculation issues where other calculations fire after the variance and you get incorrect results).
    In looking at your requirement, you don't really need a variance that calls out dynamic time series members. Simply create a variance scenario with a formula like @VARPER("Budget", "Actual");. If you have "Y-T-D(Oct)" selected as your time period in your form or spreadsheet, and "Bud vs Act %" (this is your new variance scenario) selected, it will calculate the YTD variance for October, or whatever time period you have selected.
    Just to recap:
    1) Create a new scenario called "Bud vs Act %". Make it dynamic and two-pass. Give it a formula of @VARPER("Budget", "Actual");
    2) Scrap your business rule. Add other variance scenarios as needed.
    3) Add your YTD member and your variance scenario to a form, and test.
    Hope this helps,
    - Jake

  • "Download" Business Rules

    I wasn't sure where to post this, but:
    Let's say I have boolean code sitting in a file on my computer that probably runs in java... :)
    I want to read the file into my program and use its boolean code to decide whether or not to do things (since there are many different types of business rules, but some of the same things are happening just at different times). The code doesn't really stop to recompile, after reading it, the program just uses the newly uploaded code.
    Is this possible, where would I find resources for this, what is it called? Any ideas would be appreciated.

    ...yeah all your comments were ridiculously helpful, not looking for more clearificationOk, fine. You go off and use the Java compiler tooling to do this. Then when you find out that the solution is non portable and doesn't really help with whatever your "real" problem is, that's all your problem.
    , looking for different ways, "names" of methods.Ok. Use Google. Seriously, if you know enough about this problem to know you need to dynamically compile source code, you must know enough to find the solution using Google. You don't need my help.
    If you do need help, then by definition you don't know everything about the problem. In which case you don't know that this is the best solution. But I can't help you find the best solution unless you tell me the problem you're trying to solve instead of the solution you've selected but can't actually achieve.
    It's not my problem either way.

  • Business Rule in trigger not working

    Hi,
    I have business rule that no one below 18 years should be employed in this system.
    I have created a trigger that alerts me so, but when ever I insert someone either over 10 or below, it fires and deos not insert any record, but if I deleted the trigger, everything works fine.
    I should have put a check constraint (s_hire_date - s_dob) < 6570 on the table, but I just thought should be able to do it.
    Why please?
    stops insertion of under 18 years into employee table
    CREATE OR REPLACE TRIGGER Tr_new_employee
    BEFORE INSERT ON employee for each row
    DECLARE s_hire_date DATE;
    s_dob date;
    begin
    select :NEW.hire_date, :NEW.dob into s_hire_date, s_dob from employee
    where empid =:new.empid;
    IF (s_hire_date - s_dob) < 6570 then
    raise_application_error(-20101,'Person too young');
    end if;
    end;
    Many thanks in advance
    cube60

    Hello Warren and All,
    Thanks for the code, the trigger did compile successfully, but prevents any kind of insertion whether over 18 or younger.
    SQL> CREATE OR REPLACE TRIGGER Tr_new_employee
    2 BEFORE INSERT ON employee for each row
    3 DECLARE s_hire_date DATE;
    4 s_dob date;
    5 begin
    6
    7 select :NEW.hire_date, :NEW.dob into s_hire_date, s_dob from employee
    8 where empid =:new.empid;
    9
    10 IF TRUNC(months_between(s_hire_date,s_dob)/12) < 18 then
    11 raise_application_error(-20101,'Person too young');
    12 end if;
    13 end;
    14 /
    Trigger created.
    SQL> COMMIT;
    Commit complete.
    SQL> --under 18 to time of hire_date
    SQL> EXEC NEW_EMPLOYEE('CHARLES','DICKSON','M','29-JAN-1992','PT2','','','','',sysdate,NULL,09890111
    ,'HSBC','WANDSWORTH','CURRENT','PR3');
    BEGIN NEW_EMPLOYEE('CHARLES','DICKSON','M','29-JAN-1992','PT2','','','','',sysdate,NULL,09890111,'HS
    ERROR at line 1:
    ORA-01403: no data found
    ORA-01403: no data found
    ORA-06512: at "SYSTEM.TR_NEW_EMPLOYEE", line 5
    ORA-04088: error during execution of trigger 'SYSTEM.TR_NEW_EMPLOYEE'
    ORA-06512: at "SYSTEM.NEW_EMPLOYEE", line 26
    ORA-06512: at line 1
    SQL> COMMIT;
    Commit complete.
    SQL> --over 18
    SQL> EXEC NEW_EMPLOYEE('WARREN','TALENTINO','M','29-JAN-1975','HOURLY','','','','','18-FEB-2001',NUL
    L,36901212,'BARCLAYS','SYDENHAM','CURRENT','TEMP7');
    BEGIN NEW_EMPLOYEE('WARREN','TALENTINO','M','29-JAN-1975','HOURLY','','','','','18-FEB-2001',NULL,36
    ERROR at line 1:
    ORA-01403: no data found
    ORA-01403: no data found
    ORA-06512: at "SYSTEM.TR_NEW_EMPLOYEE", line 5
    ORA-04088: error during execution of trigger 'SYSTEM.TR_NEW_EMPLOYEE'
    ORA-06512: at "SYSTEM.NEW_EMPLOYEE", line 26
    ORA-06512: at line 1
    I know your logic is fine, something might be wrong with the trigger even though it created succesfully. It is not doing what it is intended to do.
    Many thanks
    cube60

Maybe you are looking for

  • G-RAID with thunderbolt to Firewire adapter

    Hi, I just bought a brand new Macbook Pro with Retina display.  I also purchased a Thunderbolt to Firewire800 adapter with it to plug in the G-RAID mini disks I already had.  WHen I try to plug the G-RAID mini in the TBtoFW adapter it make a regular

  • How to read a .xls file ?

    Hi, Is it possible to read a row of an excell file (.xls) by using a BufferedReader in JAVA? I tried it by using the method readLine() but this didn't really work, it can read a line of a .txt file but when I use it on an .xls the result is just bogu

  • My Mortgage Journal (formerly: Would I qualify for an FHA Mortgage in ME?)

    CREDIT Scores:TransUnion: 624Equifax: 621 Negatives:Collections:$150 unpaid utility.  Was not aware of this - never contacted by utility or collection agency.  Found out about it myself after reviewing my report.  Contacted collection agency with a P

  • Family share invitations not being received

    I have set up family share via IOS 8 for my wife, and the invitation shows as being sent on my phone, but has not been received by my wife's email account. I have removed her invite and re established it several  times with the same result. Anyone un

  • Asian Fonts

    Hi, I have the habit of creating webpage into PDF format for offline reading. But recently i found out that there is a problem when the webpage is in Asian language, in this case, Chinese. When i try to do this, the fonts of Chinese webpage will turn