Two Processes communicating via intermediate message events

Hey everybody,

I have a little understanding problem. In my scenario I have two processes (please look at the attached image). The “Parent Process” is started by a receiving message event (the submitted documents name is “testProtokoll”). During its processing time a decision table () is executed which at the end always triggers an process action. This action starts the “Child Process”. The “Parent Process” runs into a receiving Intermediate Message Event and waits until its restarted.
When the “Child Process” is finished it should throw a intermediate message event which the “Parent Process” should catch. Afterwards the “Parent Process” should continue its flow. But the “Parent Process” never resumes.

Can anybody help me finding a solution for this scenario? I’m desperatly searching for answers :frowning:

When the child process is in running or completed, do you see racmRS step in parent process in completed state or wating state?

Did you specify the Correlation ID of receive message step in parent process?

Hi, thanks for your replies.

@Mervin: Yes racmRS ist completed (for further information please look at the attachmend).

@Xiaowei Wang: I’m not sure if I set the Correlation ID correctly. I tried using a field from the document type which is thrown by the message event of the parent process. Maybe there is the problem but I’m not certain how to configure the Correlation Settings properly. I made a Screenshot from my Correlation Settings which you can find in the attachmend to this post.

Thanks for your help guys! :slight_smile:

Best regards
Stefan

To receive an intermediate message, you need to specify the Correlation ID both the start message step (the green one) and the receive message step(the orange one) in the parent process, and make sure the values are the same in run-time.

Hi, thanks for your reply.
So is it necessary that the used document type in the start message event (green one) is equal to the one used in the receiving intermediate message event (orange one)?

Because right now the parent process ist started with a document type called “testProzess” and the child process ist started with a document called “startLuefterReinigen”. The message event which is thrown in the child process uses the document type “rACMsignal”.

Do I have to use only one document type to solve my problem (parent process starts with “testProzess”, then the desicion table starts the child process with “testProzess” and later throws an intermediate message event with “testProzess”)?
Currently I cannot test your suggestons but in about three hours from now i should be able to deliver some new information.

Thanks again and best regards
Stefan

Hi,
I tried to set things right but still no success. For a better understanding I build a new Scenario in which a main process starts a Sub process and then waits for the Sub process to finish. I always used the same document type but no luck. Do I have to add subscribers in the Integration Server Settings?

Sry but I’m really stuck here. :frowning: can you give me another tip please?

In the attachment you can see my new test Scenario.

Best regards
Stefan
Update: During the runtime the subprocess is started but the main process is already waiting for a receiving message (see the Attachement “intermediate-message-debug”).


intermediate-message-debug.png

document types (and field name) you are using in correlation for the both steps can be of different types.
But the value of the correlation fields (at both start event and intermediate event) should be same in the run time. This will make sure that intermediate event joins the running process instance.

In your second scenario, while using callable reference process, you don’t have to explicitly throw and catch a message event for the inter process communication.

In the call activity step of Parent process (step with plus mark) , specify the Start / Return Documents. This should be the document that you want to pass to the sub process and the document that you are expecting the subprocess to return.

and then Add a start None event as the first step of your Child process. (not start message event)
Remove the throw events and catch events from both processes.

Hope this helps

Mervin

Hi Mervin,

thanks for your reply. I’m a bit confused. Lets look at my first scenario (the second one I only used for testing).
First I create the Parent Process. It has a start message event called ‘start docA’. The document type which is used to create this event has the name docA an only one string value called value. As correlation ID I use this exact field.
After that I insert an abstract task followed by an catching intermediate message event called ‘catch docA’. catch docA waits for an document type called ‘docA’. The correlation ID for this event is the value field from the document type docA.

Now I create a second process called ‘Child Process’. It has a start message event called ‘start docB’. I add an task which always generates a docA with its value set to 42 and after that a throwing intermediate message event ‘throw docA’. This message event throws docA with value = 42

Now I manually start both processes (just for testing). The child process completes without errors but the parent process fails with a null pointer exception (I attached it to this post - please look at error.txt).

Can you tell me what I’ve done wrong?

Thanks and best regards
Stefan
error.txt (1.91 KB)

Hi Stefan
not sure what that error means. Your test may not be working as you are using same document field as correlation field in both events of parent process.
Make a simple test using below steps.
Start parent process using docA. Set docA/value as correlation field in start event and its value at runtime should be 42,
Start child process using docB (correlation is not needed in child process)
Throw docC from child proces and Catch the docC in the catch event of parent process. Set docC/value as correlation field in the catch event of child process and its value at runtime should be 42
let me know how it goes.

There are two ways to call child process, sync and async.
Attached please find the sample.
StefanSupport.zip (5.51 KB)
StefanProcess.zip (10.9 KB)
StefanProcessProject.zip (58.4 KB)

Instruction of sync mode:

  1. Use Call Activity, set the type to BPMN Callable Process in parent process
  2. Set the Global Process Specification in child process

Instruction of async mode:

  1. Use Send Task to start child process and Intermediate to wait
  2. Set the Correlation ID of Start Message and Intermediate in parent process
  3. Pass the CID to child process and publish back to parent process

More detail please refer to sample and screen shot.


Hi guys,

sry for the late reply - had some busy days.

@Mervin: Was trying to implement your suggestions but they didn’t work. To make things clear I started to make a screen capture of what I was doing… during this video my two test process finally began to communicate…
Dont know what I changed. :wink: Thanks for your help!
My testscenario works. The next step is to get the real process running.

@Xiaowei Wang: Thanks for effort. But I’m not sure how to import your attachements into the Designer. “StefanProcess.zip” was a peace of cake but what do I have to do with the other two zip files? Cann you help me with this? Sry for this stupid question -.- Allthough my test process seems to work I’m eager to get your stuff running too. I think this would help me understanding this correlation stuff better.

Thank you both of you! I’ll keep you updated and hope the rest will work without any further problems.

Best regards
Stefan :slight_smile:

Save two zip files to <WM_DIR>/IntegrationServer/replicate/inbound, and login the port 5555, navi to Packages -> Management -> Install Inbound Releases -> Choose the zip file and click Install Release button.

no worries, glad to know it worked…

@Stefan: Please check the subscription trigger filter condition. Rarely it is not generated correctly, in case you have large BPMs or conditional flows.

Thanks,
Rankesh

Hi,

@Xiaowei Wang: Thanks, could build and debug both async processes but the parent process again is stuck like mine in the beginning. Shall I rebuild your scenario in my workspace or is there another way to get it working? But don’t put too much work in it since I got two running processes - I’m just curious what I’ve done wrong this time :wink:
Thanks againg for your help. I really appreciate this!

@Mervin: Yeah, I’m glad too - you can’t imagine how glad I am :smiley:

@Rankesh Kumar: Thanks for that! But how do I check this subscription and which value should it have?

Best regards

Not sure the reason, it should work fine with the following instructions:

  1. Import the StefanSupport.zip and sync the docs with broker
  2. Import the process and build
  3. Import the StefanProcessProject.zip and replace the one in IS
  4. Publish a StartParentProcessDoc to start parent process, make sure the cid is different for each publish.