Business rules implementation: suggestions

Hi all,
my customer has asked me to implement a set of screens that would allow him to enter new rules or modify existing business rules for his company. Currently, they are sort of hard-coded into the software he uses.
The software he used is a java application combined with an Oracle database.
One way to do this would be just to put together some clever tables in the database with columns and rows indicating what parameters to use for a specific business rule. But how to assess whether a "clever" Oracle table is going to be enough and how far could it be used with more complicated rules ?
OTher suggestions ?
Thank you .
G.

Well, there was an official API (meaning from Sun) for a rules engine in Java... Java Rule ( or Rules) Engine API. No idea how mature it is , since I've never used it.
Search for it and find out if it can help..

Similar Messages

  • Tiggger-Business Rule Problem

    Hi Guys
    I have BEFORE INSERT OR UPDATE ON ASSESSMENTS for each row which is doing some sort of validation for date.
    IF INSERTING OR UPDATING then
    v_involv_identifier := NVL(:new.identifier,:old.identifier);
    IF :new.start_date is not null THEN
    BEGIN
    SELECT MIN(irole.start_date)
    INTO v_irole_start
    FROM involvement_roles irole
    WHERE irole.involv_identifier = v_involv_identifier;
    IF trunc(:new.start_date) > trunc(v_irole_start)
    THEN
    raise_application_error(-20103, 'SSL-13085');
    END IF;
    EXCEPTION
    when no_data_found then
    null;
    END;
    END IF;
    IF :new.end_date is not null
    THEN
    BEGIN
    SELECT MAX(irole.end_date)
    INTO v_irole_end
    FROM involvement_roles irole
    WHERE irole.involv_identifier = v_involv_identifier;
    IF v_irole_end is not null
    AND trunc(v_irole_end) > trunc(:new.end_date)
    THEN
    raise_application_error(-20103, 'SSL-13085');
    END IF;
    EXCEPTION
    when no_data_found then
    null;
    End;
    BEGIN
    SELECT MAX(irole.start_date)
    INTO v_irole_start
    FROM involvement_roles irole
    WHERE irole.involv_identifier = v_involv_identifier;
    IF v_irole_start is not null
    AND v_irole_start > :new.end_date
    THEN
    raise_application_error(-20103, 'SSL-13085');
    END IF;
    EXCEPTION
    when no_data_found then
    null;
    END;
    END IF;
    END IF;
              Now in AFTER INSERT OR UPDATE ON ASSESSMENTS for each row
              I am updating the values of Involvement_role(irole.start_date, irole.end_date) and
              Involments(start_date, end_date ) to temporary table and from there to respective table to avoid
              mutation.It works fine as expected in all cases.
              But I am unable to update when both InvolvementRole enddate and Invovement enddate are updated at same
              (Both are same date)or InvolvementRole startdate and Invovement startdate are updated at same time
              (Both are same date) because of business rule implemented.But from user prspect it should be able to
              update at the same time.
              After analysising I think it happening because of the max value of v_irole_end & v_irole_start which i m
              getting using the select statement which still coantain the old value.
              Say for example currenlty the InvolvementRole enddate=4/9/2009 and Invovement enddate=4/9/2009
              Now I m updating with value say InvolvementRole enddate=3/9/2009 and Invovement enddate=3/9/2009
              Now with select stm. the max value of v_irole_end=4/9/20099 (say)
              so this rule apply
              IF v_irole_end is not null
    AND trunc(v_irole_end) > trunc(:new.end_date)
    THEN
    raise_application_error(-20103, 'SSL-13085');
    END IF;
              and it will not allow to update .
    but if you update separately it will not cause any problem as the value of InvolvementRole enddate is
              already modifes and contain the new value (3/9/2009)          
              Now question is it's frustrating to user.Can any one suggest how to over and allow user to update
              simulteneouly without violating B-Rules.
              For information I m updating the Involvement Role table before and then InvolvementTable.

    1. db details
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for 64-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    2.
    for dml u can look into which updating ----
    FOR c IN c_temp_id LOOP
    IF c.action_ind = 'R' THEN
    dbms_output.put_line('updating role for involvement '||c.identifier||
    ' to end on '||c.date_param1);
    UPDATE involvement_roles
    SET end_date = c.date_param1
    WHERE involv_identifier = c.identifier;
    -- AND end_date IS NULL;
    end if ;
    IF c.action_ind = 'Q' THEN
    update INVOLVEMENTS
    set end_date=c.date_param1
    WHERE identifier = c.identifier;
    End if;
    END LOOP;
    3. In after statement trigger
    procedure is a called to update both table
    IF UPDATING THEN
    v_db_mode := 'U';
    END IF;
    involv_asprc(v_db_mode);
    code inside procedure involv_asprc look like-----------------------
    CURSOR v_del_record IS
    select identifier involv_identifier
    ,action_ind
    ,text_param1 corgan_code
    ,text_param2 corgan_mapping_code
    ,numb_param1 person_identifier
    ,numb_param2 ounit_identifier_inv
    from temporary_identifiers
    where session_identifier = v_session
    and target_tablename = 'INVOLV_EDIN'
    and action_ind = 'D';
    v_corgan_code VARCHAR2(4);
    ounit_id VARCHAR2(30);
    v_count NUMBER;
    v_id NUMBER(10);
    v_max_date DATE;
    v_end_date DATE;
    v_per_record NUMBER;
    v_excep_desc VARCHAR2(1000);
    v_name1 VARCHAR2(10);
    v_person_id NUMBER(10);
    --End JG167184
    BEGIN
    --Rc
    FOR c IN c_temp_id LOOP
    IF c.action_ind = 'R' THEN
    dbms_output.put_line('updating role for involvement '||c.identifier||
    ' to end on '||c.date_param1);
    UPDATE involvement_roles
    SET end_date = c.date_param1
    WHERE involv_identifier = c.identifier;
    -- AND end_date IS NULL;
    end if ;
    IF c.action_ind = 'Q' THEN
    update INVOLVEMENTS
    set end_date=c.date_param1
    WHERE identifier = c.identifier;
    End if;
    END LOOP;
    end;

  • Deferred Syntax Error : ADF Business Rules

    Hi all,
    I am working on business rule implementation in my project . I have created a dictionary (.rule) file and added oracle rules and oracle rule editor component libraries to the project . The page fragement contains the rulesdc component which reads the dictionary file from a path . i have also added oracle.soa.rules_dict_dc.webapp.war to the integerated WLS Deployments section. when i run the page i get an error ' Error: Encountered deferred syntax #{ in template text. If intended as a literal, escape it or set directive deferredSyntaxAllowedAsLiteral' . I have also tried with having deferredSyntaxAllowedAsLiteral value true in the page which contains the rulesdc component but no use. the error still persists .
    can anybody help in this case?
    Thanx in advance

    Thank you for pointing this out.
    I'm currently browsing metalink kb but "7021469 - Business Rules should support dataexport and dataimportbin functionality" provides no results.
    hbr_93300_readme.pdf refers indeee to that issue but I cannot upgrade to that version (because, as stated in that pdf, I should upgrade all prouducts to 9.3.3)
    You said it might be solved in Administration Services release 9.3.1.5 (I believe 9.3.1.1.5 was a typo), but the readme does not mention it...

  • Business Rule Log

    Error when validating a business rule helfpully suggests checking the log for more details. I have looked around but cannot find the Business rule log. Any ideas where I should look?
    T,
    J

    Hi Thr,
    Check:
    HBRServer.log,
    Hyperion/logs/planning/HBRServer.log
    Application log
    Hyperion/logs/Essbase/App/<appNameFolder>/appname.log
    For Planning Logs:
    C:\Hyperion\logs\services\HyS9Planning-syserr.log(Hyperion 9.3.1)
    C:\hyperion\logs\planOut.log(V11)
    Cheers...!!!

  • How to validate a node list using business rules

    Hello everybody:
    I'm developing with Oracle SOA Suite 11.1.1.6
    I'm using business rules to check some business requirements from my processes and I am having a situation that I like to share with you in
    order to receive some advices to solve it.
    In the rule input variable I have an element with the following structure (example):
    [code]
    <User>
        <Name>Big Boss</Name>
        <ExpertiseLevel>10</
    ExpertiseLevel>
         <DepCode>RRHH</DepCode>
        <AssignedUsers>
            <User>
                <Name>Roman</Name>
                <ExpertiseLevel>5</ExpertiseLevel>
                <DepCode>RRHH</DepCode>
                 </AssignedUsers>
            </User>
            <User>
                <Name>Mark</Name>
                <ExpertiseLevel>2</ExpertiseLevel>
                <DepCode>RRHH</DepCode>
                 </AssignedUsers>
            </User>
            <User>
                <Name>Jane</Name>
                <ExpertiseLevel>5</ExpertiseLevel>
                <DepCode>RRHH</DepCode>
                 </AssignedUsers>
            </User>
            <User>
                <Name>Lisa</Name>
                <ExpertiseLevel>3</ExpertiseLevel>
                <DepCode>FNZ</DepCode>
                 </AssignedUsers>
            </User> 
        </AssignedUsers>
    </Request>
    [/code]
    Using business rule I need to check that all the users departament code *<DepCode>* match with an specified code, besides another
    validations. As it's showed in the previous XML I have a user list inside the *<User>* node and I have to use a loop to check all the users
    assigned to the Big Boss user. My question is: Which could be the most "efficient" way to make that loop?
    I have been thinking in some options:
    1- Create a ruleset for users validation and make the loop inside the process executing the user ruleset many times as users exist?
    2- Using functions (but this is not an option because I have a requirement that forbid to use functions inside the business rules
    implementation)
    Could anybody tell me how can I use the foreach available in the ruleset advanced mode? Can I execute a desicion table in a loop?
    Thanks in advance

    hi
    I guess you will need a CX.
    when user enters a value to the node,your CX will get fired.
    it will take the current value and check with your database.if value already exists then you have to empty that node in the CX. and show a message that you needs to change the value of node.
    Let me know if you need code.
    send a mail on [email protected]
    I will provide you the code.
    Regards,
    Kaushal

  • 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 to  implement - BEST way -  triggers and mutating table

    I have the following table where it has Foreign Key defined on itself(self reference for parent_id column which can be null or valid site_id)
    create table test_virtual_site
    site_id number CONSTRAINT site_id_pk primary key,
    parent_id number CONSTRAINT parent_site_id_unq UNIQUE ,
    closed_date date default NULL ,
    CONSTRAINT check_self_ref CHECK(parent_site_id <> site_id), --avoid self refernce
    CONSTRAINT check_valid_site foreign key(parent_site_id) references test_virtual_site(site_id)
    I have the following business rules to implement and my problem is related to their implementation
    1)     A check should be made that Site_id specified as parent_id should not be a child of any other store (parent should have its parent_id column as NULL)
    Site_id Parent_id
    1
    2 1
    3 2 =>NOT VALID 2 is a child of another store
    2)     Parent is not closed
    Site_id Parent_id Closed_date
    1 10-May-2005
    3     1 =>NOT VALID 1 is a closed
    3)
    when parent store is closed - updated so at closed_date is not null
    Want to set the parent_id as NULL for the child store.
    OR
    SET the closed_date for child store too same as the parent_store.
    Example
    Site_id Parent_id Closed_date
    1     
    1 2
    Update test_virtual_site
    SET closed_date = sysdate
    Where site_id = 1 ;
    Through Trigger
    Site_id Parent_id Closed_date
    1     22-Mar-06
    1 2 22-Mar-06
    OR
    Site_id Parent_id Closed_date
    1     22-Mar-06
    1
    When I am trying to do the above mentioned through constraints I am running into mutating trigger problem. Can you please guide me what is the best way to handle the above-mentioned scenarios.
    I am aware that I can avoid the 3rd problem using the following
    -- - Initialize an array in the before statement trigger.
    -- - Add the processed rowid to the array in the after row
    -- trigger.
    -- - In the after statement trigger: get each rowid from the
    -- array and process it. When all rowids are processed, clear
    -- the array.
    BUT for 1 and 2 I need to look at the parent specified , the parent exists in the same table BUT I can not perform the lookup from the BEFORE INSERT ROW LEVEL trigger but I want to ensure at the row level , so if the parent store is closed or parent specifed itself is a child(not permissible) I want to rollback the insert – RAISE_APPLICATION_ERROR.
    Can you please guide me what is the best way to handle the above mentioned conditions .

    I have the following table where it has Foreign Key defined on itself(self reference for parent_id column which can be null or valid site_id)
    create table test_virtual_site
    site_id number CONSTRAINT site_id_pk primary key,
    parent_id number CONSTRAINT parent_site_id_unq UNIQUE ,
    closed_date date default NULL ,
    CONSTRAINT check_self_ref CHECK(parent_site_id <> site_id), --avoid self refernce
    CONSTRAINT check_valid_site foreign key(parent_site_id) references test_virtual_site(site_id)
    I have the following business rules to implement and my problem is related to their implementation
    1)     A check should be made that Site_id specified as parent_id should not be a child of any other store (parent should have its parent_id column as NULL)
    Site_id Parent_id
    1
    2 1
    3 2 =>NOT VALID 2 is a child of another store
    2)     Parent is not closed
    Site_id Parent_id Closed_date
    1 10-May-2005
    3     1 =>NOT VALID 1 is a closed
    3)
    when parent store is closed - updated so at closed_date is not null
    Want to set the parent_id as NULL for the child store.
    OR
    SET the closed_date for child store too same as the parent_store.
    Example
    Site_id Parent_id Closed_date
    1     
    1 2
    Update test_virtual_site
    SET closed_date = sysdate
    Where site_id = 1 ;
    Through Trigger
    Site_id Parent_id Closed_date
    1     22-Mar-06
    1 2 22-Mar-06
    OR
    Site_id Parent_id Closed_date
    1     22-Mar-06
    1
    When I am trying to do the above mentioned through constraints I am running into mutating trigger problem. Can you please guide me what is the best way to handle the above-mentioned scenarios.
    I am aware that I can avoid the 3rd problem using the following
    -- - Initialize an array in the before statement trigger.
    -- - Add the processed rowid to the array in the after row
    -- trigger.
    -- - In the after statement trigger: get each rowid from the
    -- array and process it. When all rowids are processed, clear
    -- the array.
    BUT for 1 and 2 I need to look at the parent specified , the parent exists in the same table BUT I can not perform the lookup from the BEFORE INSERT ROW LEVEL trigger but I want to ensure at the row level , so if the parent store is closed or parent specifed itself is a child(not permissible) I want to rollback the insert – RAISE_APPLICATION_ERROR.
    Can you please guide me what is the best way to handle the above mentioned conditions .

  • ADF BC, how implements business rules?

    Hi.
    I am new in oracles technology. Please help me understand how implements business rules.
    For example: I have two tables operation(id,code) and operation_item(id, operation_id, code). I create entities objects for it: OperationEntity, OperationItemEntity and association: OperationItemToOperation. Then create entity-based view object OperationById which have bind parameter id for find operation by id. I also create entity-based view object OperationItem and view link OperationItemToOperationLink.
    My ApplicationModule contains OperationById and OperationItem via OperationItemToOperationLink
    I want implements "clone" method at OperationById view for current row. This method create copy selected row from operation table and copy all rows from operation_item table where operation_item.operation_id = operation.id.
    I add method createCurrentRowClone to OperationById:
    public void createCurrentRowClone() {
    OperationByIdRowImpl currentRow =
    (OperationByIdRowImpl ) getCurrentRow();
    OperationByIdRowImpl newRow = (OperationByIdRowImpl ) createRow();
    insertRow(newRow);
    newRow.setAttributes(currentRow);
    //TODO create copy for all rows from OperationItem
    //??? how get OperationItem instance
    and I add method clone to OperationItem:
    public void createClone {
    // for all row from OperationItem create clone
    but I don't understand how get OperationItem instance in OperationById scope. I have method getOperationItems() in OperationByIdRowImpl class which return RowIterator, and it give me instances of OperationItemRowImpl class, but not OperationItem with rows where operation_item.operation_id = operation.id
    Thanks in advance

    For realizations "clone" method which make copy for current row from OPERATION table and all rows from OPERATION_ITEM table where
    operation_item.operation_id = operation.id I moved realisation business logic from View Object to Entity.
    For it enough:
    1) entities objects: OperationEntity, OperationItemEntity;
    2) association for this entities: OperationItemToOperation;
    3) entity-based view object: OperationById which have bind parameter "id" for find operation by ID;
    4) application module: ApplicationModule;
    I add method createCurrentRowClone to OperationByIdImpl class. It just call createClone method for current row:
    public void createCurrentRowClone() {   
    OperationByIdRowImpl currentRow = (OperationById) getCurrentRow();
    currentRow.createClone();
    method createClone in OperationByIdRowImpl class call createClone method from entity layer:
    public void createClone() {
    getOperationEntity().createClone();
    method createClone in OperationEntityImpl class make new row and call createClone for all row from OperationItemEntity:
    public void createClone() {
    OperationEntityImpl newRow = (OperationEntityImpl) getDefinitionObject().createInstance2(
    getDBTransaction(),null);
    newAtm.setCode(getCode());
    //create copy for all rows atm_operation
    RowIterator itemIterator = getOperationItemEntities();
    while ( itemIterator .hasNext() ) {
    OperationItemEntity itemRow = (OperationItemEntity ) itemIterator.next();
    itemRow.createClone(newRow);
    and finally method createClone(OperationEntityImpl operation) in OperationItemEntityImpl class make new row in OPERATION_ITEM table
    public void createClone(OperationEntityImpl operation) {
    OperationItemEntityImpl newItem = (OperationItemEntityImpl) getDefinitionObject().createInstance2(
    getDBTransaction(), operation);
    newItem.setCode(getCode());
    If you have another solution, please post it here.

  • Business Rules Framework (BRF) Implementation

    Hi Gurus,
    We are in SRM 7.0 (EHP2) ,Extended Classic and planning to migrate from Application Controlled workflow to Business Rules Framework( BRF) workflow.
    As of now we have BBP_WFL_APPROV_BADI to determine approvers dynamically based on Approval limits custom table and based on cost center for SCs.
    For POs its based on Purchasing Hierarchy
    Please let me  know how to handle dynamic approvals for SC and PO.
    Also please let me know how to handle the opens SCs and POs and their migration,switch back to application controlled if things doesn't work fine.
    Thanks in advance
    Raj

    Hello,
    many wiki and documents explain what you are asking for...
    I let you look for those documents.
    Wiki
    Blog
    Documents
    Regards.
    Laurent.

  • DB Call from Oracle Business Rule +Java Method call from OBR

    Hi,
    1.We have a requirement in project where we need to make DB Call from Business rule.
    We are using ORACLE SOA11g.
    Is this possible.Any pointers on this will be helpfull.
    2.Can we call java method from Oracle Business Rule.If so pls suggest how it can be done.
    Thanks In Advance,
    Oracle SOA User

    You can implement java class to make database updates using JDBC. You can add Java class as fact in business rules and invoke methods as actions of the business rules.
    Hope this will help.
    Jayesh Patel
    http://jayesh-patel.blogspot.com/
    http://www.yagnasys.com/

  • How to make multi-tenant business rules

    hi'
    I want to write tenant specific Business rules in multi-tenant application, please give me some tips of making multi-tenat business rule.
    I know how to write common business rule for all the tenants.
    thanks
    Yatan

    I'd suggest using Flash Media Interactive Server if you wish to make this type of application and use Flash as the interface.  I can't give you the details on exactly how to implement it, but using Remote Shared Object and FMIS would serve as the basis.  I believe that the package comes with examples of Shared Objects that can serve as a simple basis from which to proceed.  After that you might want to see if you can find an available whiteboard app that can be leveraged to do as you wish.
    I apologize in advance if using this type of solution is a non-starter, I've been using FMIS locally and have plans to eventually implement something similar to this type of drawing app as well.

  • [Business Rules] Rules engine not updating my Fact Result as expected.

    I have a Fact type implemented as a Java class, named Commission with the following properties: age(int), area(int), amt(double):
    In the Java application I set the age to 30 and area to 3:
    Commission comm = new Commission();
    comm.setAge(30);
    comm.setArea(3)Now I have a set of rules defined in the ruleAuthor where in, if the age is > 20 and area is between 1 and 5 then the business rule engine should set the Amt field to .3
    But when I run the rules engine:
    ruleSession.executeRuleset(...);
    ruleSession.callFunctionWithArgument("assert", comm);
    ruleSession.callFunction("run");
    double commamt = comm.getAmt(); //this value returns (0) as if the rules engine did not fire the rule and did not change the amt field to .3When i get the comm.getAmt(), the value is zero and not 0.3 which is the expected result.
    I wonder what's wrong, I only followed and patterned the instructions and code that came with Oracle Business Rules CarRental Example and/or the example that came in the Business Rule ViewLet.

    Hi Phil,
    I tried your suggestion. But it still does not work.
    I don't if this would help but this is how I defined my rules:
    1. I created a Java class file as a Fact Definition. Compiled it and stored it into a jar file.
    2. Copied the .jar file to a remote machine where OracleAS is installed.
    3. I run the ruleAuthor (browser) and specified a ruleRepository file.
    4. Specified the jar file where the Fact Definition (Java file) is.
    5. Created Ruleset and Rules
    6. Save the Dictionary.
    7. Copied the generated rulesRepository on to my local hard drive (remote).
    8. Create and Run the Rule-Enabled Java application. ruleRepository points to the ruleRepository file generated by ruleAuthor and copied to my local hard drive.
    Maybe there is something wrong with how I packaged the Java Fact Definition?

  • Error Handling in Business Rule

    Hi,
    In my Business rule, I want to handle the error with respect to the Run Time Prompt value entered by USer at the time executing the Rule.
    How can i display and customize that message.
    Ex: IF( <cond> is True)
    execute the logic
    ELSE
    display an error message in the run time prompt pop-up
    ENDIF
    In my current logic i implemented , it is executing the logic if the Condition is true but if condition is not ture then it is closing the running pop-up and displaying a message in the web form "<Rule Name> was successful"
    Any thoughts how to handle this!!!!
    Regards,
    KP

    Hi,
    Unfortunately you cannot raise custom error messages from business rules to Planning web client. I suggest you check what you can do with validatedata.js. It provides you with custoomization facility which you can utilize for raising custom messages based on the values on the form.
    Cheers,
    Alp

  • Parameterized message in SO Business Rules

    HI
    We are trying to implement custom rules in sales order form using processing constraint.
    Rule to implement : When the order quantity for an item is less than the minimum order quantity defined in the price list then it should
    display an error message with the minimum order quantity for that item.
    Example : Ordered Quantity is less than Minimum Order Amount X.
    where X = amount stored in attribute1 of the price list.
    We are using business rules default messaging feature to disply the message but not able to pass the minimum quntity as message parameter. Can you body please suggest us if we can display parameterized messages and if yes how?
    Thanks in advance for your help.
    Regards.

    There are two problems here. First, there is a bug that causes this error string to be displayed incorrectly when using the RuleAuthor in any browser language other than English. If you change the browser language to English, you should see:
    <p>
    A syntax error is found. <br>
    Error:'carrental.Driver' is undefined at line 4 column 14 in DM
    <p>
    The cause of this problem is that carrental.Driver class is not in the classpath for Rule Author. This isn't covered in the how-to. See section 3.10 in the Oracle® Business Rules User’s Guide (B15986-01) (available from here).
    <p>
    From this doc:
    <p>
    Create a rule set you want to test. If the data model includes any Java classes, the
    Java classes must be included in the OC4J classpath. The easiest way to do this is
    to put the JAR files in the following directory, then restart OC4J:
    $ORACLE_HOME/j2ee/home/applications/ruleauthor/lib
    <p>
    or add it as a shared library using EM (specific instructions follow in the doc) and then add that shared library to RuleAuthor.
    Message was edited by:
    philvarner

  • Programmatically disable "mandatory business rule"

    Hello,
    Using jdevelopper 11.1.2.3.0 and HR schema, there is my use case :
    An entity object (Departments) with an attribute (DepartmentId) checked as "Mandatory". A java entity object class (DepartmentsImpl.java). In this java class, create() and doDML() methods overriden :
        protected void create(AttributeList attributeList) {
            super.create(attributeList);
            AttributeDefImpl attr = this.getEntityDef().getAttributeDefImpl("DepartmentId");
            attr.setMandatory(false);
        protected void doDML(int i, TransactionEvent transactionEvent) {
            AttributeDefImpl attr = this.getEntityDef().getAttributeDefImpl("DepartmentId");
            this.setAttribute(attr.getName(), 66);
            super.doDML(i, transactionEvent);
            attr.setMandatory(true);
        }What I want is to programmaticaly disable the "mandatory business rule" for DepartmentId attribute, because this attribute's value is programmatically set just before calling doDML().
    Problem : "attr.setMandatory(false);" seems to do nothing. In validation time, the mandatory business rule is working.
    What AttributeDefImpl.setMandatory() method should do? Or, what should be the right way to programmatically disable a "mandatory business rule"?
    Thanks.

    Nirav, reading your post, I realized that "mandatory" propertie is part of attribute definition. So I have try calling setMandatory() method in EntityDefImpl. I found a method loadAttribute() that I have overriden :
        protected void loadAttribute(DefElement defElement) {
            super.loadAttribute(defElement);
            AttributeDefImpl attr = this.getAttributeDefImpl("DepartmentId");
            if(attr!=null){
                System.out.println("DepartmentId found! after super");
                attr.setMandatory(false);
        }Changing the mandatory propertie here works fine. But, it is not suitable solution for me, because the entity definition is done just once : first time a user implement the entity object.
    You suggest me to do this when AM is initialized : I haven't try yet, but I think I will have same problem, because when the entity definition is done once, it will never been redo later. (That is what I understand during my tests. Maybe I'm wrong?)
    Timo, I can't simply remove the mandatory flag from the attribute, because in our application, user must be abble to choose if an entity pk is auto generated or not. (and that implies that pk attribute, checked as mandatory, could be programmatically changed to false).
    There is something I don't understand : calling setMandatory() in EntityImpl.create() method has no effect. But, in same maner, if I call setUpdateableFlag(), thiw will have effect. Both method are changing Entity Attribute Definition. So why setMandatory() will have effect only during the first definition of Entity, and setUpdateableFlag() will work all the time?
    Thanks for your help.

Maybe you are looking for

  • Stuck at "starting login window" and Disk Utility won't fix it...

    I downloaded some security updates, and since restarting my computer as required, I have never been able to start it up since. It gets stuck on the "starting login window" screen, with the little blue bar still shimmering and mouse still moving, but

  • Can't boot OS9 from external HD

    I have an external HD with OS X4 and OS9 installed on it. Classic will open, but I can't instal an OS 9 app because the app says I need virtual memory. I tried to boot OS9 from the external drive to install the app from OS9, but it is not a start up

  • HP Sectre XT Pro Windows 8 USB 3.0 issue

    Hello, i need your help with hte following. i installed windows 8 on my spectre xt pro and the usb 3.0 drivers from windows are not working corectly. i tried different usb 3.0 drivers (including the intel one and still no luck). the port can read and

  • Create another table based on data from table above

    Hi all am using EJB 3.0 as technology. I have a table where user insert records. The field are as below TableId, projectId, TaskId, TOdate, duration, comments. I need to traverse this table and create another table that will display duration perday.

  • Instance message in portal

    Hi, can any body gude me how to use instance message in portal and the configuration steps i am using EP7 thansk in advance Regards, kishore