2 Replies Latest reply on Jun 4, 2008 6:57 AM by kadlecp

    jBPM integration

      Hello,
      what should happen if JBpmCallback action proccess reply from esb service before ESBActionHandler returns?

      I have done some debug, I put breakpoint after deliveryAsync(message) in ESBActionHandler. Esb service is called and when JBpmCallback processes reply, I can see this on console "Token id 145 from process instance 50 is no longer active".

      "Problem" are lines in class org.jboss.soa.esb.services.jbpm.cmd.CallbackCommand

       final Token token = jbpmContext.getToken(tokenId) ;
       if (token == null) { // HERE it return null when ESBActionHandler does not return
       throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " is no longer active") ;
       }
      


      In most cases ESBActionHandler returns before JBpmCallback is called, but if not, business process hangs up, because signal from CallbackCommand is lost.

      Is it bug? I know that it is extreme situation, but .... :-). Should be some timeout (eg. 1 minut) in CallbackCommand?
      I use JBoss ESB 4.3.GA

      Regards
      Pavel

        • 1. Re: jBPM integration
          jpechanec

          Hi,

          the services that you are invoking must use transactional transport i.e. JMS. Then the message is sent if and only if the jBPM process is successfully persisted in database in new wait state.

          J.

          • 2. Re: jBPM integration

            Hello,
            I did not realize that I used fs provider instead of jms provider. I switched to jms provider and now it works as you have written.

            Thank you very much for reply
            Pavel