BusinessRulesInBc4j.pdf

Friends, tell me please:
What method we should use instead method: compareTo(Date) in order to compare two Dates?
Hint says me: Method 'compareTo(oracle.jbo.domain.Date) not found in oracle.jbo.domain.Date.
Vladimir Zimin

Vladimir,
First, create an exception class like this:
package oracle.jhsdemo.model.exception;
import oracle.jbo.JboException;
import oracle.jhsdemo.ResourceBundle;
* JHeadstartDemo-specific exception class that extends JboException.
* This class should be used to throw model exceptions.
* The class calls super in each constructor with JhsUserMessages
* as resource bundle class.
public class JhdJboException extends JboException
     // Constructors
     public JhdJboException(java.lang.String errorCode, java.lang.Object[] params)
super(ResourceBundle.class, errorCode, params);
     public JhdJboException(java.lang.String errorCode)
super(ResourceBundle.class,errorCode, null);
* Get the translated message and strip off product and error code.
* We do this because the errorCode (which includes JHD-) is included
* in the message text. We include it in the message text so it will
* be displayed as well, when not throwing a JhsJboException, but
* directly creating a Struts ActionError or ActionMesage in the web tier.
* @return translated message
public String getMessage()
String message = super.getMessage();
// strip off product code and error code
int pos = message.indexOf(":");
if (pos>0)
message = message.substring(pos+1);
return message;
Change the reference to oracle.jhsdemo.ResourceBundle to refer to your own resource bundle.
Now, instead of a call to JhsdemoUtils.displayJhsdemoUserError you can use:
throw new JhdJboException("JHD-00014");
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • Business rules in ADF-BC

    Hi JHS-team,
    I found an Oracle white paper on BR's in ADF dated April 2004. In it are, amongs a lot of other interesting stuff, examples on howto code business rules. These rules usually "raise" an error when it gets violated (for example a change in civil state) by calling a method addUserError(). This method is no longer part of JHeadstart 10.1.2; see the revision history in class AdfbcUtils which says: "removed addUserError methods (not applicable anymore with ADF)".
    Now for my question; why is addUserError() no longer applicable with ADF and how should an exception be raised now?
    Thanks,
    Tim

    Tim,
    You can find the answer in this post: BusinessRulesInBc4j.pdf
    Steven Davelaar,
    JHeadstart Team.

  • Business Rules in BPC10NW

    Hi folks,
    I have a question, which I'm hoping someone can answer...
    I need to build a ton of Business Rules, and this terrible web front end (we are using version 10, not 10.1) makes this take much longer.
    I found an old post to automate the loading of Business Rules from CSV files, but it related to 7.5 and of course everything "under the hood" has changed since then (no separate header and detail tables, etc.). I don't know ABAP at all, so I don't want to risk modifying the existing program, so I'm hoping someone else has already figured this out.
    I did of course try to copy and paste, but it's almost as unreliable as typing in each line or DIMLIST group.
    Is there any other way? I'm going to end up with serious RSI at this rate!
    Just as an aside, FYI I am using a 64-bit version of Firefox called Waterfox, with 64-bit Flash and the Firefox plugin installed, and it's working perfectly well - it's only this particular task that is painfully slow and frustrating. I don't use IE.
    Any ideas would be very helpful.
    Thanks a lot,
    Jason

    Amr,
    try this paper and let me know if itt meets your requirements.
    http://otn.oracle.com/products/jdev/htdocs/bc4j/BusinessRulesInBc4j.pdf
    Frank

  • Business Rules in BC4J URGENT

    What is Oracle's recommendation for implementing business rules in BC4J?
    There are two approaches that i saw in Oracle documentation:
    1- To implement business rules in the Entity Object. Some rules are implemented in doDML(), some in validate() depending on the type of the rule.
    This approach is explained in the business rules white paper submitted early 2001.
    2- To implement business rules in the Application Module.
    This approach is depicted by the toy store sample application.
    Please direct me to which approach should i use and if there is any documentation about the matter.
    NOTES:
    1- We use JDeveloper 9.0.3.1

    Amr,
    try this paper and let me know if itt meets your requirements.
    http://otn.oracle.com/products/jdev/htdocs/bc4j/BusinessRulesInBc4j.pdf
    Frank

  • BC4J JBO errors over-ride

    We want to catch our JBO exceptions using folowing method
    package be.iadvise.apps.serverinventory.model.messages;
    import java.util.ListResourceBundle;
    public class MessageBundleExceptions extends ListResourceBundle
    private static final Object[][] sMessageStrings = new String[][] {
    {"25002", "Could not start the application. Call helpdesk."},
    {"26048", "Application cannot connect to database."},
    {"26061", "Application cannot connect to database."},
    {"27008", "Application cannot connect to database."},
    {"27122", "Application error, log a support ticket."}
    * Return String Identifiers and corresponding Messages in a two-dimensional array.
    * @return
    protected Object[][] getContents()
    return sMessageStrings;
    We have found this method in a pdf
    http://www.oracle.com/technology/products/jdev/htdocs/bc4j/BusinessRulesInBc4j.pdf
    in the toystory demo this method is also used.
    We still get our JBO exceptions and not our custom messages.
    What did we forget to implement?
    greeting
    Tim Haselaars

    Maybe this part of the ADF Workshop can help:
    http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm#t6

  • What business rules from DataBase to BC4J

    Hi, I am new in the BC4J world. Can anyone tell me what business rules will be converted to BC4J with JDeveloper? The tuple rules, record rules, Foreign Keys and Primary keys will be put into the BC4J layer, but...... the entity rules and interentity rules? Where will they be? Can the be put into the business layer? Are the automatically generated for you?
    Thank you,
    Rene

    I'd recommend reading this whitepaper that describes a systematic method for thinking about and implementing business rules in BC4J:
    http://otn.oracle.com/products/jdev/htdocs/bc4j/BusinessRulesInBc4j.pdf
    We automatically pickup up primary key and not null constraints, and we use the foreign key constraints to reverse-engineer associations/compositions.

  • Can I ReUse business rule with JHeadStart ?

    Hi All,
    I am looking for tools and methods for our development team to achieve this goal. The keyword is Re-Use as far as we can, in all application layer.
    We will have core application, and for any new customer we will only develope the things that specific to that customer and Re-use the core application.
    Will JHeadStart help us to achieve that goal ?
    Could anybody pls help me with the scenario for maximum reUse ?
    Thank you for your help,
    Krist

    Krist,
    JHeadstart does not 'help' much with your business rule implementation, but it also does not prevent it (I'll get to the bugs you mentioned later). ADF BC is an excellent framework for implementing your business rules, and if you implement these rules on Entity Objects (instead of View Objects) as much as you can, they are highly reusable. Have a look at this paper, which is from the 'before ADF' era but will still contain lots of information on how to implement various types of Business Rules in ADF BC:
    http://www.oracle.com/technology/products/jdev/htdocs/bc4j/BusinessRulesInBc4j.pdf
    The JHeadstart bugs you mention should not hinder you (much). The first should not reproduce in the latest patch version; you can create your own application module subclass as long as it (directly or indirectly) extends the JHeadstart one.
    The bug with respect to View Object extending does not mean the Java class extending of the View Object classes, but rather the situation where one View Object 'inherits' the attribute definitions of another View Object. I would not advice using this type of 'definition inheritance', and furthermore implementing business rules on View Objects should be avoided as much as possible if re-use is your goal; the Entity Objects underneath the View Objects are a much better location.
    The bug with imported Entity Object is more a restriction in how you organise your sources in JDeveloper (i.e. spreading your Business Components across multiple projects) than it is a limitation on reusing business logic.
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Business Rules & ADF

    Hi,
    My requirement is :
    I have millions of records to be processed by Oracle Business Rules.
    I understand that Oracle Business Rule engine process record by record and we want to use ADF technology to process millions of records at a time with Oracle Business Rules.
    Is this possible with ADF to process thousands / millions of records to process at a time and how is the performance ?
    we are looking at the following documentation from Oracle
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10228.pdf
    thanks & Regards,
    anvv sharma

    Tim,
    You can find the answer in this post: BusinessRulesInBc4j.pdf
    Steven Davelaar,
    JHeadstart Team.

  • Deferred validation exception handling : HOWTO ?

    I need to knw if it's possible and how in a 2 and or 3 tier environment collect all exception and send them back to the client in one bounce.
    It could be usefull in order to keep all "validation" error during a "validatio cycle" and rethrow them at
    the end.
    I don't mean at commit but every time the system start a validation (wich means going to a new row it validates the old row, at commit it validates all, at a setAttribute it validate the attribute).
    Could someone help ?
    TIA
    Tullio

    Tullio,
    it depends on the validation error. If you have enetered a row that requires a field to be enetered but you didn't then you better have the user correcting this immediately.
    Otherwise you can intercept the Exception and store it to somewhere else before at some point in time you throw it. There is a good paper on business rules that may anwer the question for validations to.
    http://otn.oracle.com/products/jdev/htdocs/bc4j/BusinessRulesInBc4j.pdf
    There also is one paper on validation in JClient (remembering that your last postings were about JClient)
    http://otn.oracle.com/products/jdev/howtos/JClient/jclient_validation.html

  • When i send a PDF via e-print, it gets cropped, is there a way to prevent this from happening?

    PDF's are printing fine when i print direct to the printer but when they are sent by e-mail they get cropped, is there a way to get the document to fit to page when sent as an email attachment?
    The Printer in question is a HP LaserJet Enterprise 500 color M551n, the printer is brand new installed last week so i don't know if this is the norm or not.
    Edit: Please can someone please explain how to correct this.

    If you're using a desktop or notebook PC to send the email you could try installing the HP ePrint Mobile Driver software on your machine, the link to the download is here. This will allow you to print the PDF to any ePrint capable printer without having to email it to the printers email address as an attachment.
    Once installed and with your PDF open on your machine, select Print from the File menu, then select "ePrint" from the list of available printers (don't select the actual printer itself) and click Print in the bottom right corner of the box. A dialogue box will open showing the avaialble ePrint printers you can print to. Click on the Connected button on the left of the screen to add your printer to the list if its not listed.  
    Hope this helps.
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • PDF Printing Problem with HP UPD Printer

    Hi,
    in our Company we use the HP UPD Driver PCL5 in Version 5.9.0.18326. The Printermodells are HP LaserJet Pro 400 M401, HP LaserJet Pro 400 Color M451, HP LaserJet Enterprise Flow M830z, HP LaserJet Enterprise 500 MFP M525dn, HP LaserJet Enterprise M630dn, HP LaserJet Enterprise Flow M680z and HP LaserJet Enterprise Flow M880z with newest Firmware.
    If a PDF file is printed using Adobe Reader, it takes a long time until the file is printed on the printer. Partially individual pages are printed in one-minute intervals. But if I use another PDF viewer such as Foxit Reader, PDF documents can be printed at normal speed.
    Other documents, such as Word or Excel files are printed normally. Only PDF documents that are printed with Acrobat Reader or Adobe Acrobat are affected. We use the Acrobat Reader version 11.0.10. With version 11.0.6, the problem also occurs.
    Sometimes it also happens that the PDF document fills up the memory of the printer when it was printed with Adobe Reader. With Foxit Reader this does not happen with the same document.
    Does anyone know this problem and knows what to do?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select
    /var/log ▹ cups ▹ error_log
    from the hierarchical list on the left side of the Console window. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar. Then select the messages from the time of the last failed printing attempt. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.

  • Filename in PDF portfolio?

    Sorry for what I'm sure is an easy(lame) question.
    I don't want to show the filename when creating a PDF portfolio and I've hunted for the answer without any luck.
    How do I only show the image or show a custom text/ title but not the XXXXX.jpg filename?
    thx!
    > just to clarify.... when viewing a PDF portfolio of images I don't want to show the image filename below the image.

    Hi,
    I've been trying to hide the file name myself. It seems intuitive that, while in the Modify area of the PDF Portfolio, under "Specify File Details" that one would simply unclick "Name" under "Columns to Display".
    But all that seems to do is hide it while I'm within the Modify section. I save and go back to view the pdfs and there are the file names.
    Anyone out there know the answer? Even if it's just a link to more info, that would be great. I need to get this out but without the filenames. I've searched in Google but no good info.
    BTW, the Description option is a nice touch and shows upon immediate hover. That's why I don't need to show a file name. Plus, you can write more in the description than is viable/sensible in a file name.
    Thanks for your help.

  • Filename in Webdynpro for a PDF created with Smartform

    Hi,
    I created a PDF with Smartform in my Webdynpro-Application.
    When I click the save button there is a default filename f.pdf .
    How can I change the filename?
    Regards
    Marcus Schug

    Hi Experts,
    any update on this?
    I am facing the same problem with ESS payslip (smartform/Hrform): my customer wants to have custom file name for download salery statements from the portal. Do you know how to change the default form name unknown.pdf to e.g.. "payslip_month_year"?
    I spent a lot of time to find any possibility to get and change the file name but without success till now.
    Please respond.
    Regards,
    Zdzislaw Kaczmarczyk
    Edited by: Zdzislaw Kaczmarczyk on Jun 14, 2010 4:41 PM

  • Filename in Save As dialog when saving PDF file

    I have a web site serving up PDF files. Without going into details, the URLs of the PDFs are not just your basic URL but look simething like this:
    http://www.domain.com/WorkFlowApp/Clients/demo1/secure/Promo%20Cover%20Cool-MedH i.pdf?userId=55b64ad5-28a2-490e-b3d6-4944099a390f#collab=CollabService@http://ww w.domain.com/ICCollab/IC_Service.asmx?WSDL
    In this case the actual filename is "Promo Cover Cool-MedHi.pdf"
    While viewing in Safari (OS X), if the user saves the PDF to their local machine, the Save As dialog comes up and the filename field is automatically populated. The problem is, instead of using just the filename, the field contains this:
    http---www.domain.com-WorkFlowApp-Clients-demo1-secure-Promo%20Cover%20Cool-MedH i.pdf?userId=55b64ad5-28a2-490e-b3d6-4944099a390f#collab=CollabService@http---ww w.domain.com-ICCollab-IC_Service.asmx?WSDL
    I know when performing the same action on Windows using Internet Explorer, the Save As dialog box filename field is populated correctly with just the filename (although it shows up URL encoded as Promo%20Cover%20Cool-MedHi.pdf, which is OK).
    I'd like to be able to force Safari to use just the filename in the Save As dialog box. Has anyone come accross this problem and figured out a solution?

    Hello Ebnul.nao
    I am having this same problemwith trying to work this out.
    Did you succeed in the end?
    I will really appreciate your help if you did
    Kind regards

  • Can we use IF statement in PDF templates

    Hi,
    I developed a PDF template. I need to underline ang bold the records based on a specific condition. Can we use IF conditon in PDF templates. Please suggest.
    Thanks...

    Billy  Verreynne  wrote:
    The case syntax is a bit funny though as there's not a single condition evaluation (like a DECODE or case structs from some other languages).
    This is what I would expect a typical case struct to look like - evaluating a single condition:
    case <condition>
    when <value-1> then return <result-1>
    when <value-n> then return <result-n>
    else
    return <return-z>
    end
    ?:| You mean like this...?
    SQL> ed
    Wrote file afiedt.buf
      1  select empno, ename, deptno
      2        ,case deptno
      3           when 10 then 'This is Department 10'
      4           when 20 then 'And department 20'
      5           when 30 then 'And of course department 30'
      6         else
      7           'Blimey it is something else!'
      8         end as dept_desc
      9* from emp
    SQL> /
         EMPNO ENAME          DEPTNO DEPT_DESC
          7369 SMITH              20 And department 20
          7499 ALLEN              30 And of course department 30
          7521 WARD               30 And of course department 30
          7566 JONES              20 And department 20
          7654 MARTIN             30 And of course department 30
          7698 BLAKE              30 And of course department 30
          7782 CLARK              10 This is Department 10
          7788 SCOTT              20 And department 20
          7839 KING               10 This is Department 10
          7844 TURNER             30 And of course department 30
          7876 ADAMS              20 And department 20
          7900 JAMES              30 And of course department 30
          7902 FORD               20 And department 20
          7934 MILLER             10 This is Department 10
    14 rows selected.

Maybe you are looking for

  • Photoshop CS2 crashes on startup (Mac OS X 10.6.6)

    We have a new Mac in the office. We initially tried to copy all documents/programs from the old to the new, but for some reason, we noticed Photoshop CS2 would crash when we booted it up. So we uninstalled CS2 entirelly and reinstalled the suite. Sti

  • Can a Flash 6 SWF (AS 1) read variables of a Captivate 4 SWF (AS 2)?

    I have a Captivate 4 CP that I published to Flash Player 9, AS 2.0 SWF ( and Flash Player 7 as well, which didn't help either). I load this SWF in a Flash wrapper SWF (published to Flash Player 6, AS 1.0) which needs to read the rdinfoCurrentFrame an

  • Billing simulation error

    Hello Experts, While doing billing simulation (T.code EA00) ,I am getting error. Error:- An internal error has occurred in form modify_iger_from_idevnum in function module isu_installation_struc_analyze. This is probably a programming error which you

  • WRT120N - Dropping wired connection frequently

    Today alone I have dropped connection 6 times. I recently purchased this router because I thought my WRT54G was kicking on its last leg. It would dropped connections every 45 minutes it seemed. Now I am experiencing the same issues with this router w

  • The size of audio file has been enlarged?

    I downloaded some Flac files (4.94 GB). I converted it with Amadeus Pro in AAC files (188 MB). I drag-and-drop these small files into iTunes (ver. 10.5), that is, iTunes Music Library. Now I have the same AAC files - but miraculously enlarged to 500