-
1. Re: Master Slave instances of the same process
swiderski.maciej Dec 5, 2014 1:40 AM (in response to antonio.giambanco)1 of 1 people found this helpfulI am not sure I got it right what you're trying to do but I would model it with reusable subprocesses. So master process is always started first - as name suggest, so there cannot be slave without master (that's assumption I took for this example). So you have a master process that can sort of never ending loop of being able to create slave processes. It can be realized by a signal intermediate event that waits for a message to go ahead and create a slave and then it goes back again to a waiting state in case another slave should be created. Creation of a slave is done via reusable sub process which essentially means another process instance but with relation to this one as parent process instance.
Then slave can put itself to a wait state again via signal intermediate event to receive info from master (or other source) when needed.
HTH
-
2. Re: Master Slave instances of the same process
antonio.giambanco Dec 5, 2014 6:04 AM (in response to swiderski.maciej)Hi Maciej,
I was not so clear . . .
I have a process, this process can receive json/rest requests. Inside the request I have information that let me undestand if they are linked with others and if they are main or leaf information.
So when I receive a request:
- I check if it is a leaf of a request already processed, or in processing ( waiting because intermidiate tasks are human tasks for example), or that will be received later.
- if main request already has been processed (process completed), leaf request can go ahead
- if main request doesn't exist (will be sent from the provider later) or is in processing, leaf request must wait untill main request will be completed.
- if main request is finishing (last human task before the end is completed), it has to warn all leafs waiting for it.
Hope is it clearer
- I check if it is a leaf of a request already processed, or in processing ( waiting because intermidiate tasks are human tasks for example), or that will be received later.
-
3. Re: Master Slave instances of the same process
antonio.giambanco Dec 9, 2014 5:19 AM (in response to antonio.giambanco) -
4. Re: Master Slave instances of the same process
swiderski.maciej Dec 10, 2014 1:37 AM (in response to antonio.giambanco)yes, it might be actually good fit for your case (if I got it right )
HTH
-
5. Re: Master Slave instances of the same process
antonio.giambanco Dec 10, 2014 4:00 AM (in response to swiderski.maciej)Hi Maciej
thanks for answering me . . . since my process is called from an external client, How do I implement correlation? Do I need to create for example a script task between start and task1 for writing the compound correlation key and one script task between task3 and the end for reading the compound correlation key?
Thanks again
-
6. Re: Master Slave instances of the same process
swiderski.maciej Dec 10, 2014 4:25 AM (in response to antonio.giambanco)correlation key is available by casting ksession to correlation aware interface so you can use that. Unless you utilize REST api then you would need to stick with alternative approach that you described.
HTH
-
7. Re: Master Slave instances of the same process
antonio.giambanco Dec 10, 2014 4:35 AM (in response to swiderski.maciej)Yes I would use REST api,
so I think I will create and a CustomWorkingHandler for doing that
thanks