How to split a message received and send each part to sub process
I have to do a process that will only be done with automatic tasks.
The process should start when a REST call is received. The message received will contain something like
"category": "TMF resource illustration",
"OrderDate": "2018-01-12T09: 37: 40.508Z"
The list in the orderItem is not fixed.
My need is that if I receive
- orderItem.code = SERV1, I have to call the subprocess which does the processing linked to SRV1
- orderItem.code = SERV2, I have to call the sub-process which does the processing linked to SRV2
- orderItem.code = SERV3, I have to call the sub-process which does the processing linked to SRV3
Of course I can receive them at the same time as I can receive only one depending on what the customer has purchased.
Of course the list of SERV is variable and is not limited to SERV1, SERV2, SERV3. So i can't make transitions
What do you recommend as an approach and as a way of doing things?
To do that, you need to create a 'Call activity' task, in the 'Process to call', you just need to user a script that use your 'orderItem.code'.
Then create subprocess that name 'SRV1', 'SRV2', ect
The best way, it's to create a mapping table that contain 'orderItem.code', 'subProjectVersion', 'subProjectName''. Like that, you can have different 'orderItem.code' that can call same subproject.
thank you for your proposal. On the other hand, personally I am not very comfortable with the idea of creating sub-processes corresponding to business data (SERV1, SERV2, ...) and elsewhere as I mentioned, the number is variable and can change depending on customer settings. SERV1, SERV2, ... should be seen as functional services (email, voice on the phone, TV on mobile, ....).
I think it's better to explore something like iterator on a list in the message received. If you have examples of implementation, I am interested.
I will try this.
Thanks for support.
Being a beginner on Bonitasoft, I need a little more support :) to achieve what you described above.
Is there a document that explains how to do this or do you just have an example that I can rely on to move forward?