cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to access a multiInstance variable of a subprocess in errorEvent flow within the same subprobess

onlyhemant2410
Champ in-the-making
Champ in-the-making
Hi,

I want to write an error handling flow in which I can fix the individual element(user task) of a list based upon error in a sub process.

AS per the example, I have created a su process which has multiInstance loop and has local variable "name". at a specific condition I throw and error and will be caught by an EventSubProcess within the same sub-process, raising and catching of event works perfectly but when I try to access the same variable "name" using form property in the 'Fix Name' user task, I can't, please help.

Please let me know if you need further information.

Thanks.
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Documentation says (http://www.activiti.org/userguide/#bpmnSubProcess) that variables should be accessible.
Could you create jUnit test for it please?

Regards
Martin

onlyhemant2410
Champ in-the-making
Champ in-the-making
Thanks Martin, this is my first time posting a question on activiti forum and I must appreciate the community, incredibly fast turnaround time, thanks.

I don't have a junit but this is how I was executing the code. Let me see how could I create a junit for it (need to look at documentation.)


Map<String, Object> properties = new HashMap<String, Object>();
String[] names = {"Jerry", "Rajeev", "Vijay","Hemant"};
properties.put("names", Arrays.asList(names));

runtimeService.startProcessInstanceByKey("InnerLoopEventProcess", properties);

please let me know if this is helpful, thanks again.

jbarrez
Star Contributor
Star Contributor
Unit tests are easy: https://github.com/Activiti/activiti-unit-test-template

As Martin said, variables are available in an embedded subprocess.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.