Conditional Flow is not working

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?

flag stores responseStatus code in ResponseStatusCode variable.
see Open Source

Regards
Martin

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)

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…

Try httpPostresponseStatusCode. (without .) To check variable names you can try debugger too (Process debugger).

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)?

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

turn debugger on (Process debugger - #21 by martin.grofcik). There are blogs about the debugger usage already with some small modifications.
Process debugger expression resolver++ – crystal processes

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

Martin

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

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