4 Replies Latest reply: Sep 6, 2012 6:14 PM by AndresG RSS

    Automated Task Redo Execution Mode Exception

    AndresG
      We have an automated task with only one automation plugin, this automation plugin is Xquery Sender type which is being executed in Do and Redo Compensation modes and sends a XML message to a JMS Queue with custom Correlation Id and this automation plugin complete the task immediately without expecting any type of answer.

      The XML message produced from the automation plugin mentioned before is processed by another automation plugin that exists in another OSM Order but the cartridge is deployed in the same OSM instance.

      In Do execution mode the plugin works as we expected but in Redo execution mode the log is raising the following exception:
      ORA-01422: exact fetch returns more than requested number of rows

      We were reviewing the following tables in the OSM database while the process is executing:
      OM_AUTOMATION_CTX
      OM_AUTOMATION_CORRELATION

      And we noted that at the end of the execution task the records corresponding to this task in the table weren't deleted, for this reason we have conflicts with the correlation id setted by the task that send the message and the task that received the same message raising the error that we explain in the paragraph above.

      In the test process that we've done to identify the cause of this behavior we could see the following: If the task that sends the message has two automation plugins the first to send the XML message and the second to receive an answer, the records in the tables were deleted and the exception isn't raised. But when the task only has one automation plugin to send the XML message with a XQuery Sender plugin and continue to the next task we received the exception described in this case.
        • 1. Re: Automated Task Redo Execution Mode Exception
          882807
          Hi Andres,

          I have also reproduced the same issue. I completely agree with you.

          I believe, the entries that were inside these DB tables(OM_AUTOMATION_CTX, OM_AUTOMATION_CORRELATION) during the execution of the automation task should be automatically removed when the task is completed even without a response plugin in place.

          May be there might be a reason for this kind of a behavior, not sure.

          I will watch this thread to learn.

          Thanks
          Naveen Jabade
          • 2. Re: Automated Task Redo Execution Mode Exception
            AndresG
            Hi Naveen !

            In Undo mode we have the same behavior that I tell you in Redo mode, the records corresponding to these tasks in the tables weren't deleted, raising the same error.

            Regards
            • 3. Re: Automated Task Redo Execution Mode Exception
              882807
              Hi Andres,

              Correct, the entries in the DB tables are not getting deleted irrespective of what task mode it is running. You probably might have to raise an SR.

              Considering the above fact, we shall ignore about the entries in the DB table and try out the below work around if applicable.

              You might be aware of this work around, you can generate a unique Correlation ID every time that automation plugin executes so that there won't be exceptions of duplicate Correlation ID entires in the Tables(irrespective of execution mode Do/Redo/Undo) otherwise do not provide correlation ID at all.

              Thanks
              Naveen Jabade
              • 4. Re: Automated Task Redo Execution Mode Exception
                AndresG
                Hi Naveen !

                We've already opened a SR in Oracle Support.

                We are generating the Correlation Id each time that the automation plugin is created, but the scenario that we have is: a SOM cartridge to send the message to a COM cartridge and both automation plugins have the same correlation id, the first to send the message and the second to listen the same message.

                The workaround that we used was send the message using a java automation plugin instead of xquery sender.

                The entries in the DB tables aren't getting deleted when we use events and jeopardies.

                Thank's