# resultVariablePrefix in 6.3.0 is broken

**URL:** <https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938>\
**Category:** Flowable Engine\
**Created:** [April 24, 2018, 4:10pm UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938 "2018-04-24T16:10:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastiaan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sebastiaan](https://forum.flowable.org/u/Sebastiaan)\
**Post date:** [April 24, 2018, 4:10pm UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/1 "2018-04-24T16:10:17Z")

</div>

Storing the result of an httptask in a resultVariablePrefix results in null.  
this used to work in 6.2.1

A small test project can be downloaded here: [httptest](https://newteccy-my.sharepoint.com/:u:/g/personal/slag_newtec_eu/EfBz4eyUY1RBuPisbyUzK-wB3dSGdGfitaCbJlzSj7J2dg?e=q5EIeR)

This can be tested in the following example:

```
	<serviceTask id="httptask" name="httptask" flowable:type="http">
		<extensionElements>
			<flowable:field name="requestMethod">
				<flowable:string><![CDATA[GET]]></flowable:string>
			</flowable:field>
			<flowable:field name="requestUrl">
				<flowable:string><![CDATA[http://192.168.1.65:8080/hello]]></flowable:string>
			</flowable:field>
			<flowable:field name="requestHeaders">
				<flowable:string><![CDATA[Content-Type: application/json]]></flowable:string>
			</flowable:field>
			<flowable:field name="resultVariablePrefix">
				<flowable:string><![CDATA[hello]]></flowable:string>
			</flowable:field>

			<flowable:executionListener event="end"
				class="org.flowable.engine.impl.bpmn.listener.ScriptExecutionListener">
				<flowable:field name="script">
					<flowable:string><![CDATA[
					print("test");
					print(execution.getVariable("hello.responseBody"));
					]]></flowable:string>
				</flowable:field>
				<flowable:field name="language">
					<flowable:string><![CDATA[javascript]]></flowable:string>
				</flowable:field>
			</flowable:executionListener>

		</extensionElements>
	</serviceTask>
```

---

<div class="post-metadata">

**Author:** ![PascalSchumacher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pascalschumacher/32/336_2.png) [@PascalSchumacher](https://forum.flowable.org/u/PascalSchumacher)\
**Post date:** [April 24, 2018, 5:26pm UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/2 "2018-04-24T17:26:57Z")

</div>

In 6.3.0 the prefix is prepended without a dot in between, so you should use `execution.getVariable("helloResponseBody")`.

This was changed in [https://github.com/flowable/flowable-engine/commit/d7554ebb572caa7e66933852362610041baefecc#diff-d66c51ccebf7d3aff06bc6143c8f7bf8](https://github.com/flowable/flowable-engine/commit/d7554ebb572caa7e66933852362610041baefecc#diff-d66c51ccebf7d3aff06bc6143c8f7bf8)

---

<div class="post-metadata">

**Author:** ![Sebastiaan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sebastiaan](https://forum.flowable.org/u/Sebastiaan)\
**Post date:** [April 24, 2018, 8:56pm UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/3 "2018-04-24T20:56:51Z")

</div>

Anyone know why this was changed?  
Will my current processes break when I upgrade to 6.3?

---

<div class="post-metadata">

**Author:** ![PascalSchumacher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pascalschumacher/32/336_2.png) [@PascalSchumacher](https://forum.flowable.org/u/PascalSchumacher)\
**Post date:** [April 25, 2018, 7:10am UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/4 "2018-04-25T07:10:32Z")

</div>

I believe it was changed to make it possible to use the variable names in JUEL expressions, see:

> [@HttpActivityBehaviorImpl and HttpRequest using dots in variable names](https://forum.flowable.org/t/httpactivitybehaviorimpl-and-httprequest-using-dots-in-variable-names/1442):
>
> The Http task sets up many variables such as responseStatusCode with a dot notation. execution.setVariable(request.getPrefix() + ".responseStatusCode", response.getStatusCode()); Using dots in variable names makes life hard in JUEL expressions. This could have been solved if the default prefix itself included the dot, then putting a custom result prefix without it could have helped, but now there is now way to avoid it. I couldn’t find a way to escape the dot in UEL, so I needed to get the va…

I guess you have to update your processes before upgrading to 6.3. ☹

---

<div class="post-metadata">

**Author:** ![PascalSchumacher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pascalschumacher/32/336_2.png) [@PascalSchumacher](https://forum.flowable.org/u/PascalSchumacher)\
**Post date:** [April 25, 2018, 7:15am UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/5 "2018-04-25T07:15:12Z")

</div>

@tijs I think it would be helpful if this behavior change was added to the 6.3.0 release/update note. What do you think?

---

<div class="post-metadata">

**Author:** ![Sebastiaan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sebastiaan](https://forum.flowable.org/u/Sebastiaan)\
**Post date:** [April 25, 2018, 8:34am UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/6 "2018-04-25T08:34:36Z")

</div>

> [@PascalSchumacher](#):
>
> I guess you have to update your processes before upgrading to 6.3. ☹

Upgrading the processes is the least of my concerns. What about process instances that are running.  
Since this change is probably not backwards compatible, running (active instances ) processes will break.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [May 3, 2018, 1:13pm UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/7 "2018-05-03T13:13:20Z")

</div>

> [@Sebastiaan](#):
>
> What about process instances that are running.

Indeed, if they depend on the variables to be in the old format (for example on a sequence flow condition).  
Is it an option to deploy the very same process definition, just with the condition expression change and then call SetProcessDefinitionIdCmd with the new version for all the process instances?

---

<div class="post-metadata">

**Author:** ![wjansenw](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/wjansenw/32/438_2.png) [@wjansenw](https://forum.flowable.org/u/wjansenw)\
**Post date:** [June 12, 2018, 10:53am UTC](https://forum.flowable.org/t/resultvariableprefix-in-6-3-0-is-broken/1938/8 "2018-06-12T10:53:06Z")

</div>

A work-around for this as follows if you use the result in scripts:

```
responseBody=execution.getVariable("httptaskResponseBody");
if (responseBody==null) {
	responseBody=execution.getVariable("httptask.responseBody");
}
```
