Conditional flow expression using just created output parameter

I have a user task u with a Boolean output parameter x.
A conditional flow out of u uses the conditional string ${x == true}.

When I complete the form for u, I get the error message

Cannot submit task form c80503e9-3c55-11ea-886c-0242e97b0684: Unknown property used in expression: ${x == true}. Cause: Cannot resolve identifier ‘x’

Why can I not use x in the conditional string of the conditional flow out of u?

Simple example attached (updated).invoice.v1.bpmn (4.4 KB)

Hi @Dave,

I’ve deployed your example and started a process instance.

After open the user task in the tasklist, I added a new variable with name xApproved, type Boolean and either check the box or not in the generic form. Hitting Complete, the process instances finished successfully.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier,

thanks for your reply. Your solution is what I am doing right now, but I actually want a more generic solution, described in post Simple user task forms outside of tasklist.

Since I cannot update my original post, here a new description:

I have a user task Approve failed validation with a Boolean output parameter xApproved, which takes its value as ${approved}.

A conditional flow out of Approve failed validation uses the conditional string ${xApproved == true} .

I want to complete Approve failed validation with a generic form (i.e. used not only for Approve failed validation) that posts approved (not xApproved). So it is Approve failed validation concern to store approved in the individual variable xApproved.

But when I post approved with the generic form, I get the error message

Cannot submit task form c80503e9-3c55-11ea-886c-0242e97b0684: Unknown property used in expression: ${xApproved == true}. Cause: Cannot resolve identifier ‘xApproved’

Why can I not use xApproved in the conditional string of the conditional flow out of Approve failed validation?

Hi @Dave,

sorry for the late reply.

Usually the form fields are direcly saved as process variables with the same name. If you want a mapping of variables names, you could try input-output-mappings for this: https://docs.camunda.org/manual/7.12/user-guide/process-engine/expression-language/#inputoutput-parameters.

Hope this helps, Ingo