Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Process Manager (Stardust) » Starting and reactivating multiple process instances(Starting and reactivating multiple process instances)
Starting and reactivating multiple process instances [message #1007176] Mon, 04 February 2013 18:26 Go to next message
Simon Nikles is currently offline Simon NiklesFriend
Messages: 3
Registered: February 2013
Junior Member
Hi there,

I have two situations, where one process should start a variable number of others or send messages/signals to certain ones respectively.

1. A process should start a variable number of other processes (e.g. a service returns a list of documents, each of them should be dealt with by a single process instance).

2. A process should reactivate some processes (e.g. a service returns a list of keys and a task should notify the corresponding processes - i.e. waiting for a message).

The simplest but not model driven approach was to invoke an application that makes API calls (startProcess) or sends messages to the queue.

Is there better way - e.g. using control-flow loop (while / repeat - which are hardly documented)?

Thanks for ideas, advices and opinions...





Re: Starting and reactivating multiple process instances [message #1007212 is a reply to message #1007176] Tue, 05 February 2013 03:58 Go to previous message
Robert Emsbach is currently offline Robert EmsbachFriend
Messages: 143
Registered: October 2011
Location: Singapore
Senior Member

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

Previous Topic:cp1252 encoding exception during Tomcat6 server startup on Windows
Next Topic:ConcurrencyException on AuditTrailPartitionBean with Tomcat 6 and MSSQL
Goto Forum:
  


Current Time: Thu Nov 27 23:41:44 GMT 2014

Powered by FUDForum. Page generated in 0.01678 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software