2 Replies Latest reply: Nov 14, 2012 5:58 PM by 853104 RSS

    DB adaptor polling, edited sql does not work correctly

    853104
      Please considet the following table

      BPELProcess State
      BPEL1 0
      BPEL2 0


      My DB adaptor is polling on this table to check for the state 0.after reading it changes it to 1. and invokes the bpel process 1 .Bpel1 invokes another process which changes the state back to 0 .

      DBAdaptor polling freq is 2 min


      DB adaptor SQL is
      SELECT BPELPROCESS, STATE FROM INVOKEDMADMPKG WHERE (((BPELPROCESS = BPEL1) AND (STATE = 0)) AND (ROWNUM <= 1)) ORDER BY BPELPROCESS ASC FOR UPDATE NOWAIT


      but i used to see 2 instances every 2 minutes,i should see 1.


      when i deleted the 2nd row from the database table then it started working fine FOR SOME TIME and thenm the issue returned.

      I see twp bpel instances every 2 min


      Why cannot i pol on condition where BPEL PRocess =BPEL1 and State =0


      Is there a way to accomplish this

      Edited by: 850101 on Nov 14, 2012 2:10 PM
        • 1. Re: DB adaptor polling, edited sql does not work correctly
          vladodias
          850101 wrote:
          DB adaptor ... check for the state 0 ... changes it to 1 ... changes the state back to 0 ...
          BPEL will allways work in a transaction... So the change to 1 in the middle of the transaction doesn't make much sense, it will never be visible by other threads...

          I'm not sure what you're trying to achieve with that construction but I would say DbAdapter/Bpel wasn't designed to work like that... The results will be unpredictable, as you noticed yourself on your tests...

          If you need a BPEL to be invoked every two minutes you may have a look at using a scheduler...
          http://www.oracle.com/technetwork/middleware/soasuite/learnmore/soascheduler-186798.pdf

          Cheers,
          Vlad
          • 2. Re: DB adaptor polling, edited sql does not work correctly
            853104
            Hi ,
            Thanks for your response.The document seems very informative

            I m using 10.1.3.4.Would the document be applicable to 10g as well.

            Thanks