7 Replies Latest reply on Nov 28, 2006 4:22 PM by wugf

    BPEL beta2 - wait activity

    wugf

      I'm using wait activity like
      <wait for="'PT10S'" />
      The actual ELAPSE time varies at each run, from 10 seconds to 120 seconds.

      When I used
      <wait for="'PT30S'" />
      The actual ELAPSE time ranged from 30 seconds to 120 seconds from multiple runs. Some runs just timed out even I set the timeout to 10 minutes.

      With
      <wait for="'PT1M'" />
      I just got timed out even the timeout was set to 10 minutes.

      Could anybody shed some lights on this problem? Your help would be greatly appreciated.

        • 1. Re: BPEL beta2 - wait activity
          aguizar

          In the ATM example, the jBPM scheduler is configured to poll for new timers every 120 seconds. You can specify the polling interval in web.xml. Please refer to the user guide for details.

          Note that the responseTimeout value only defines the time jBPM BPEL will wait for a response to come back in the internal queue. The socket timeout value is defined by the client.

          JAX-RPC devises no portable way to set the client timeout. In JBoss, you can cast the dynamic proxy to javax.xml.rpc.Stub and set the "org.jboss.webservice.client.timeout" property to an Integer value of your choice.

          Under JBoss 4.0.4.GA and later versions, the property name "org.jboss.ws.timeout" is preferred over "org.jboss.webservice.client.timeout" to set the timeout property.

          • 2. Re: BPEL beta2 - wait activity
            wugf

            Alex, thanks. Now I tested wait up to PT60M and it worked.

            But I encountered another problem: it does NOT work when I put a wait before and a wait after an invoke of a partnerLink, for example

            <wait for="'PT5S'" />
            <invoke name="Invoke_eOffer" partnerLink="PartnerLink_eOffer"
            portType="ns4:SwsService" operation="cancelSolicitation"
            inputVariable="Invoke_eOffer_cancelSolicitation_InputVariable"
            outputVariable="Invoke_eOffer_cancelSolicitation_OutputVariable"/
            <wait for="'PT5S'" />

            It timed out.

            Just for reference, it works and gives 10 seconds wait if I put the 2 waits together (either before or after the invoke) like

            <wait for="'PT5S'" />
            <wait for="'PT5S'" />
            <invoke name="Invoke_eOffer" partnerLink="PartnerLink_eOffer"
            portType="ns4:SwsService" operation="cancelSolicitation"
            inputVariable="Invoke_eOffer_cancelSolicitation_InputVariable"
            outputVariable="Invoke_eOffer_cancelSolicitation_OutputVariable"/

            or

            <invoke name="Invoke_eOffer" partnerLink="PartnerLink_eOffer"
            portType="ns4:SwsService" operation="cancelSolicitation"
            inputVariable="Invoke_eOffer_cancelSolicitation_InputVariable"
            outputVariable="Invoke_eOffer_cancelSolicitation_OutputVariable"/
            <wait for="'PT5S'" />
            <wait for="'PT5S'" />

            Please anybody let me know what the problem is. Thanks in advance.

            (the missing ">" at the end of invoke is in the code, anyhow, it's not in the Preview)

            • 3. Re: BPEL beta2 - wait activity
              aguizar

              You mean PT60S, right? ;-)

              We have a weird issue here. What is the polling interval? Does the service get invoked?

              • 4. Re: BPEL beta2 - wait activity
                wugf

                No. I mean 60 MINUTES. Actually, PT60M8S to be exact, and the result delay was 3608 seconds.

                As of the weird issue :-(

                The pulling interval is 1 second:

                 <!-- jBPM Scheduler -->
                 <servlet>
                 <servlet-name>schedulerServlet</servlet-name>
                 <servlet-class>org.jbpm.scheduler.impl.SchedulerServlet</servlet-class>
                 <init-param>
                 <param-name>interval</param-name>
                 <param-value>1000</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                 <servlet-mapping>
                 <servlet-name>schedulerServlet</servlet-name>
                 <url-pattern>/scheduler</url-pattern>
                 </servlet-mapping>
                


                And the service got invoked.

                Please let me know what the problem would be. Thanks.


                • 5. Re: BPEL beta2 - wait activity
                  aguizar

                  One hour? Now I'm confused. When you say:

                  But I encountered another problem: it does NOT work when I put a wait before and a wait after an invoke of a partnerLink[...] It timed out.

                  What timed out? I thought you meant the web service request.

                  • 6. Re: BPEL beta2 - wait activity
                    wugf

                    Sorry for causing the confusion.
                    Let me make it simple: (in my test, the invoke itself is very fast and takes much less than 1 second)

                    First, 1 wait activity

                    <wait for="'PT5S'" />
                    <invoke ? />
                    

                    or
                    <invoke ? />
                    <wait for="'PT5S'" />
                    

                    They work.

                    Second, 2 wait activities
                    <wait for="'PT5S'" />
                    <wait for="'PT5S'" />
                    <invoke ? />
                    

                    or
                    <invoke ? />
                    <wait for="'PT5S'" />
                    <wait for="'PT5S'" />
                    

                    They work.

                    Third, 2 wait activities, but one before and one after the invoke, this does NOT work
                    <wait for="'PT5S'" />
                    <invoke ? />
                    <wait for="'PT5S'" />
                    

                    It timed out after 60 seconds (while both client timeout and responseTimeout were set at 60 seconds). (In my test, the invoke itself is very fast and takes much less than 1 second)


                    • 7. Re: BPEL beta2 - wait activity (and onAlarm in pick)
                      wugf

                      Same problem happens with onAlarm in pick.

                       <pick>
                       <onAlarm for="'PT5S'">
                       <empty/>
                       </onAlarm>
                       </pick>
                       <pick>
                       <onAlarm for="'PT5S'">
                       <empty/>
                       </onAlarm>
                       </pick>
                      <invoke ? />
                      

                      It works.

                      But
                       <pick>
                       <onAlarm for="'PT5S'">
                       <empty/>
                       </onAlarm>
                       </pick>
                      <invoke ? />
                       <pick>
                       <onAlarm for="'PT5S'">
                       <empty/>
                       </onAlarm>
                       </pick>
                      

                      It timed out after 60 seconds (while both client timeout and responseTimeout were set at 60 seconds). (In my test, the invoke itself is very fast and takes much less than 1 second)