The "result variable name" attribute of a Java service task is lost when exporting a process

Description

When you set the attribute "result variable name" for a Java service task in the Activiti Modeler (part of the Activiti Explorer running in Tomcat), save the model and export it, the attribute is gone.

Here's how to reproduce:
I created a super-simple process in the Activiti Modeler with a start event, a Java service task and an end event. I set the attribute "Result variable name" to "testVar" (see attachment). Then I save the model and export it to a file. Result: the definition of the result variable is missing from the bpmn20.xml file:

<process id="process" isExecutable="true">
<startEvent id="sid-154EFE65-1AC3-4482-8B94-EC47422406B8"/>
<sequenceFlow id="sid-6EF930B8-197D-40B8-9489-30FDF5BF5EEF" sourceRef="sid-154EFE65-1AC3-4482-8B94-EC47422406B8" targetRef="sid-2E3117FA-1BE6-457C-ADF3-8A9E3EE491FE"/>
<endEvent id="sid-22AC7BC9-E838-44BD-A17E-1B43F1C5F0F5"/>
<serviceTask id="sid-2E3117FA-1BE6-457C-ADF3-8A9E3EE491FE"/> <!-- where's the resultVariable="testVar"? -->
<sequenceFlow id="sid-852ACB0D-C1A4-4CC9-A282-5563FF1A8CCA" sourceRef="sid-2E3117FA-1BE6-457C-ADF3-8A9E3EE491FE" targetRef="sid-22AC7BC9-E838-44BD-A17E-1B43F1C5F0F5"/>
</process>

My real example uses an expression like this: ${mam_wfe.execute()}.
I tried a few things:
a) When I use the result variable "testVar", e.g. in a following decision task, I see an error message telling that "testVar" doesn't exist. So it's not only a question of the export, it also doesn't execute as I expect it to do.
b) When I add the resultVariable="testVar" attribute manually to the file, execute the Activiti Engine in a unit test, deploy the process definition and execute it, it runs fine. The variable is set and can be used in expressions.
c) When I upload the modified file in the Activiti Explorer, deploy the process and start it, the variable is not set. The process fails if I use the testVar variable in an expression later in the process.

Environment

Windows 7 Pro, Activiti running within Tomcat

Assignee

Tijs Rademakers

Reporter

Andreas Kuehlmeyer

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure