Business Rules and Dates

I have many Java POJOs imported as facts. In each of these POJOs there is at least 1 date property.
How am I to use these dates in my rules. for example:
pojo.date > '08/22/06'
pojo.date < today
println(pojo.date)
Although I have imported the java date class and have been over the docs many times, I cannot seem to figure out how to use the dates properly.
I'm also having a similar problem where I have large numbers stored as doubles. When I make a rule like: pojo.largenumber > 3000 I get the error :
Cannot perform operation. 'RUL-01726: Data type operator for >, at position 0: java.lang.Long > int '
Thanks for the help,

smartel2 wrote:
I understand we need to compare like values, just as we would in java and other
languages. however, I am trying to use the Rule Author to enter my rules, as my end
user / business analysts would. When I use the rule author I can't seem to use any of
the Date methods for example using the expert mode in the Rule Author
pojo1.getStarttime ().compareTo(pojo2.starttime)
gives: "Cannot perform operation. 'RUL-01717: "compareTo" is not a valid identifier
name. '" when I apply it.Ah, I see. You are doing this correctly. You need to import the Date class into the datamodel and then check the "expand" option for the getStarttime() method of the fact type of pojo1 (or, the expand option if there is a starttime bean property). It should show up then.
I also don't understand why my previous example "pojo.largenumber > 3000" would
need a conversion. Shouldn't the interpreter be smart enough to know that the left
side of the expression is a double and auto cast the right side constant '3000' as a
double to satisfy the condition?The error indicated that "largenumber" was a Long object, not a primitive double. If largenumber was a double, the cast should be done correctly. If it's not, it may be a bug. Post the code for the pojo class if you think otherwise.
How do I use the Rule Author to create these kinds of rules?I think the above mostly covers this one.
How would I use the Rule Author to create a rule for "pojo.startdate is after Sept 1, 2005"One suggestion I have is that you use the Calendar class instead of Date for doing date manipulation. Date is mostly deprecated, and basically only servers as a wrapper for a long number (seconds since the epoch). Most importantly, Date is not internationalizable.
Calendar has full support for locales, timezones, and all of the other necessary stuff for appropriately handling dates. A simple example of the reason for this class is that date formats differ significantly, for instance, "01/07/89" is January 7th, 1989 to an American, but is July 1st, 1989 to a European. Depending on the format, it could be July 1st, 0089 to a computer.
So, the answer to you question is to create a final variable that represents the date (either a Calendar or Date) and then use that. With Calendar, you have to also use the SimpleDateFormat object to initialize it. I would probably write a function to initialize all of the global final date objects.
How do I use standard java objects and there methods in the Rule Author, like Date.Answered above I think, but the short is to import them into the DataModel and then check the "expand" option for the property or method of that type that you want to access its properties and methods.
Do I have to create all my rules in pure RL language (full script) ?Could you clarify this question?
And finally, fully integrated date support is one of the things that's being worked on for the 11g release, so this should be much easier to handle in the future.

Similar Messages

  • Business Rules and BPM

    Anybody here knows the difference between Business Rules and BPM..
    We can do pretty much everything with a Business Rules Engine as we would do with BPM , then in which scenario should we use BPM and in which scenario should we use Business Rules Engine?
    Ofcourse Business Rules Engine has more complex set of rules than any BPM product in the market for .eg. ILOG Business Rules...

    BPM and a rules engine are different. Both are important, but they have different uses.
    Oracle BPM Studio is used by Business Analysts and Developers to model processes, integrate underlying components (including business rules) and develop user interfaces.
    There's an Engine that executes the processes that have been modeled. It sends the work item instances to the right person or persons with the right data when the work item reaches an interactive activity in the process. Similarly the Engine has invokes the underlying components specified in the process when the work item instance reaches an automatic activity.
    There's an out of the box Workspace runtime that lets end users manage and run their work item instances as they flow throughout the processes.
    We can business rules inside the processes, but one does not replace the other.
    Dan

  • Business rules and active databses

    All,
    Are there any good links where I can read about the limitations of active database features (such as constraints and triggers) and other options and alternatives to implementing business rules?
    Regards

    BPM and a rules engine are different. Both are important, but they have different uses.
    Oracle BPM Studio is used by Business Analysts and Developers to model processes, integrate underlying components (including business rules) and develop user interfaces.
    There's an Engine that executes the processes that have been modeled. It sends the work item instances to the right person or persons with the right data when the work item reaches an interactive activity in the process. Similarly the Engine has invokes the underlying components specified in the process when the work item instance reaches an automatic activity.
    There's an out of the box Workspace runtime that lets end users manage and run their work item instances as they flow throughout the processes.
    We can business rules inside the processes, but one does not replace the other.
    Dan

  • JHeadstart, Oracle Business Rules and BPEL Process Manager

    Dear JHeadstart Team,
    I have some questions regarding integration of JHeadstart and Oracle Business Rules and Oracle BPEL Process Manager. As a matter of fact I don't have any work expriences with these tools so my questions may not be good and precise.
    1- Using a business rule engine can dramatically increase speed of development and ease of maintenance.I had a very good exprience in using JHeadstart and Headstart in the past but I wanted to know if it is possible to use Oracle Business Rules in conjunction with the JHeadstart ? If so, What steps should be taken? Is there any known issue about this integration? Does Oracle Business Rules have any interference with JHeadstart or it is only used in model layer during insert,update,delete?
    2- Is it possible to develope a system based on oracle work flow engine (Oracle BPEL Process Manager) using JHeadstart ? If so, What steps should be taken and how the changes in the flow of work would by applyed in a system developed by JHeadstart. Is there any known issue about this integration?
    Any help,link to documents or general guidelines would be highly appreciated.
    Thanks in advance,
    Navid

    Couple of things I would like to add, are the following.
    In the context of an ADF application usage of Oracle Business Rules most likely is in the business logic layer, but mind that it does not need to be restricted to that.
    Oracle Business Rules takes so called 'facts' as input, evaluates some rules based on that and change those facts or return some result. That might be checking a business rule as defined in the JHeadstart Developers Guide. But it might also return some value that is used in a navigation rule.
    Think about a page flow where after page A normally page C is presentend, but in case of some situation (like a customer ordered something and you want to present some special offering based on that) you want page B presented in between (i.e. A -> B -> C). Oracle Rules could be used to determine this page flow. This would be an example of using it in the controller layer (probably in combination with using facts that come from the model layer).
    Another remark that I would like to make, is that in my opinion it does not make much sense to use Oracle Rules for business rules that logically more or less are part of your data model (like end date must be on or after begin date). You typically use Oracle Rules to implement business rules that are of a volatile nature, meaning that day-to-day business may require a change of the rules. One example is the navigation case that I mentioned before. Another (typical) example would be a rule that defines when a customer is a Gold customer.
    Jan Kettenis

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

  • Problem with balance carry forward business rule and automatic adjustments

    Hi All,
    I faced with issue when run BCF business rule and consolidation process. According sap courses BPC440 members with A(automatic adjustments) type should carry forward automatically, and I(imputable), M (adjustments) members should carry forwarded by bcf business rule.
    When I set up my BCF business rule I use property "Category_for_ope" in Category dimension. But this rule not work properly, then I use notes:
    1784365 - Category_for_ope property should not effect Consolidation.
    1902677 - The property category_for_ope shall work for consolidation
    After applying those notes, system work as I aspect. After i run consolidation first time system carry forward my automatic adjustment from Category "Expected" to "PLAN_Y0" and this is correct!!!. But when i run consolidation process second and third time system duplicated automatic adjustments in Category "PLAN_Y0".
    Someone can help me with this Issue?
    And sorry for my english

    Hi,
    Can you try as follows :
    *RUN_PROGRAM COPYOPENING
    CATEGORY = %C_CATEGORY_SET%
    CURRENCY = %RPTCURRENCY_SET%
    TID_RA = %TIME_SET%
    *ENDRUN_PROGRAM
    hope it helps...
    regards,
    Raju

  • Document on XML date rules and date management

    Hi,
    Could you Please send a document on XML date rules and date management. I really in need of it. You may send it to [email protected]

    Hello
    Could you please email this to me:  [email protected]
    Thanks in advance
    Kevin

  • How to find unsued Transfer Rules and Data Sources for a Master Table...??

    How to find unsued Transfer Rules and Data Sources for a Master Table...?? My requirement is i need to delete those Transfer rules and Data Sources which are not in use

    Hi
    Go to manage of the Text or attirbute of the master data object, see what are being loaded daily from there and delete the remaining.
    Cheer
    Ans as expected, Please reward

  • Need material on business content and data extraction

    hi
      friends
                iam new to BW i Need material on business content and data extraction  , plzz send me without help.sap material to my mail id [email protected]

    Hi,
    Pls check ur inbox....
    Also go thru this link....
    http://help.sap.com/saphelp_nw2004s/helpdata/en/37/5fb13cd0500255e10000000a114084/frameset.htm
    Hope it helps,
    Thanks,
    Happy Life,
    Aravind

  • 9.3.3 Upgrade, null pointer exception when accessing business rules and mac

    Hello,
    We upgraded from 9.3.1 to 9.3.3. In the Essbase Administration Services Console, when I attempt to access business rules or macros from a client PC, we get a null pointer exception. The message does not tell us much, but I cannot find more.
    I can access business rules and macros using EAS Console from the server. Do I have a bad installation, or have I missed a step?
    Thank you,

    Hi,
    You might have to re-organize your application module hierarchy to place your common code.
    If your intension is to auto populate the primary key for your Entity Objects., I would suggest below common practice.
    1). Create a Base Entity Impl class for your project that extends oracle.jbo.server.EntityImpl
    2). Code your getDbSequence() method inside this base entity impl class
    3). Make sure that all your Entity Objects extend your base entity impl class
    4). Use EL expression to call this method for auto-generating primary key attribute of your Entity Object.
    e.g., adf.object.getDbSequence("sequenceName")
    Regards,
    Eshwar

  • Planning application Business rules and Rulesets are disappearing

    Hi,
    Our Planning application Business rules and Rulesets are disappearing after services refresh.
    *2011-09-28 09:45:24,740 WARN Thread-16 com.hyperion.calcmgr.common.GenericLogger - [Hyperion][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (EPM11_CALC.UKCALCMGRDEPLOYEDVIEW1) violated*
    2011-09-28 09:45:24,740 WARN Thread-16 com.hyperion.calcmgr.common.GenericLogger -
    com.hyperion.calcmgr.common.CalcMgrLog4jLogger$HBRLogThrowable
         at com.hyperion.calcmgr.common.CalcMgrLogger.warning(Unknown Source)
         at com.hyperion.calcmgr.excp.DatabaseException.<init>(Unknown Source)
         at com.hyperion.calcmgr.excp.DatabaseException.<init>(Unknown Source)
         at com.hyperion.calcmgr.excp.DatabaseException.throwException(Unknown Source)
         at com.hyperion.calcmgr.database.DBDeployView.add(Unknown Source)
         at com.hyperion.calcmgr.database.DBDeployedView.setDeployedStatus(Unknown Source)
         at com.hyperion.calcmgr.database.DBRepositoryManager.setDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.core.CalcMgrServer.setDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.core.CalcMgrServerService.setDeployed(Unknown Source)
         at com.hyperion.calcmgr.core.DeployManager.updateDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.abl.planning.PartialDeployer.deploy(Unknown Source)
         at com.hyperion.calcmgr.abl.planning.PartialDeployer.deploy(Unknown Source)
         at com.hyperion.calcmgr.abl.core.DeployThread.run(Unknown Source)
    2011-09-28 09:45:24,740 WARN Thread-16 com.hyperion.calcmgr.common.GenericLogger - Error while executing query: 'insert into CALCMGRDEPLOYEDVIEW (PRODUCTTYPE, APPLICATIONNAME, APPLICATIONID, PLANTYPE, CALCTYPE, OBJECTID, OBJECTTYPE, NAME, DEPLOYTIME, BODY) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'
    2011-09-28 09:45:24,740 WARN Thread-16 com.hyperion.calcmgr.common.GenericLogger - [Hyperion][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (EPM11_CALC.UKCALCMGRDEPLOYEDVIEW1) violated
    java.sql.SQLException: [Hyperion][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (EPM11_CALC.UKCALCMGRDEPLOYEDVIEW1) violated
         at hyperion.jdbc.base.BaseExceptions.createException(Unknown Source)
         at hyperion.jdbc.base.BaseExceptions.getException(Unknown Source)
         at hyperion.jdbc.oracle.OracleImplStatement.execute(Unknown Source)
         at hyperion.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at hyperion.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
         at hyperion.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
         at com.hyperion.calcmgr.database.DBDeployView.updateDB(Unknown Source)
         at com.hyperion.calcmgr.database.SqlTable.insertDB(Unknown Source)
         at com.hyperion.calcmgr.database.QueryContext.insert(Unknown Source)
         at com.hyperion.calcmgr.database.QueryContext.insert(Unknown Source)
         at com.hyperion.calcmgr.database.DBDeployView.add(Unknown Source)
         at com.hyperion.calcmgr.database.DBDeployedView.setDeployedStatus(Unknown Source)
         at com.hyperion.calcmgr.database.DBRepositoryManager.setDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.core.CalcMgrServer.setDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.core.CalcMgrServerService.setDeployed(Unknown Source)
         at com.hyperion.calcmgr.core.DeployManager.updateDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.abl.planning.PartialDeployer.deploy(Unknown Source)
         at com.hyperion.calcmgr.abl.planning.PartialDeployer.deploy(Unknown Source)
         at com.hyperion.calcmgr.abl.core.DeployThread.run(Unknown Source)
    2011-09-28 09:45:24,740 WARN Thread-16 com.hyperion.calcmgr.common.GenericLogger - Error while executing query: 'insert into CALCMGRDEPLOYEDVIEW (PRODUCTTYPE, APPLICATIONNAME, APPLICATIONID, PLANTYPE, CALCTYPE, OBJECTID, OBJECTTYPE, NAME, DEPLOYTIME, BODY) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'[[Hyperion][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (EPM11_CALC.UKCALCMGRDEPLOYEDVIEW1) violated
    com.hyperion.calcmgr.excp.DatabaseException: Error while executing query: 'insert into CALCMGRDEPLOYEDVIEW (PRODUCTTYPE, APPLICATIONNAME, APPLICATIONID, PLANTYPE, CALCTYPE, OBJECTID, OBJECTTYPE, NAME, DEPLOYTIME, BODY) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'[[Hyperion][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (EPM11_CALC.UKCALCMGRDEPLOYEDVIEW1) violated
         at com.hyperion.calcmgr.excp.DatabaseException.throwException(Unknown Source)
         at com.hyperion.calcmgr.database.DBDeployView.add(Unknown Source)
         at com.hyperion.calcmgr.database.DBDeployedView.setDeployedStatus(Unknown Source)
         at com.hyperion.calcmgr.database.DBRepositoryManager.setDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.core.CalcMgrServer.setDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.core.CalcMgrServerService.setDeployed(Unknown Source)
         at com.hyperion.calcmgr.core.DeployManager.updateDeployStatus(Unknown Source)
         at com.hyperion.calcmgr.abl.planning.PartialDeployer.deploy(Unknown Source)
         at com.hyperion.calcmgr.abl.planning.PartialDeployer.deploy(Unknown Source)
         at com.hyperion.calcmgr.abl.core.DeployThread.run(Unknown Source)
    java.sql.SQLException: [Hyperion][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (EPM11_CALC.UKCALCMGRDEPLOYEDVIEW1) violated
         at hyperion.jdbc.base.BaseExceptions.createException(Unknown Source)
    Thanks
    Radhika

    This post may be helpful - Re: Business Rules are disappearing from forms in Hyperion Planning v 11.1.1.3
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Planning ,Business rules and Reporting Analysis Backup

    Hi
    Currently we have migrated our Hyperion Planning EPMA 11.1.1.2 applications from TEST to PROD on windows 2003 Server (2 boxes).Essbase Server on UNIX and Application Server is OAS.We need to take backups on daily basis for Hyperion planning, BR's ,Reporting Analysis , Financial Reporting and Essbase , Open LDAP.
    But now We are taking only backups for Essbase and Open LDAP by using maxl script and Backup.bat file (Scheduled in Windows Scheduler)
    As per the documentation we are going to take the backups for the Hyperion planning, BR's ,Reporting Analysis , Financial Reporting also.
    Our concerns are
    1)Is there any BAT files for planning , BR'S and Reporting like open LDAP Backup.BAT
    2) If doesn't have how can we move ?(not manually, Using Windows Scheduler)
    3) Is there any necessity to create new Batch scripts for this action?
    Could you please any one help me out.
    Thanks in advance

    Hi,
    There are no other batch scripts I am aware of, you will have to create any new ones.
    In regards to backing up with business rules and planning, that would be mainly be backing up the repository.
    You can also use LCM to export your objects and this can be called from command line.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Error message when processing business rule and dimenstion

    Dear BPC Experts:
       While I am testing BPC FX Restatement pacakge, I make most use of original se-up in APSHELL, and just do some some config in related dimension and business rule. However, when I process business rule and dimenstion, one message shows that "_unexpected error in application server"._ And I still tried to run FX Restatement package, in detail log, it says "Member USD not exist." Does anyone help me figure out the reasons? I really appreciae your help.
    Fred Cheng

    Hi,
    I am not sure if the configuration of MSMQ is fine at you side, it is better to check my how to document too as here I clearly mentioned about MSMQ steps.
    This is the direct link: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101531ad-bcf5-2b10-ac9c-c102908c1b7f
    Just skip the ABAP part and follow the MSMQ part.
    regards,
    Sreedhar

  • Calc script, Business rule and business rule macro

    Hi John,
    Can we use calc script , BR sequence and a BR macro against different databases at a single go.
    In one calc script or BR sequence or BR macro itself can i calculate 2 databases

    If possible could you not start every post with my name, there are lots of others helping on this forum and they provide excellent answers
    Calc Scripts run against one database.
    Sequences can contain multiple business rules, in the launch variables you can set the database to run against for each rule (outside of the planning application though)
    Macros are called from a business rule and are run against the database the calling rule is being run against.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Unable to find Transfer Rules and Data Source for 0PERSON Info Source

    Hi,
    I'am working on SALES ANALYSIS Configuration with the help of SAP Best Practices.
    I'am trying to load Master Data Attributes/Texts/Hierarchies.
    I'am able to load for allmost all the InfoPackages which i created for particular DataSource.
    Now i need to load master data for 0PERSON InfoObject under that Person (Attributes) and Person (texts) are there,for this 2 Transfer Rules and the DataSource has to be defined by default as it is defined for other Attributes/Texts/Hierarchies.But i'am unable to find a DataSource and Transfer Rules to create a infopackage for PERSON Attributes and Texts.
    Please gudie me with a solution in order to get these Transfer Rules and DataSource for this Attributes and Texts.
    With regards,
    Pradeep.B

    Hi,
    Install the corresponding master data objects from Business content. Go to data source find out the needed datasource, replicate it. If you want you can migrate it also.
    If still you are not getting 0person masterdata object datasource & transformation structure, then you have to create the transformation, Infopackage.
    Hope if you will install the business content again, it will solve your problem.

Maybe you are looking for

  • Service tax reverse mechanism

    Dear all, How to configure the Service tax reverse mechanism. Pls advise below how to configure below scenario Bill of Vendor - Service cost        100,000.00 Add. Service tax @12.36% of service cost 12360 Bill value       112,360.00 Vendor provide b

  • No Records in Error Stack

    Hi, I've created a Standard DSO on top of a flatfile datasource. I have few records in flatfile with special charcters like @, ~ etc. When I activate the data in DSO, activation fails with invalid SID message. Request turns red and no data are writte

  • Using access with 64 bit labview

    Hello, I have 64 bit version of Labview, and I want to use an access database.  I used the internal search for examples, and it showed an example in examples/comm/access.llb.   Well, that does not exist with this install.  (I did a 32 bit install, an

  • Why don't my videos (movies) display file names?

    I have about 20 movies on my Lumia 928, but the file names don't display.  The movies play fine, but it would be nice to know the names of the movies without having to play them.

  • Get Mail NOTHING ...... Quit & Reopen NEW MAIL!!

    Yeah so, I click 'Get Mail'....no new email. I close Mail, and reopen, and BOOM new emails pour in. wth?