5 Replies Latest reply on Oct 16, 2008 5:13 AM by Kevin Conner

    jBPM Integration - Bug and improvement ideas

    Bernd Ruecker Master


      I currently have a deeper look into the jBPM/ESB integration. Some things still puzzle me, and I wanted to raise two issues here because I see room for improvement ;-)

      1.) Bug in JBpmCallback?

      The JBpmCallback should send a signal to the one jbpm process, which triggered the ESB-Service. Right? (By the way: Some JavaDoc would be very nice here :-))

      I think there is a bug in the implementation, and I didn't find a test for it, so I am not sure if it is really a bug or if I got the use case wrong:

      CommandExecutor, line 127 (CALLBACK_EXECUTOR) is
      EPR toEpr = message.getHeader().getCall().getTo()

      Shouldn't that be
      EPR toEpr = message.getHeader().getCall().getReplyTo()

      The required token information is set in the replyTo EPR, and this makes sense:

      EPR replyTo = createReplyTo(esbToBpmVarsXml, globalProcessScope, executionContext);

      Or did I miss something?

      2.) Codebase around CommandExecutor

      The CommandExecutor class and the stuff arround it is quite hard to understand I think. It is a Command pattern (ESB: execute(message)) with a nested Command pattern (jBPM: execute(Command)). Is there a special reason for this? Why is it not done via methods (e.g. commandExecutor.executeCallback(method))? Even if that would require some if/else parsing for the OpCodes it would be much easier to understand I think. Or what do you think?

      Don't get me wrong, the code overall is okay, but I find the structuring very confusing and ApiDoc are mostly missing...

      Before I get dismissed, I can also volunteer for improving some of this areas :-) Since I expect to tackle a lot of these things anyway at the moment. I am committer in jBPM, so I signed the contributer agreement already, just need access to the SVN if you want to....

      Let me know what you guys think about it!