1 Reply Latest reply on Nov 2, 2009 3:15 PM by Joram Barrez

    Models of integration with JMS

    Nigel Sim Newbie

      Hi, I am currently evaluating jBPM 4.1 for use within a data processing platform. I am trying to understand how jBPM would normally be integrated with other services which emit JMS messages. From what I understand from the Users and Developers guides jBPM needs to be embedded or at least invoked by another service which handles the external interactions.

      My scenario has two requirements:
      1) Running of workflows when new data is available (notified by JMS/ActiveMQ)
      2) Running of scheduled workflows to retrieve data from remote instruments.

      I have found no reference to JMS integration, so I expect I would have to write an application which listens for incoming messages, decodes them, and invokes the appropriate jBPM workflow.

      Which brings me to the second question, how do you internally have workflows respond to a common event. ie, I want to allow workflow developers to deploy multiple workflows which all respond to a new file event. Is this possible, or would I have to launch all of the required workflows from my service, which would mean knowing which workflows need to be executed.

      Cheers
      Nigel

        • 1. Re: Models of integration with JMS
          Joram Barrez Master

           

          I have found no reference to JMS integration, so I expect I would have to write an application which listens for incoming messages, decodes them, and invokes the appropriate jBPM workflow.


          Correct. Basically you need a MDB that listens to your queue/topic and calls the jBPM service. I've seen this scenario multiple times out in the wild. jBPM is 'just a jar' and as such we don't ship it with JMS listeners etc.

          Which brings me to the second question, how do you internally have workflows respond to a common event. ie, I want to allow workflow developers to deploy multiple workflows which all respond to a new file event. Is this possible, or would I have to launch all of the required workflows from my service, which would mean knowing which workflows need to be executed.


          Unfortunately, there is no such thing currently in JPDL. I know that it a use case which tends to pop up sometimes - and it is also defined in BPMN2 spec... so my current approach would be to attach in some way or the other metadata (perhaps using the process definition key - prefixes or something) to the process definitions, which is used when such an event is received.