# Conditional Flow is not working

**URL:** <https://forum.flowable.org/t/conditional-flow-is-not-working/1890>\
**Category:** Flowable Engine\
**Created:** [April 16, 2018, 4:49am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890 "2018-04-16T04:49:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarcasigan](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sarcasigan](https://forum.flowable.org/u/sarcasigan)\
**Post date:** [April 16, 2018, 4:49am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/1 "2018-04-16T04:49:34Z")

</div>

Process variable is unknown property:

**Root Cause**

```
org.flowable.engine.common.api.FlowableException: Unknown property used in expression: ${httpPost.responseStatusCode == 200}

My configuration is this:

<?xml version="1.0" encoding="UTF-8"?>

```
<process id="timerProcess" name="Sample Process With Timer">
	<startEvent id="theStart" />
	<serviceTask id="httpPost" flowable:type="http">
		<extensionElements>
			<flowable:field name="saveResponseParameters"
				stringValue="true" />
			<flowable:field name="requestMethod" stringValue="POST" />
			<flowable:field name="requestUrl"
				stringValue="http://localhost:8080/Mohre/restfulScheduleInterview" />
			<flowable:field name="requestHeaders" stringValue="Content-Type: application/json" />
			<flowable:field name="requestBody" expression="${sampleRequestBody}" />
			<flowable:field name="failStatusCodes" stringValue="400, 404, 415, 500, 503" />
		</extensionElements>
	</serviceTask>
	<serviceTask id="theTask" flowable:type="http">
		<extensionElements>
			<flowable:field name="saveResponseParameters"
				stringValue="true" />
			<flowable:field name="requestMethod" stringValue="GET" />
			<flowable:field name="requestUrl"
				stringValue="http://localhost:8080/FlowableDemoSpring-0.0.1/try" />
			<flowable:field name="requestHeaders" stringValue="Content-Type: application/json" />
			<flowable:field name="failStatusCodes" stringValue="400, 404, 415, 500, 503" />
		</extensionElements>
	</serviceTask>
	<endEvent id="theEnd" />
	<sequenceFlow id="flow1" sourceRef="theStart" targetRef="httpPost" />
	<sequenceFlow id="flow2" sourceRef="httpPost" targetRef="theTask">
		<conditionExpression xsi:type="tFormalExpression">
			<![CDATA[${httpPost.responseStatusCode == 200}]]>
		</conditionExpression>
	</sequenceFlow>
	<sequenceFlow id="flow3" sourceRef="httpPost" targetRef="theEnd">
		<conditionExpression xsi:type="tFormalExpression">
			<![CDATA[${httpPost.responseStatusCode > 200}]]>
		</conditionExpression>
	</sequenceFlow>
	<sequenceFlow id="flow4" sourceRef="theTask" targetRef="theEnd" />
</process>

```

Is it because httpPost task has ended and is not accessible anymore to other sequenceFlow or sub tasks?
```

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [April 16, 2018, 6:07am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/2 "2018-04-16T06:07:51Z")

</div>

> [@sarcasigan](#):
>
> saveResponseParameters

flag stores responseStatus code in `ResponseStatusCode` variable.  
see [Open Source](https://www.flowable.org/docs/userguide/index.html#bpmnHttpTaskConfiguration)

Regards  
Martin

---

<div class="post-metadata">

**Author:** ![sarcasigan](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sarcasigan](https://forum.flowable.org/u/sarcasigan)\
**Post date:** [April 16, 2018, 6:13am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/3 "2018-04-16T06:13:13Z")

</div>

**Root Cause**

```
org.flowable.engine.common.api.FlowableException: Unknown property used in expression: ${responseStatusCode == 200}

still unknown property…  
Change was just removing httpPost (task id) since i already have the correct variable in place (responseStatusCode)
```

---

<div class="post-metadata">

**Author:** ![sarcasigan](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sarcasigan](https://forum.flowable.org/u/sarcasigan)\
**Post date:** [April 16, 2018, 7:30am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/4 "2018-04-16T07:30:11Z")

</div>

Also, i think my original post was already correct, since i followed the following instructions in the Flowable DOCS:  
Remember all the above execution variable names are prefixed by evaluated value of resultVariablePrefix. For example the response status code can be accessed in another activity as task7.responseStatusCode. Here task7 is the id of the service task. To override this behavior, set resultVariablePrefix as required.

Since my Service Task ID is httpPost, then httpPost.responseStatusCode was supposed to be correct, but not sure why Flowable engine is complaining of unknown property.

Anybody can help? Please check…

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [April 16, 2018, 9:25am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/5 "2018-04-16T09:25:46Z")

</div>

Try `httpPostresponseStatusCode`. (without .) To check variable names you can try debugger too ([Process debugger](https://forum.flowable.org/t/process-debugger/117/21?u=martin.grofcik)).

---

<div class="post-metadata">

**Author:** ![sarcasigan](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sarcasigan](https://forum.flowable.org/u/sarcasigan)\
**Post date:** [April 16, 2018, 9:36am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/6 "2018-04-16T09:36:11Z")

</div>

Still not working…

On the debugger, how to use this? Can debugger go to the xml configuration that i set in the above example (not java code)?

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [April 16, 2018, 10:01am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/7 "2018-04-16T10:01:59Z")

</div>

> [@sarcasigan](#):
>
> Still not working…

Check org.flowable.http.bpmn.HttpServiceTaskTest#testHttpGet2XX tests in the flowable source.

> [@sarcasigan](#):
>
> On the debugger, how to use this?

turn debugger on ([Process debugger - #21 by martin.grofcik](https://forum.flowable.org/t/process-debugger/117/21)). There are blogs about the debugger usage already with some small modifications.  
[Process debugger expression resolver++ – crystal processes](https://gromar01.wordpress.com/2017/06/07/process-debugger-expression-resolver/)

> [@sarcasigan](#):
>
> Can debugger go to the xml configuration that i set in the above example (not java code)?

Debugger can show you which variables are present on the execution.

Martin

---

<div class="post-metadata">

**Author:** ![sarcasigan](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sarcasigan](https://forum.flowable.org/u/sarcasigan)\
**Post date:** [April 17, 2018, 2:08am UTC](https://forum.flowable.org/t/conditional-flow-is-not-working/1890/8 "2018-04-17T02:08:23Z")

</div>

> [@martin.grofcik](#):
>
> httpPostresponseStatusCode

I used httpPostResponseStatusCode (with uppercase R on Response) and it worked…

I also got the debugger to work, thanks Martin for your help.
