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

    jBPM integration

    Pavel Kadlec Novice

      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