Send process variables as local variable to event sub process

165 views
Skip to first unread message

Giovanni Roos

unread,
Nov 14, 2014, 3:42:35 AM11/14/14
to camunda-...@googlegroups.com

Hi

 

I have a process (process-P) that contains an event sub process. The event (event-A) that starts this event sub process is 'invoked' from a variety of other process instances (with other process definitions). I am using a REST call (/message) to invoke event-A. The method signature in my rest client:

 

public boolean sendMessage(String messageName, String businessKey, Map<String, String> processVariables, Map<String, String> correlationKeys);

 

My problem is that the process instances that fire event-A override each other’s process variables that they send to process-P when starting the event sub process. Is it possible to send the process variables as LOCAL scoped variables to the event sub process with the /message REST call to the event sub process?

 

Thank you

Giovanni

Discovery is an authorised financial services provider.

The information in this email is confidential and may have legal privileges. We intend it only for the use of the individual or entity we've addressed the communication to. If you have received this email by mistake please delete it and tell the sender. We forbid any unauthorised use, change, disclosure or sending of the contents of this email (including its attachments), whether in part or as a whole, unless consented to in writing by the sender, as it may be unlawful.

We cannot guarantee this email has no malicious coding.

We reserve the right to check, intercept and block emails or take any other action according to our email etiquette. 

Discovery will not be liable for any delivery delay, loss, harm, disruption or data corruption that may arise from this email.

A full list of company directors is available on our website at: https://www.discovery.co.za/info/directors - or to get this list by email, please email directo...@discovery.co.za

thorben....@camunda.com

unread,
Nov 14, 2014, 3:51:55 AM11/14/14
to camunda-...@googlegroups.com, giov...@discovery.co.za
Hi Giovanni,

According to the BPMN specification, an event subprocess does not define a new scope (i.e. it shares the scope it is defined in, which is the process instance in your case), that's why this cannot be done. Why did you choose to go with an event subprocess and not move the event subprocess to an independent process definition such that messages always create a new process instance (and therefore scope?).
If I understand your scenario correctly, then you always have at most one instance of process-P with your current design. I would like to understand your reasoning behind this.

Cheers,
Thorben

A full list of company directors is available on our website at: https://www.discovery.co.za/info/directors - or to get this list by email, please email ...

giovan...@gmail.com

unread,
Nov 14, 2014, 3:57:15 AM11/14/14
to camunda-...@googlegroups.com, giov...@discovery.co.za
Hi Thorben
Thank you for the quick response. The main reason was to have only a single process with lower overhead in terms of maintenance but I did not realize the side effect of this decision. What you say make sense and I will implement as you suggested.

Thanks!
Giovanni

Reply all
Reply to author
Forward
0 new messages