Business Rules Database Table

Hi,
What is/are the tables that stores business rules information in the database?
Thanks,
lakshmi.

You can write a rulebase provider plug-in to load your rulebase .zip file from wherever you wish. The rulebase must always be authored with Oracle Policy Modeling in the first place.
Davin.

Similar Messages

  • Oracle Business Rules decision tables - export

    This is a beginner's question.. Suppose that you want to use an Oracle Business Rules (OBR) decision table, for example to check company’s eligibility for financing based on their country and business type (PRIVATE or PUBLIC). You would define a corresponding decision table in JDeveloper with true/false assignments in the Actions. Is it possible to export this decision table somehow? Ideally we would want to have a web service returning the decision table data as XML, which would then be used to generate PDF or a dynamic webpage etc. Then we would have OBR as the only point of data entry.

    I moved this to "SOA Suite and OC4J 11g Technology Preview"
    Business Rules - Decision Tables and Buckets
    Chandresh

  • Is it possible to have business rules as a table

    Hello Friends,
    I have an application where in which I had altogether some x procedures, y fucntions and z triggers .
    Right now I have implemented all the business rules in the procedures, triggers , and fucntons. Is it possible to have
    the implementatkon of business rules as a table so that i can use the table as a rules engine .
    I have done with java technologory usaing the business rules as a seperate external file and reading the file for business rules. How about oracle is it possible. If yes can any one give a scenario how i can implement.
    thanks/kumar

    As posted, your whole procedure could be replaced with:
    procedure update_paycheck_deductions is
       cursor c1 is select * from MINC ;
       cursor c2 is select * from FINC ;
       v_flag_boolean boolean := false;
       v_famid number ;
    BEGIN
       for i in c2 loop
          for j in c1 loop
             if ( i.famid = j.famid ) then
                v_flag_boolean := true;
                v_famid := j.famid;
             end if ;
          end loop ;
          if ( v_flag_boolean = true ) then
             update FINC set famtfedx = 0 WHERE famid = v_famid ;
             update FINC set fgovretx = 0 WHERE famid = v_famid ;
             update FINC set fpripenx = 0 WHERE famid = v_famid ;
             update FINC set frrdedx = 0 WHERE famid = v_famid ;
             update FINC set fsltaxx = 0 WHERE famid = v_famid ;
          end if;
          v_temp_sum_anfedtx := 0;
          v_temp_sum_angovrtx := 0;
          v_temp_sum_anprvpnx := 0;
          v_temp_sum_anrrdedx := 0;
          v_temp_sum_ansltx := 0;
       end loop;
    end;Since none of the j.column != null and predicates will ever be true. This is roughly equivalent to your code:
    SQL> WITH t AS (
      2     SELECT 10 amount, 'Y' col2 FROM dual UNION ALL
      3     SELECT null, 'Y' FROM dual UNION ALL
      4     SELECT 25, 'N' FROM dual)
      5  SELECT amount, col2, CASE WHEN amount != NULL and
      6                               col2 != 'N' THEN amount
      7                          ELSE 0 END eval_amount
      8  FROM t;
        AMOUNT C EVAL_AMOUNT
            10 Y           0
               Y           0
            25 N           0This would simplify Toon's merge statement to:
    merge
    into FINC f
    using (select distinct j.famid, 0 amount
           from MINC j) m
    on (f.famid = m.famid)
    when matched then
    update set f.famtfedx = m.amount
              ,f.fgovretx = m.amount
              ,f....      = m.amount
              ,f....      = m.amount
              ,f....      = m.amountWhich could be further simplified to:
    update finc
    set famtfedx = 0,
        fgovretx = 0,
    where famid in (select famid from minc)Whiich strikes me as an odd business rule, specially for one dealing with (apparently) payroll.
    I won't go into the fact that you will scan every record in once for every record in minc. I hope these are not large tables.
    I have seen a number, and even worked on a a couple of payroll systems based on "business" rules in tables to avoid putting the rules in code. None of them were very good and perfomance tended to lag when there were more than a few people to pay.
    You need to explain a lot more about what sort of business rules you want to put into tables.
    John

  • Cant see Business Rules after restore

    Hi - using Business Rules 3.5.1 - we are trying to refresh our development Business Rules with our Production Business Rules. DBAdmins did the restore and if I go looking in the sql tables, I do see the rules. But when I go into the Business RUles Designer, I do not see any rules.
    the development name of the business rules database is the same as the production.
    what am I missing here?
    Thanks.

    there is a table in the business rule db called "alloproc" which contained the production server name. Ran a sql query to update it to the development and the business rules appeared in Designer.

  • Business Rule Delete Problem

    Problem definition:
    We have a business rule according to CDM ruleframe, but have a
    problem when we want to delete a row from a table. The problem
    occurs when the business rule is validated. The
    delete operation works fine when the business rule is not
    validated.
    Business rule: BR_FELT_0006_DEL
    Table: SLN_FELTER
    CAPI-package: SLN_FELTER_CAPI
    Trigger attr.: After triggering statement on DELETE operation
    The definition of this delete rule is the same as the definition
    in the Headstart demo application.
    This is a simple reconstruction of the error problem:
    SQL> delete from sln_felter
    2 where opve_oppgave_nr = 'RF-1061'
    3 and opde_oppgavekode = 1014
    4* and inar_inntektsaar = 2000
    SQL> /
    delete from sln_felter
    FEIL pe linje 1:
    ORA-20999:
    ORA-06512: ved "HST65.CG$ERRORS", line 565
    ORA-06512: ved "SLNHL6.CG$SLN_FELTER", line 474
    ORA-20998: Transaction Failed
    ORA-06512: ved "HST65.QMS$ERRORS", line 128
    ORA-06512: ved "HST65.QMS_TRANSACTION_MGT", line 822
    ORA-06512: ved "SLNHL6.CG$ADS_SLN_FELTER", line 51
    ORA-04088: feil ved utfxring av
    triggeren 'SLNHL6.CG$ADS_SLN_FELTER'
    ORA-06512: ved "SLNHL6.CG$ADS_SLN_FELTER", line 43
    ORA-04088: feil ved utfxring av
    triggeren 'SLNHL6.CG$ADS_SLN_FELTER'
    SQL> @d:\hsd65\hst\scripts\messages
    Feil QMS-00100: Ukjent feil ORA-01403: ingen data ble funnet:
    qms_transaction_mgt.perform_business_rule
    Kontakt brukerkontakten.
    PL/SQL-prosedyren ble fullfxrt.
    Error message should have been:
    SLX-00367: <p1>: Feltet kan ikke slettes hvis det har pestand
    fra skattyter
    We have debugged the PL/SQL code and the error occurs in the CDM
    ruleframe generated
    CAPI-definition and not in the business rule itself. This is a
    part of the code where we think the error occur:
    procedure br_felt_0006_del
    is
    l_rule_validation_result boolean := true;
    begin
    l_rule_validation_result := br_felt_0006_del
    ( g_current_row.opde_oppgavekode
    , g_current_row.inar_inntektsaar
    , g_current_row.id
    if not l_rule_validation_result
    or l_rule_validation_result is null
    then
    qms_transaction_mgt.process_rule_violation
    ( p_br_name => 'BR_FELT_0006_DEL'
    , p_msg_code => 'SLX-00367'
    , p_display_label => display_label
    , p_table_name => 'sln_felter'
    , p_table_rowid => get_rowid <------ When this procedure
    -- is calling the get_rowid function
    ); -- then we get the ORA-01403: No data found.
    end if; -- Business Rule is violated
    end br_felt_0006_del;
    |
    |
    |
    function get_rowid
    return rowid
    -- Purpose Return rowid of the current row
    -- Usage From br procedures
    is
    l_rowid rowid;
    begin
    if g_current_row.the_rowid is not null
    then
    l_rowid := g_current_row.the_rowid;
    else
    select rowid     <--- We suspect this is a
    -- problem in CDM ruleframe,
    into l_rowid -- because a deleted row is read !!!
    from sln_felter
    where id = g_current_row.id
    g_current_row.the_rowid := l_rowid;
    if g_stack_index is not null
    then
    g_felt_tbl(g_stack_index).the_rowid := l_rowid;
    end if; -- g_stack_index
    end if; -- g_current_row.the_rowid
    return l_rowid;
    end get_rowid;

    We also have a problem with the delete rule.
    In our case we have two tables persons and reservations.
    A person can place more reservations. The foreign key between them two is cascade delete.
    Our code is
    Purpose Persons can only be deleted three years after they made the last reservation
    Remarks
    Revision History
    When Who
    Revision What
    30-01-2002 REPOWN
    1.0 Using utility HSU_BRTR (revision 6.5.1.3)
    04-01-2002 MAST     
    1.1 Code toegevoegd
    l_rule_ok boolean := true;
    begin
    trace('br_klt002_del (f)');
    -- for instructions, see the Headstart User Guide
    l_rule_ok := not ati_rsg_capi.exists_row
    ( p_where => 'trunc(reservationdate ) >= add_months(trunc(sysdate),-36) and psn_id = '||p_old_id );
    --also tried
    --l_rule_ok :=  not ati_rsg_capi.exists_row
    -- ( p_where => 'trunc
    --(reservationdate ) >= add_months(trunc(sysdate),-36) and
    --psn_id = '||p_id   );
    return l_rule_ok;
    exception
    when others
    then
    qms$errors.unhandled_exception(PACKAGE_NAME||'.br_klt002_del (f)');
    end br_klt002_del;
    The problem is that this doesn't work. We are allowed to delete every person, even if they have a reservation yonger than three years.

  • Headstart Business Rule Design Xformer utility

    When using the Headstart Business Rule Design Transformer to generate Business Rules, the table is required to be checked out. In previous releases, we have been told that an automatic check-out is performed on the table(s), but ours forces us to manually check-out the table definition, or it does not continue. We think we have the user settings done correctly, but there may be something that we have missed. How can we get Headstart to automatically check-out the table(s) for which we want to run the Business Rules design transformer? Or is this a bug in the current release? We are using Headstart release v6.5.2.3 (HSU_BRTR). Thanks.

    Tim,
    Headstart should be able to check out any tables you need.
    We think we have the user settings
    done correctly, but there may be something that we
    have missed. How can we get Headstart to
    automatically check-out the table(s) for which we
    want to run the Business Rules design transformer?The user settings you need are (see also pages 5-7 and 5-10 in the Headstart User's Guide):
    - Under 'Process the following objects', choose 'Checked out by anyone'
    - Also check the check box '... also Checked In objects'
    - Choose whether you want to automatically check out with or without lock
    If this does not help, please run the utility with log level 'Debug Detailed' (can also be set in the User Preferences) and report the last few lines of the log messages. They should give an indication of why the check out does not succeed.
    Hope this helps,
    Sandra Muller

  • Solving "COMMIT business rules" on the database server

    Headstart Oracle Designer related white paper
    "CDM RuleFrame Overview: 6 Reasons to get Framed"
    (at //otn.oracle.com/products/headstart/content.html) says:
    "For a number of business rules it is not possible to implement these in the server
    using traditional check constraints and database triggers. Below you can find two examples:
    Example rule 1: An Order must have at least one Order Line ..."
    But, one method exists that allows solving "COMMIT rules" completely on the database level.
    That method consists of the possibility of delaying the checking of the declarative constraints (NOT NULL, Primary Key, Unique Key, Foreign Key, Check Constraints) until the commit
    (that method was introduced first in the version 8.0.).
    E.g. we add the field "num_emps" to the DEPT table, which always has the value of the number
    of the belonging EMP rows and add DEFERRED CK which uses the values from that field:
    ALTER TABLE dept ADD num_emps NUMBER DEFAULT 0 NOT NULL
    UPDATE dept
    SET num_emps = (SELECT COUNT (*) FROM emp WHERE emp.deptno = dept.deptno)
    DELETE dept WHERE num_emps = 0
    ALTER TABLE dept ADD CONSTRAINT dept_num_emps_ck CHECK (num_emps > 0) INITIALLY DEFERRED
    Triggers that insure the solving of the server side "COMMIT rules" are fairly simple.
    We need a packed variable that is set and reset in the EMP triggers and those value
    is read in the bur_dept trigger (of course, we could have place the variable in the package
    specification and change/read it directly, thus not needing the package body,
    but this is a "cleaner" way to do it):
    CREATE OR REPLACE PACKAGE pack IS
    PROCEDURE set_flag;
    PROCEDURE reset_flag;
    FUNCTION dml_from_emp RETURN BOOLEAN;
    END;
    CREATE OR REPLACE PACKAGE BODY pack IS
    m_dml_from_emp BOOLEAN := FALSE;
    PROCEDURE set_flag IS
    BEGIN
    m_dml_from_emp := TRUE;
    END;
    PROCEDURE reset_flag IS
    BEGIN
    m_dml_from_emp := FALSE;
    END;
    FUNCTION dml_from_emp RETURN BOOLEAN IS
    BEGIN
    RETURN m_dml_from_emp;
    END;
    END;
    CREATE OR REPLACE TRIGGER bir_dept
    BEFORE INSERT ON dept
    FOR EACH ROW
    BEGIN
    :NEW.num_emps := 0;
    END;
    CREATE OR REPLACE TRIGGER bur_dept
    BEFORE UPDATE ON dept
    FOR EACH ROW
    BEGIN
    IF :OLD.deptno <> :NEW.deptno THEN
    RAISE_APPLICATION_ERROR (-20001, 'Can''t change deptno in DEPT!');
    END IF;
    -- only EMP trigger can change "num_emps" column
    IF NOT pack.dml_from_emp THEN
    :NEW.num_emps := :OLD.num_emps;
    END IF;
    END;
    CREATE OR REPLACE TRIGGER air_emp
    AFTER INSERT ON emp
    FOR EACH ROW
    BEGIN
    pack.set_flag;
    UPDATE dept
    SET num_emps = num_emps + 1
    WHERE deptno = :NEW.deptno;
    pack.reset_flag;
    END;
    CREATE OR REPLACE TRIGGER aur_emp
    AFTER UPDATE ON emp
    FOR EACH ROW
    BEGIN
    IF NVL (:OLD.deptno, 0) <> NVL (:NEW.deptno, 0) THEN
    pack.set_flag;
    UPDATE dept
    SET num_emps = num_emps - 1
    WHERE deptno = :OLD.deptno;
    UPDATE dept
    SET num_emps = num_emps + 1
    WHERE deptno = :NEW.deptno;
    pack.reset_flag;
    END IF;
    END;
    CREATE OR REPLACE TRIGGER adr_emp
    AFTER DELETE ON emp
    FOR EACH ROW
    BEGIN
    pack.set_flag;
    UPDATE dept
    SET num_emps = num_emps - 1
    WHERE deptno = :OLD.deptno;
    pack.reset_flag;
    END;
    If we insert a new DEPT without the belonging EMP, or delete all EMPs belonging to a certain DEPT, or move all EMPs of a certain DEPT, when the COMMIT is issued we get the following error:
    ORA-02091: transaction rolled back
    ORA-02290: check constraint (SCOTT.DEPT_NUM_EMPS_CK) violated
    Disvantage is that one "auxiliary" column is (mostly) needed for each "COMMIT rule".
    If we'd like to add another "COMMIT rule" to the DEPT table, like:
    "SUM (sal) FROM emp WHERE deptno = p_deptno must be <= p_max_dept_sal"
    we would have to add another column, like "dept_sal".
    CDM RuleFrame advantage is that it does not force us to add "auxiliary" columns.
    We must emphasize that in real life we would not write PL/SQL code directly in the database triggers, but in packages, nor would we directly use RAISE_APPLICATION_ERROR.
    It is written this way in this sample only for the code clarity purpose.
    Regards
    Zlatko Sirotic

    Zlatko,
    You are right, your method is a way to implement "COMMIT rules" completely on the database level.
    As you said yourself, disadvantage is that you need an extra column for each such rule,
    while with CDM RuleFrame this is not necessary.
    A few remarks:
    - By adding an auxiliary column (like NUM_EMPS in the DEPT table) for each "COMMIT rule",
    you effectively change the type of the rule from Dynamic (depending on the type of operation)
    to a combination of Change Event (for updating NUM_EMPS) and Static (deferred check constraint on NUM_EMPS).
    - Deferred database constraints have the following disadvantages:
    When something goes wrong within the transaction, then the complete transaction is rolled back, not just the piece that went
    wrong. Therefore, it becomes more important to use appropriate commit units.
    There is no report of the exact row responsible for the violation nor are further violations either by other rows or of other
    constraints reported.
    If you use Oracle Forms as a front end application, the errors raised from deferred constraints are not handled very well.
    - CDM discourages the use of check constraints. One of the reasons is, that when all tuple rules are placed in the CAPI,
    any violations can be reported at the end of the transaction level together with all other rule violations.
    A violated check constraint would abort the transaction right away, without the possibility of reporting back other rule violations.
    So I think your tip is a good alternative if for some reason you cannot use CDM RuleFrame,
    but you'd miss out on all the other advantages of RuleFrame that are mentioned in the paper!
    kind regards, Sandra

  • Journal table business rules

    We have a package in the database in which we use the TAPI INS procedure to insert data into a table.
    How should we open an close the transaction so that for every insert record a record in the journal table is created.
    We have created journalling business rules. A normal INSERT INTO statement works (because we also use the TAPI triggers). But if we use a cursor loop and within the loop the TAPI INS statement, only 1 record is created in the journal table (the first record that was inserted).
    Should we place the openening and closing of the transaction inside or outside of the cursor loop?
    The current code is outside the loop, like this:
    qms_transaction_mgt.open_transaction
    ( p_trans_opened_by => 'myprocedure'
    for r_import in c_import
    loop
    l_rec.id := Null;
    l_rec.code := r_import.code;
    l_rec.description := r_import.description;
    l_ind.id := False;
    l_ind.code := True;
    l_ind.description := True;
    cg$my_table.ins(l_rec, l_ind);
    end loop;
    qms_transaction_mgt.close_transaction
    ( p_trans_opened_by => 'myprocedure'
    commit;
    Anyone have a suggestion how solve this?

    The only way we can circumvent this problem is by not using the TAPI procedure, but use normal DML (INSERT, UPDATE).

  • Business rule in MDS 2012 error: A database error has occurred. Contact your system administrator.

    I get the following information in my MDS log as well as the above error message when I execute a business rule that has a condition of AND and an Action of Attribute must be unique in combination with 2 other attributes. 
    I'm running SQL Server 2012 11.0.3000
    MDS database version 11.1.0.0
    Any ideas?
    MDS Error: 0 : SqlException message: A database error has occurred. Contact your system administrator.
       at Microsoft.MasterDataServices.Core.DataAccess.DbHelper.HandleExceptions(Exception ex)
       at Microsoft.MasterDataServices.Core.DataAccess.DbHelper.ExecuteDataSet(String spName, CloseConnectionBehavior closeBehavior, Object[] parameterValues)
       at Microsoft.MasterDataServices.Core.DataAccess.MasterDataAccess.<>c__DisplayClass5.<ValidateEntityMembers>b__4()
       at Microsoft.MasterDataServices.Core.DataAccess.DbHelper.ExecuteMethodWithDeadlockProtection(MethodDelegate method)
       at Microsoft.MasterDataServices.Core.BusinessLogic.Validations.ValidateMembers(Int32 versionId, Identifier entityIdentifier, IList`1 memberIds, RequestContext context, OperationResult results)
       at Microsoft.MasterDataServices.Core.BusinessLogic.Validations.Process(ValidationProcessCriteria criteria, Boolean commitVersion, Boolean validateEntityAsync, Boolean returnValidationResults, RequestContext context, OperationResult results)
    SQL Error Debug Info: Number: 208, Message: Invalid object name 'cteDuplicates0a070e37b106b9e3efe35a455076efa7'., Server: SQLRS-01, Proc: udp_SYSTEM_3_38_CHILDATTRIBUTES_ProcessRules, Line: 230
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: udp_SYSTEM_3_38_CHILDATTRIBUTES_ProcessRules, Line: 230
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: , Line: 0
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: udpBusinessRule_AttributeMemberController, Line: 0
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: udpValidateMembers, Line: 0
        DateTime=2013-08-15T13:25:15.6684023Z
    MDS Error: 0 : <ArrayOfError xmlns="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Error>
        <Code>208</Code>
        <Context i:nil="true" />
        <Description>A database error has occurred. Contact your system administrator.</Description>
      </Error>
    </ArrayOfError>
        DateTime=2013-08-15T13:25:15.7152026Z

    OK I bit the bullet and contacted support on this one.
    There is a known issue with MDS 2012 and business rules with a combination of "must be unique" attributes. If you do not list the attributes in the same order that they were created you will get the generic error I cited. At first they told me it must be
    in the same order the attributes are in and that worked on one entity but not the other. The difference was that in the second entity I previously rearranged the attributes in question. Once I changed the order in the business rule to reflect the *original*
    order it worked like a champ.
    Hopefully this helps save someone some time and money.

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

  • Different tables used in Consolidation Business Rules

    I was going through the documentation of different tables that needs to be maintained for consolidation business rules. I am a little confused and need some clarifications.
    These are different tables that needs to be maintained for consolidation -
    clcELIM - This table will tell what each source account needs to be divided into what 4 destination accounts.
    clcRULES - The RULES will tell how this source account needs to be divided (percentage wise as stored in the OWNERSHIP application) into these 4 destination accounts.
    clcMETHOD - This table lists down the different methods (along with their types and description) and its used in the clcRULES table
    clcELIMH_- What does this table do and where does it come into picture?
    *clcELIM_ - Is this same as clcELIM table mentioned above?
    clcRULESH - What does this table do and where does it come into picture?
    Also, what am I looking at is  what is the sequence in which these tables needs to be defined.
    For example - 
    1. clcELIM has a field called RULE whose details are mentioned in clcRULES.
    2. clcRULES has a field called METHOD and I_METHOD whose detailes are mentioend in clcMETHOD.
    3. .... I am not sure what other tables do? Please fill in the gaps.
    Thanks everyone for their help so far.
    Ameya Kulkarni
    Edited by: Ameya Kulkarni on Sep 18, 2008 7:19 PM
    Edited by: Ameya Kulkarni on Sep 18, 2008 7:21 PM
    Edited by: Ameya Kulkarni on Sep 18, 2008 7:21 PM

    Great explanation Alwin!
    Since I am new to SAP BPC world and to tell the truth, consolidation world as well (I am a planning & forecasting guy), my follow up questions are -
    (Sorry if the questions are naive).
    So according to what you have explained, clcELIM and clcELIMH work together along with clcMETHOD to define the elimination rules for entities.
    What do clcRULES and clcRULESH do?
    Also you said that these are the SQL tables (clcELIM, clcRULES, clcELIMH etc.) and its advisable not to configure them directly. So what business rules from the administration side update these tables. I am sure the METHOD administration will update clcMETHOD while RULES administration will update clcRULES and clcRULESH, is that right? what about ELIM and ELIMH.
    I am asking these questions since I dont have the system to work on yet but will be getting it on Monday next week. Right now I am trying to grasp as much as I can. So if you can send me some snapshots to amey420 at gmail dot com, that will be really appreciated.
    Also you can send me the other documents you were talking about. I will shoot you an email as well.
    Thanks a lot for your help.
    Ameya Kulkarni

  • Unable to refresh database after forced stop of the business rule

    Hello, Experts!
    I am currently testing and tuning performance of business rules in Hyperion Planning 9.3.1. I launched a business rule in EAS Console that was running way too long so I decided to stop it manually. But after this manual stop when I try to refersh Essbase from Hyperion Planning (Administration>Manage Database>Database Refresh) I get the following error:
    +com.hyperion.planning.olap.EssbaseException: Cannot restructure. There are other active users on database [%s] (1013101)+
    I remember having done forced business rule stops earlier in other Hyperion Planning 9.3.1 deployments and they did not generate such errors. So could you help me on how I prevent Hyperion Planning from this error after manual business rule stops because most likely I will have to do them in the future? Thanks very much!

    John, you are right. I erred earlier: I was thinking that I had stopped the business rule, but it still was running. I had not seen this rule running because of lack of permissions for my user name. After adding extra Essbase permissions to my user name in HSS, I was able to see in EAS Console in Ediit>Sessions window that the rule was still running and Hyperion Planning definitely will produce the above error message if one tries to refresh Essbase cube while the rule is still running.

  • Use of decision table in Oracle Business Rule

    hello,
    I am using Oracle Business Rule beta version to develop a rule base application.
    I want to know that how i can make use of table to make decision on the basis of table data .
    thanx
    saleem

    hello,
    I am using Oracle Business Rule beta version to develop a rule base application.
    I want to know that how i can make use of table to make decision on the basis of table data .
    thanx
    saleem

  • Difference between use of decision table and if/then in business rules

    Hello ,
    Could some one please explain me difference between use of decision table and if/then in business rules in short.
    - Shirish

    Hi,
    They are equivalent, pretty much what you can do with a decision table you can also do with if/then...
    However, decision tables provide automated features that can reduce the number of required rules, as compared to the if/then rules (this is called rule coalescing).
    Have a look on this document... Search for 5.1.1 What is a Decision Table?
    http://docs.oracle.com/cd/E23943_01/user.1111/e10228/decision.htm#CJHFIAHG
    Cheers,
    Vlad

  • Business rules from database

    Hi,
    We have bussiness rules in the database. I get the messages from the business rules out of the database but i get also the errormessages from the trigger. for example:
    ORA-20801: FTP- 60032: The height must be between 40 and 250 cm (invalid height) FTP- 60019: The value for the BMI is not valid (invalid bmi) ORA-06512: at "AAAA.P_ERROR", line 423 ORA-06512: at "AAAA.CG$AUS_FTP__FUP", line 10 ORA-04088: error during execution of trigger 'AAAA.CG$AUS_FTP_FUP' ORA-06512: at "AAAA.P_VTIR_VAPI", line 97 ORA-06512: at "AAAA.ITR_U_VTIR", line 149 ORA-04088: error during execution of trigger 'AAAA.ITR_U_VTIR'
    Where and how can i filter this message so that only the first messages are shown. View is UIX with ADF jheadstart
    Regards,
    Erik

    Erik,
    In the JHeadstart RuleFrame extension something similar is done: it catches ORA-20998 errors and throws a new JboException for it.
    I suggest you do something similar: create your own superclass for your Application Module similar to RuleFrameApplicationModuleImpl, which specified a factory similar to RuleFrameTransactionFactory, which instantiates a class similar to RuleFrameTransactionImpl in which you catch the ORA-error.
    hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

Maybe you are looking for

  • Creating an interface with several video windows where a user can connect their own camera to window

    Hi, I posted this in the Flash Media Live encoder Forum and it may have been the wrong place to get an answer. currently I use the following workflow for Live video streaming. I have FMLE on a computer streaming the Video feed to my FMS. I currenlty

  • Creation of Recovry Media is incomplete, Please HELP! (HP Pavilion g6 -210tu Notebook)

    Hi, My problem is that during creation of recovery media, i have successfully created 1st and 2nd DVD-R but Hp Recovery Creation Media fails to create 3rd DVD and consequently it is unable to create 4th and 5th DVD for recovery. During creation of 3r

  • Not able to display WSDL

    Dear All, In PI 7.1 while dispalying WSDL we are getting the following error: <err> Object Service Interface BAPI_CUSTOMER_GETDETAIL2 | urn:sap-com:document:sap:rfc:functions not found in Enterprise Services Repository </err> I have checked the objec

  • Test webi report for Mobile (iPad) with Xcode in a Mac

    Hi everyone, I need to develop some reports which will be visualized in an iPad. I'm using a VM with Mountain Lion + Xcode. I know that Xcode is widely used by Mac developers. What I'm trying to achieve is the following: 1) Develop some webi reports

  • Driod Razr Maxx (4.1.2) Bluetooth streaming problem

    I have a Droid Razr Maxx (Andriod 4.1.2).  I just installed an Alpine CDE-143BT CD Receiver in my car.  The Bluetooth phone features work fine.  I can stream music from my wife's Galaxy Note II without a problem, but I can't stream music from my phon