Hello,
I am using an event sub-process such as this one
Is there a way I can use variable mappings so I that in the scope of the event sub-process has specific variables from the main parent scope instead of getting all of them?
Thanks.
Hello,
I am using an event sub-process such as this one
Is there a way I can use variable mappings so I that in the scope of the event sub-process has specific variables from the main parent scope instead of getting all of them?
Thanks.
Hi,
as far as I know, this is currently not supported. The listener for the start-event needs to be registered before the event-subprocess started. Thereby, variables may be necessary, i.e., for correlating messages or inside a conditional event. So, there is a mismatch between the point at which local variables are initialized and the period in which the variables are required. Implementing variable mappings for event-subprocesses involves solving this “paradox.” Currently, there are multiple workarounds:
Hi @cambarantama, I have wondered the same question you’ve asked. Out of curiosity what is the business or technical reason/issue for wanting to scope a subset of variables from the main / parent process?
@Paul_Roth Using the RuntimeService, I wanted to complete the non-interrupting start message EventSubscription if they match certain criteria (the values of their local variables).
Hi @cambarantama, thanks for your response. Thanks to @StephanHaarmann for providing the solution to your query. You mention the use of a message start event but in your model, it appears that you are using a non-interrupting conditional start event, which by the way, I love conditional start events:-). As such, when you say you want to complete the non-interrupting start message, I am thinking you may mean you want to trigger the conditional start event to start the event subprocess when the condition is met, yes? When you refer to local variables, are you referring to those scoped to the service tasks in the main parent process? I apologize for not being 100% clear on exactly what you are trying to do, but assuming you want to trigger the start of the event subprocess process from either of the two service tasks in the main parent process, you can do this by setting the process variable’s value for the conditional start event to evaluate to true, as shown in the following example.