|
Re: Starting and reactivating multiple process instances [message #1007212 is a reply to message #1007176] |
Tue, 05 February 2013 03:58 |
|
Simon,
those are very common pattern.
1. Multiple Instances without apriori runtime knowledge / dynamic spawn pattern
Please see have a look at the shipped pattern (@see pattern view)
The patter covers the more complex case where you dynamically spawn instances but also need to synchronize their results later. If you just need a dynamic spawn then looping over an async supprocess as shown in the first part of the pattern is sufficient.
In the near future we will support this in a more elegant fashion by supporting BPMN 2.0 multi-Instance activity symbols. The underlying implementation will probably remain the same though.
2. Waiting for a response / message
a) You can use the "hibernate initially" feature on every activity to make it hibernate until a status change is triggered. This can for instance happen via the API or via a timer event.
b) The JMS application is an asynchronous application type. It allows you to define a request-only, response-only or request-response activity. The process instance will hibernate when it reaches the response lifecycle stage of the JMS application activity instance. The instance can then be continued by sending a JMS message to the corresponding queue (application queue). For the matching between incoming message and waiting process instance several mechanism can be used. Please see the details here. The file attached to this article contains a JMSSyncExample.xpdl which illustrates this approach.
I hope this helps. Let me know if you have further questions.
Best regards
Robert
[Updated on: Tue, 05 February 2013 04:00] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02943 seconds