views:

86

answers:

1

I have a very simple flow, a JMS Message starts a process which receives a List of objects. A foreach iterates through this list and sends a JMS Message to component to process the object in the list. This component needs to send a completion notification back to the flow process so it can carry on. Does anyone have any idea of how this can be acheived?

Thanks.

+1  A: 

How do you implement sending this message? Using a custom work item node? I see two options:

  • if you are always expecting a result JMS message, you could have your work item handler send the JMS message when the work item node is triggered but only complete the work item when the expected result message has arrived, this will make the flow only continue if the result message has been received (and you can for example send the work item id as some kind of context parameter in your message so you know which work item to complete if the result comes back)

  • if you also want to handle more unexpected JMS messages (not necessarily the result of a first request JMS message), you can use an event node for that, and have a JMS listener that translates incoming JMS messages (of a specific type) to signalEvent(..) invocations, that will then continue the flow from the event node forward.

Kris

Kris Verlaenen