4 Replies Latest reply: Nov 24, 2009 2:15 AM by dori RSS

    Rules not executing when updating a row just before deleting it.

    621815
      I have a table with CEV rules that are triggered on update and others are triggered on delete. If I delete a row, the rule are executing correctly. If I'm updating the row just before deleting it (the same row, and the update must triggered at least one row), the rules are not executing... In both case, the rule are put on the stack, but in the second case, they are not execute because the row id's is present in the g_del_stack array (procedure qms_transaction_mgt.perform_business_rule).

      I think the problem can be reproduce on any tables. Why headstart do this ? Is there a bug fix on that, or something to do to avoid this ?

      Thanks

      Message was edited by:
      S. Jalbert
        • 1. Re: Rules not executing when updating a row just before deleting it.
          yvanstrasbourg
          Hi,

          I have precisions on this problem. Let's say I have a table (EMP) with both a business rule triggered by an update (BR_EMP002_UPD) and a business rule triggered by a delete (BR_EMP001_DEL). The only code in those rules is a show_message to demonstrate execution.

          Testcase 1 : open transaction, update a row, close transaction.

          Result 1 : BR_EMP002_UPD is stacked AND executed


          Testcase 2 : open transaction, delete a row, close transaction.

          Result 2 : BR_EMP001_DEL is stacked AND executed


          Testcase 3 : open transaction, update a row, delete that same row, close transaction.

          Result 3 : both business rules are stacked but NO BUSINESS RULE IS EXECUTED!!!

          Hopefully, testcase 3 is not a desired behavior. I could understand why BR_EMP002_UPD is not executed but BR_EMP001_DEL???

          We can track down the code (see Serge's post below) that causes this but will we cause more problems by changing it?

          Anybody have the same problems?

          Is this forum still monitored by the (J)Headstart team?

          thanks
          • 2. Re: Rules not executing when updating a row just before deleting it.
            yvanstrasbourg
            Hi again,

            I forgot to mention that changing the qms_transaction_mgt package will generate a lot of testing for us as we have over 2800 business rules implemented so far
            • 3. Re: Rules not executing when updating a row just before deleting it.
              yvanstrasbourg
              Hi,

              Is CDM RuleFrame still supported by the Center of Excellence? I think that 23 days is a bit long for a problem such as ours. Is the product dead?

              We feel we've hit a nasty bug in the RuleFrame engine and it would be nice if we couls get a confirmation as to why qms_transaction_mgt.perform_business_rule was changed to skip execution of certain rules.

              I have a simple testcase available to reproduce the problem.

              thanks
              • 4. Re: Rules not executing when updating a row just before deleting it.
                dori
                Yves,

                Did you find any solution for this problem? We are hitting it to, and not sure how to deal with it.

                Regards
                Pierre