QMS_TRANSACTION_MGT.OPEN_TRANSACTIOM

Hi,
In a process of migrating my D2k(Forms 6i) application to Java based Web application through Jdeveloper 9i (9.0.3.x) using the JHeadstart 9.0.4.5, ofcourse all the process is successfully completed and the project is generated. But which I run the project, in the browser when I do any changes to the existing data that was fecthed from the database or do any inserts and save the changes done, I get the follwoing error:
JBO-29000: ORA-06550:PLS-00201: identifier 'QMS_TRANSACTION_MGT.OPEN_TRANSACTION' must be declared ORA-6550" Line 1, col 7 : PL/SQL:Statement ignored.
I am using Oracle 8.1.7.4.1, with forms 6i and Designer 6i (Ver-4.10)
Can any smart brain tell me if the above mentioned package is a built in of Oracle, if so, which version of Oracle?
Thanks & Regards
Phani

I'm not real familiar with JHeadstart, I would try reposting this in the JHeadstart forum at JHeadstart
Rob
Team JDev

Similar Messages

  • Ora 02290 when using qms_transaction_mgt and autonomous transactions

    Hi all,
    I'm using the qms procedures:
    qms_transaction_mgt for openeing and closing transactions.
    Somewhere in my procedure when the transaction is opened i call another procedure which contains a autonomous transaction.
    The next time qms_transaction_mgt.close_transaction is called i get an ORA-02290: check constraint (HST65.QMS_NEED_TO_CLOSE_TRANSACTION) violated
    When i debug the qms_transaction_mgt.close transaction the g_current_trans_id variable is empty, which indicates the transaction is allready closed.
    When i remove the pragma autonomous_transaction statement and the commit statement from the procedure i call, the problem is resolved.
    Version information:
    Designer 9.0.2 with a with a Oracle 9i 9.2 database and Headstart 9i.
    Does anybody know how i can resolve this or if this is a bug and how to fix it?
    Thanks,
    Yvon

    Ian, Yvon,
    It is unfortunately a know restriction that the CDM RuleFrame component of both Headstart for Designer 6i and Headstart for Designer 9i doesn't work in combination with autonomous transactions.
    The reason is that the RuleFrame administration relies on information stored in 1. pl/sql package variables and 2. database tables. Using autonomous transactions (that involve CDM RuleFramed DML) causes this information to dissynchronize.
    A year ago I investigated the possibilities to make autonomous transactions possible with RuleFrame but unfortunately this is fundamental problem: RuleFrame wants to combine multiple DML-actions into one logical transaction (gards this with the "need_to_close_transaction" constraint), while autonomous transactions intend to to the opposite: commit a part of a transaction while the rest of the transaction still is posted/not committed.
    There is one exception: if you call an atonomous procedure that does DML on a non-ruleframe-enabled table (no TAPI triggers that intend to open/close the transaction, no CAPI etc), everything functions.
    Problem explanation:
    ====================
    1. Outer transaction is opened (by front end or TAPI triggers of first DML)
    2. DML takes place
    3. Autonomous transaction-procedure is called
    4. Auto-transaction again tries (and succeeds!) to open the transaction, it doesn't see that the transaction is opened (db table qms_transactions is empty for the autonomous transaction on query)
    5. DML within auto-transaction is posted
    6. Auto-transaction closes transaction
    7. Auto-transaction is committed
    8. Outer transaction thinks the transaction is already closed, because the auto-transaction cleaned out the package variables when it closed the transaction.
    9. Commit of the outer transaction fails as the deferred check constraint need_to_close_transaction avoids this to happen (rollback takes place because of this violation).
    Hope this helps
    Kind Regards
    Marc Vahsen
    Headstart Team Oracle NL

  • ORA-20998 when entering exec qms_transaction_mgt.open_transaction('PATCH')

    When only entering the statement
    exec qms_transaction_mgt.open_transaction('PATCH') on the SQL*Plus prompt raises the following error:
    ORA-20998: Transaction Failed
    ORA-06512: at "HST65.QMS$ERRORS", line 128
    ORA-06512: at "HST65.QMS$ERRORS", line 238
    ORA-06512: at "HST65.QMS$ERRORS", line 455
    ORA-06512: at "HST65.QMS_TRANSACTION_MGT", line 666
    ORA-06512: at line 1
    How is this possible? No DML was actually executed.
    Has anyone an idea?

    I'm not real familiar with JHeadstart, I would try reposting this in the JHeadstart forum at JHeadstart
    Rob
    Team JDev

  • QMS_TRANSACTION_MGT.OPEN_TRANSACTION

    Hi,
    In a process of migrating my D2k(Forms 6i) application to Java based Web application through Jdeveloper 9i (9.0.3.x) using the JHeadstart 9.0.4.5, ofcourse all the process is successfully completed and the project is generated. But the time I run the project, in the browser when I do any changes to the existing data that was fecthed from the database or do any inserts and save the changes done, I get the follwoing error:
    JBO-29000: ORA-06550:PLS-00201: identifier 'QMS_TRANSACTION_MGT.OPEN_TRANSACTION' must be declared ORA-6550" Line 1, col 7 : PL/SQL:Statement ignored.
    I am using Oracle 8.1.7.4.1, with forms 6i and Designer 6i (Ver-4.10)
    Can any smart brain tell me the reason for which the above mentioned error is encountered pleaseeee???
    Thanks & Regards
    Phani

    I'm not real familiar with JHeadstart, I would try reposting this in the JHeadstart forum at JHeadstart
    Rob
    Team JDev

  • Urgent please -- got error while doing a simple update -- Thanks:)

    Hi guys,
    I have a procedure that updates a table, when I run the update manually from sqlplus it works and when I run the procedure by it self from sqlplus it also works the problem comes when I call that procedure from another procedure that I have I get the following error:
    ERROR at line 1:
    ORA-20998: Transaction Failed
    ORA-06512: at "HSO.QMS$ERRORS", line 128
    ORA-06512: at "HSO.QMS_TRANSACTION_MGT", line 900
    ORA-06512: at "IAIGC.CG$AUS_CSH_LEDGER_HEADER", line 115
    ORA-04088: error during execution of trigger 'IAIGC.CG$AUS_CSH_LEDGER_HEADER'
    ORA-06512: at "IAIGC.CSH_GL_PKG", line 7634
    ORA-06512: at "IAIGC.CSH_GL_PKG", line 266
    ORA-06512: at line 1
    This procedure was working fine until I took an export of my production dB and import it in my test database to test a fix in a diff procedure, here is my code
    ================================================
    BEGIN
    -- Get the Last day in the period
    v_date := last_day(to_date(p_period,'RRRRMM'));
    -- delete the trail revaluation etries from the detail
    delete from csh_v_ledger_detail
    where leh_period = p_period
    and leh_own_id = p_own_id
    and leh_jv_type in ('PR','RV');
    -- delete the trial revaluation etries from the header
    /*delete from csh_v_ledger_HEADER
    where period = p_period
    and own_id = p_own_id
    and jv_type in ('PR','RV');
    -- adjust difference between debit and credit in jvs
    -- update balances
    FOR ret_rec IN c_gen_mon_bal(v_date) LOOP
    -- initialize balances for each account
    v_bal_base := 0;
    v_bal_fc := 0;
    v_end_bal_fc := 0;
    v_end_bal_base := 0;
    v_trn_dr_fc := 0;
    v_trn_cr_fc := 0;
    v_trn_dr_base := 0;
    v_trn_cr_base := 0;
    v_ins := 0;
    -- Get Beginning Balances for the period from the
    -- csh_balances table
    BEGIN
    select round(amount_base,ret_rec.own_dec)
    ,round(amount_fc,ret_rec.bal_dec)
    into v_bal_base
    ,v_bal_fc
    from csh_balances
    where gla_id = ret_rec.gla_id
    and period = p_period
    and own_id = p_own_id;
    v_ins := 0;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN v_bal_fc := 0;
    v_bal_base := 0;
    v_ins := 1;
    END;
    -- Get the sum of all debit and credit transaction
    -- from the transactions table for the current month
    select sum(round(entered_dr,ret_rec.bal_dec))
    ,sum(round(entered_cr,ret_rec.bal_dec))
    ,sum(round(accounted_dr,ret_rec.own_dec))
    ,sum(round(accounted_cr,ret_Rec.own_dec))
    into v_trn_dr_fc
    ,v_trn_cr_fc
    ,v_trn_dr_base
    ,v_trn_cr_base
    from csh_v_ledger_detail
    where gla_id = ret_rec.gla_id
    and to_char(leh_value_date,'RRRRMM') = p_period
    and leh_own_id = p_own_id
    and leh_closed_flag = 'N';
    -- Add Balances for the month to all the transactions
    v_end_bal_fc := nvl(v_bal_fc,0) - nvl(v_trn_dr_fc,0) + nvl(v_trn_cr_fc,0);
    v_end_bal_base := nvl(v_bal_base,0) - nvl(v_trn_dr_base,0) + nvl(v_trn_cr_base,0);
    -- Get the exchange rate for the month
    v_rate := csh_acc_pkg.csh_get_rate(p_own_id,ret_rec.cur_id,v_date,'ACC');
    if v_ins = 1 then
    insert into csh_balances(
    OWN_ID
    ,GLA_ID
    ,MONTH_END
    ,AMOUNT_BASE
    ,AMOUNT_FC
    ,CONVERSION_RATE
    ,PERIOD_STATUS
    ,PERIOD)
    values(
    p_own_id
    ,ret_rec.gla_id
    ,v_date
    ,v_end_bal_base
    ,v_end_bal_fc
    ,v_rate
    ,'C'
    ,p_period);
    else
    update csh_balances
    set amount_fc = v_end_bal_fc,
    amount_base = v_end_bal_base,
    period_status = 'C',
    conversion_rate = v_rate
    where gla_id = ret_rec.gla_id
    and period = p_period
    and own_id = p_own_id;
    end if;
    END LOOP;
    /* update csh_v_ledger_header
    set closed_flag = 'Y'
    where own_id = p_own_id
    and period = p_period
    and closed_flag = 'N'; */
    csh_gl_pkg.csh_upd_leh_close(p_own_id,p_period);
    END;
    ================================================

    There is a messages.sql script available at the hst\scripts folder of your headstart installation. When you run this script the error stack will be written to the output, this might give you the information why the procedure fails.

  • ORA-20998: Transaction Failed on Headstart Utilities 6.5 installation

    Hello,
    I am having problem when running insthsu.sql script to install
    Headstart utilities 6.5. We are doing client/server approach. The
    server is Sun 450 - Oracle 8.1.7.0.0
    Designer 6i Release 4 repository was installed on the server.
    How far was the installation:
    1. Installed HST65 --> No problem found
    2. Installed HDEMO65 --> No problem found
    3. Failed on the following statement on insthsu.sql script:
    ... installing Quality Check utilities
    execute hsu_qa_app.install;
    error message:
    hsu65@devl> execute hsu_qa_app.install
    BEGIN hsu_qa_app.install; END;
    ERROR at line 1:
    ORA-20998: Transaction Failed
    ORA-06512: at "HST65.QMS$ERRORS", line 128
    ORA-06512: at "HST65.QMS_TRANSACTION_MGT", line 814
    ORA-06512: at "HSU65.CG$AIS_HSU_UTILITIES", line 39
    ORA-04088: error during execution of
    trigger 'HSU65.CG$AIS_HSU_UTILITIES'
    ORA-06512: at "HSU65.HSU_INSTALL", line 132
    ORA-06512: at "HSU65.HSU_QA_APP", line 40
    ORA-06512: at line 1
    Any idea or direction where should I go from here?
    Thanks,
    Sanny Subowo

    Ali,
    You are running into a bug in the install form. It sees the tables that you imported manually (like the message told you to do), and then complains about them. The best thing to do is change the code in the hsdinst.fmb where the check for existing objects is performed in program units CHECK_USERS:
    function hsu_objects_exist
    return boolean
    is
    cursor c_chk
    is
    select 'x'
    from user_objects
    where object_name like 'BL_%'
    -- or object_name like 'HSU_%'
    -- or object_name like 'OMR_%'
    So comment out the two lines as indicated above and recreate the fmx.
    Kind regards,
    Peter

  • Problem with CAPI routines get_date|num|char_value

    Hi CDM Ruleframe users,
    I created the following testscript
    (table a (id number,begindate date))
    begindate is initial 01-01-2000 for id=1
    1) update table a set begindate= sysdate
    2) rollback.
    3) app_a_capi.get_date_value
    In the debug monitor i log the data value this routine returns. This routine returns the new value of the date value (sysdate) instead of the old one(01-01-2000)!
    Is this because the built-in cache of the CAPI is not working properly?
    We are using CDM Ruleframe with CAPI generator v 6.0.2.1.
    Kind regards,
    Jan-Derk Weitering
    null

    Jan-Derk,
    It is technically not possible to rollback the CAPI cache (stored in package variables) just by issueing a database rollback command. There is no ON ROLLBACK database trigger to catch the event.
    If you want to do a rollback in a CDM RuleFrame environment, you should always call qms_transaction_mgt.abort_transaction instead. This combines rollback with clean up of transaction management, clears all business rules from the rule stacks and clears all messages from the cg$errors message stack.
    After this, it is possible that the CAPI cache still contains the wrong value, but no business rule code will look at it because there is no open transaction anymore. When a new DML action is performed, the CAPI cache is cleared (with each DML action, the CAPI compares the current transaction id to the previous transaction id).
    I hope this explains it,
    regards,
    Sandra

  • ADF BC with CDM Ruleframe informationals and warnings

    Best experts,
    I have an issue regarding using ADF BC in combination with CDM-RuleFrame.
    We are raising different kind of messsages (errors,warnings,informationals).
    JHeadstart delivers an AM that raises the errors but ignores the transactions with warnings and informationals.
    To display the informationals and warnings I want to follow this path:
    DB ==> Transaction (stores the messages on the AM) ==> CommitBean (Displays the messages in browser)
    I use the folowing transactionImpl:
    public class RuleFrameTransactionImpl extends DBTransactionImpl2{
      String mUndoId;
      private static Logger sLog = Logger.getLogger(RuleFrameTransactionImpl.class);
      private boolean hasErrors;
      public static String MESSAGE_SEPARATOR = "<br>";
      public static String QMS_UNHANDLED_EXCEPTION = "QMS-00100";
      public RuleFrameTransactionImpl()
        super();
       * Standard Ruleframe
      private void openRuleFrameTransaction()
        try
          CallableStatement cs = this.createCallableStatement("begin qms_transaction_mgt.open_transaction('JAVA'); end;",
                                                              1);
          try
            cs.execute();
          catch (java.sql.SQLException e)
            handleSQLError(e);
          finally
            try
              cs.close();
            catch (Exception ex)
              sLog.error("Error closing Callable Statement for CDM RuleFrame Open Transaction: " + ex);
      public void closeRuleFrameTransaction()
        // Close RuleFrame transaction
        CallableStatement cs = this.createCallableStatement("begin qms_transaction_mgt.close_transaction('JAVA'); end;",
                                                            1);
        try
          cs.execute();
          setDBFeedbackOnApplicationModule();
        catch (java.sql.SQLException e)
          handleSQLError(e);
        finally
          try
            cs.close();
          catch (Exception ex)
            sLog.error("Error closing Callable Statement for CDM RuleFrame Close Transaction: " + ex);
      @Override
      public void postChanges(TransactionEvent te)
        passivateStateForUndo();
        openRuleFrameTransaction();
        super.postChanges(te);
        setDBFeedbackOnApplicationModule();
        catch (DMLException e)
          // retrieve SQL error from details
          Object details[] = e.getDetails();
          if (details[0] instanceof SQLException)
            handleSQLError((SQLException)details[0]);
          // If reached this line, the detail is not a SQLException,
          // so throw it again
          throw e;
      public void handleSQLError(SQLException e)
        throws JboException
        if ((e.toString().indexOf("ORA-20998") > 0) ||
          // 20999 is raised when posting of changes fails
          // due to database constraint violation or built-in TAPI rule
          (e.toString().indexOf("ORA-20999") > 0))
          setDBFeedbackOnApplicationModule();
        else
          // Raise the SQL exception, it is not a RuleFrame error
          throw new JboException(e);
      @Override
      public void doCommit()
        closeRuleFrameTransaction();
        super.doCommit();
      public void passivateStateForUndo()
        sLog.debug("Executing passivateStateForUndo so we can roll back the Application Module when RuleFrame transaction fails");
        ApplicationModule am = getRootApplicationModule();
        String undoId = am.passivateStateForUndo("beforeRuleFramePost",
                                                 null,
                                                 0);
        mUndoId = undoId;
        hasErrors = false;
      public void activateStateForUndo()
        // If an undoId is stored on the request, we rollback the transaction
        // to the undoId savepoint. The undoId is stored prior to deleteing rows
        // from a table. By rolling back to the state prior to removing the
        // rows, we can re-display the failed-to-delete rows
        String undoId = mUndoId;
        if (undoId != null)
          sLog.debug("Executing activateStateForUndo, restoring state of before postChanges because RuleFrame transaction failed");
          ApplicationModule am = getRootApplicationModule();
          am.activateStateForUndo(undoId,
                                  0);
       * Aanpassingen vanwege QMS-messages (informationals + warnings)
      public void setDBFeedbackOnApplicationModule()
        RuleFrameApplicationModuleImpl am = (RuleFrameApplicationModuleImpl)getRootApplicationModule();
        sLog.debug("SetDBFeedback");
        CallableStatement st = null;
        try
          sLog.trace("create statement");
          // 1. Create a JDBC PreparedStatement for
          st = createCallableStatement("begin jhs_pck_errors.get_db_feedback(?,?,?);end;",
                                       0);
          sLog.trace("define parameters");
          // 2. Define out parameters
          st.registerOutParameter(1,
                                  Types.VARCHAR);
          st.registerOutParameter(2,
                                  Types.VARCHAR);
          st.registerOutParameter(3,
                                  Types.VARCHAR);
          sLog.trace("Execute statement");
          // 3. Execute the statement
          st.executeUpdate();
          sLog.trace("Build return objects");
          // 4. Build return objects
          ArrayList informationArray = new ArrayList();
          ArrayList warningArray = new ArrayList();
          ArrayList errorArray = new ArrayList();
          sLog.trace("merge into array");
          mergeStringIntoArray(informationArray,
                               st.getString(1));
          mergeStringIntoArray(warningArray,
                               st.getString(2));
          mergeStringIntoArray(errorArray,
                               st.getString(3));
          if (errorArray.size() > 0)
            //Error occured ==> rollback am.
            activateStateForUndo();
          am.addErrorArray(errorArray);
          am.addWarningArray(warningArray);
          am.addInformationArray(informationArray);
        catch (SQLException e)
          throw new JboException(e);
        finally
          if (st != null)
            try
              // 5. Close the statement
              st.close();
            catch (SQLException e)
      private void mergeStringIntoArray(ArrayList al, String string)
        sLog.debug(string);
        if (string != null)
          string = string.replaceAll("   ",
                                     "°");
          StringTokenizer st = new StringTokenizer(string,
                                                   "°");
          int tokenCount = st.countTokens();
          sLog.debug("Tokencount messages : " + tokenCount);
          for (int i = 0; i < tokenCount; i++)
            sLog.debug("Add " + i);
            al.add(st.nextToken());
    }This works when there are only informationals or warnings.
    When errors are raised I recieve the following stacktrace:
    <Warning> <oracle.adf.controller.faces.lifecycle.Utils> <BEA-000000> <ADF: Adding the following JSF error message: Internal error:Entity.afterCommit.status_modified
    oracle.jbo.JboException: Internal error:Entity.afterCommit.status_modified
    at oracle.jbo.server.EntityImpl.afterCommit(EntityImpl.java:7049)
    at oracle.jbo.server.DBTransactionImpl.doAfterCommit(DBTransactionImpl.java:2189)
    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2085)
    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2273)
    at local.achmeavastgoed.model.adfbc.base.RuleFrameTransactionImpl.commit(RuleFrameTransactionImpl.java:188)
    Can you give me some advise?
    Regards,
    Romano

    Hi Romano,
    your application is not aware of the fact that there are errors because all exceptions are gracefully handled.
    Because of that the doCommit() in your code example will just commit the changes by calling super.doCommit() even after the activateStateForUndo() did a rollback.
    public void doCommit()
        closeRuleFrameTransaction();
        super.doCommit();
      }So you need to change two things:
    First rewrite the doCommit()
    public void doCommit()
        closeRuleFrameTransaction();
    try{
        super.doCommit();
          } catch (JboException e){
          //  do something here
    }And also throw a Jbo exception in the handleSQLError()
       public void handleSQLError(SQLException e) throws JboException
          if ((e.toString().indexOf("ORA-20998") > 0)
               // 20999 is raised when posting of changes fails
               // due to database constraint violation or built-in TAPI rule    
               || (e.toString().indexOf("ORA-20999") > 0)
             setDBFeedbackOnApplicationModule();
             throw new JboException(e);
          else
         ....................................Now it should work. Your application will gracefully handle the errors, and once that is done, you just throw an exception in order not to commit.
    Regards
    Luc Bors

  • CEV business rule only uses first set of parameters in multiple inserts

    We have a cev rule that logs data for emails when a record is inserted in a table.
    Where there are two records inserted from a script, even where a qms_transaction_mgt.open_transaction and close transaction are used around each insert, the CEV record parameters do not change.
    By this I mean we have two records:
    1 - id: 22
    2 - id: 23
    We pass the id to the CEV business rule and dbms_output the parameter value - it indicates that for both records the p_id = 22.
    The insert into the table indicates that the record ids were 22 and 23.
    This appears to have been reported several times but there is no solution.

    I would set it lower than 20 minutes as that is quite high before it sends the rules into the background, if the spawning at 10 minutes try setting it just lower than 10 as a test.
    It may also be worth looking into the apache timeout (if you are using the apache web server plugin) as that could also be playing a part.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Other Delete Business Rule Problem

    Hello everybody
    I have a problem with Oher delete business rules and the problem is for getting rowid for a deleted row and it causes ther error : no data found.
    I solved this problem in this way
    qms_transaction_mgt.process_rule_violation
    ( p_br_name => 'BR_TEAM004_DEL'
    , p_msg_code => 'MS-00184'
    , p_display_label => display_label
    , p_table_name => 'ms_teams'
    , p_table_rowid => null /* get_rowid */
    In fact, I use null instead of get_rowid for this kind of rull. Is it a good way? Have every body any better way?
    Thanks
    Hassan

    Hassan,
    This is a known bug in the original Headstart 6i release. This bug was corrected in Headstart Patch 6.5.2.1 which is available via the Headstart Supplement Option. The Supplement Option can be purchase via your local consulting organization or the Oracle store. You will be given access to a portal from which you can download patches.
    Regards,
    Lauri

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

  • Truncate not allowed when using ruleframe?

    Hi all,
    I am using the ruleframe transaction management and in proc I use:
    execute immediate ('truncate table <table name>');
    I will get the following error:
    Error QMS-00100: Unhandled Exception ORA-02091: transaction rolled back
    ORA-02290: check constraint (HST65.QMS_NEED_TO_CLOSE_TRANSACTION) violated in PL/SQL Program Unit ...
    When I start the proc without the ruleframe transaction management, everething just works fine.
    Cheers,
    Joep Hendrix

    You are correct in your analysis.
    As soon as a RuleFrame transaction is opened, RuleFrame (i.e. the QMS_TRANSACTION_MGT pacakge) deliberately violates a deferred check constraint by inserting a row into the table QMS_TRANSACTIONS.
    Under normal circumstances, you would explicitly close a RuleFrame Transaction by calling QMS_TRANSACTION_MGT.close_transaction. When that procedure is done with all validations, it will remove the row from QMS_TRANSACTIONS. After this, a commit can be successfully performed.
    However, if a commit is executed either explicitly or implicitly (e.g. through a table truncate or DDL operation) without explicitly closing the RuleFrame transaction, the Deferred Check Constraint that was violated is still violated and is now enforced as part of the implicit commit. That is the problem you are running into.
    Conclusion: truncate table (nor DDL operations) can be performed inside a RuleFrame transaction.
    best regards,
    Lucas Jellema
    AMIS Services BV

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

  • Infinite recursive loop in Ruleframe generated CAPI-function (display_label)

    On our project we want to inforce a business rule that enforces that a row won't reference itself in a table like the following:
    create table ear as
    ( id number (10) primary key
    parent_id number (10) references ear (id)
    ;so
    insert into ear
    (id, parent_id)
    values
    (42, 42)
    /generates an error.
    In order to reach this end we defined a BR (a RER), transformed it, using the headstart business rule design transformer, and entered some code like this:
    if p_parent_id is not null
    then
    l_rule_ok := p_parent_id <> p_id;
    end if;This works, however, if we enter the abovementioned insert-statement and the capi tries to process the rule violation (using qms_transaction_mgt.process_rule_violation), it tries generating a display-label using the display_label CAPI function, which contains (between useful code) a non-terminating recursive loop:
    function display_label ( ... parameters ...) is
    -- ...usefull code
    if substr(l_mask, 2, 1) = '1'
    and l_ear_row.parent_id is not null
    then
    l_display_label :=
    l_display_label
    &#0124; &#0124;', '
    &#0124; &#0124;app_ear_capi.display_label
    ( p_id => l_ear_row.parent_id
    end if; -- substr(l_mask, 2, 1) = '1'
    -- more usefull code ...
    end display_label;Which behaves very unpleasant when p_id = p_parent_id ...
    An (greatly unsatisfying) idea we have to circumvent this behavior is making a manual hack in the generated code that either removes the recursive call or enters some stop-condition-like behaviour ( adding the parameter p_mask with the value '10', so the parent-id won't be processed a seccond time round).
    Any good options around?
    P.S.
    We are using HSU_CAPI 6.5.1.0; db 8.1.7 enterprise (on a VAX); des6i(6.5.46.1)
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Headstart Team:
    My best guess is that when you look at your table definition in Designer, and go to the foreign key column (parent_id), the "Descriptor Sequence" property is set. Kind regards,
    Peter<HR></BLOCKQUOTE>
    Alas, the Descriptor Sequence property for the parent_id is empty. The only other thing "out of the ordinary" is the presence of the tags <EXISTS_ROW><AGGREGATE_VALUE> in the notes-field (which, however, is exactly as it shoud be according to the User Guide)
    Kind regards,
    Sander
    ([email protected])
    null

  • Error QMS-00100 show at business rule violation

    When a business rule is violated I always get the following message first in my form:
    'Error QMS-00100 Unhandled exception ORA-20999 in PLSQL Program Unit qms_transaction_mgt.perform_business_rule'
    The next message is the right message when the business rule is violated.
    Does someone has a clue why this first message is shown?

    I don't know why this error showed up, but by recreating all packages in the headstartscheme the problem is solved

Maybe you are looking for