# Output values not recognized by conditional flows

**URL:** <https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [June 2, 2022, 3:28pm UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979 "2022-06-02T15:28:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![krisMeta](https://forum.camunda.io/user_avatar/forum.camunda.io/krismeta/32/21216_2.png) [@krisMeta](https://forum.camunda.io/u/krisMeta)\
**Post date:** [June 2, 2022, 3:28pm UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/1 "2022-06-02T15:28:23Z")

</div>

Hi,

something similar was already discussed here, but unfortunately it didn’t address the main issue:  
[Conditional flow expression using just created output parameter - Camunda Platform 7 Topics / Camunda Platform 7 Process Engine - Camunda Platform Forum](https://forum.camunda.io/t/conditional-flow-expression-using-just-created-output-parameter/17460/4)

The issue I seem to have found is that output parameters, defined in Camunda Modeller, are not recognized by conditional flows:

[conditionalFlowDemo.bpmn](https://forum.camunda.io/uploads/short-url/XHBTJQkoetYSva5ZAZEtTsBh5u.bpmn) (7.0 KB)

When an output parameter is defined, it is recognized properly by an X-GateWay, but conditional flows seem to be checked before the outputs are processed and you get the following error:  
`Caused by: org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'taskOutput'`

Using conditional flows allows you to create much more compact diagrams, especially if it’s a boolean based decision. Is this a bug and can it be fixed easily?

---

<div class="post-metadata">

**Author:** ![krisMeta](https://forum.camunda.io/user_avatar/forum.camunda.io/krismeta/32/21216_2.png) [@krisMeta](https://forum.camunda.io/u/krisMeta)\
**Post date:** [June 10, 2022, 3:26pm UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/2 "2022-06-10T15:26:40Z")

</div>

was anyone able to recreate this error or am I the only one?

---

<div class="post-metadata">

**Author:** ![davidgs](https://forum.camunda.io/user_avatar/forum.camunda.io/davidgs/32/11721_2.png) [@davidgs](https://forum.camunda.io/u/davidgs)\
**Post date:** [June 10, 2022, 6:14pm UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/3 "2022-06-10T18:14:16Z")

</div>

Hi @krisMeta and welcome to the Camunda Community!

I think the problem in your model is that in the `Task With Output` element you are setting the `value` to value, but then in your conditional flow, you are testing that `${taskOutput == "value"}` If you change the element’s output to be “value” I think it will work as expected.

[test-condition.bpmn](https://forum.camunda.io/uploads/short-url/hb0ZxS92IfGdfHum7RpOC19w0z5.bpmn) (3.4 KB) Built this small test and it works fine. I then altered your model and it works as well.  
[conditionalFlowDemo.bpmn](https://forum.camunda.io/uploads/short-url/w1xZJQzy2TAFW227kBfHkpmNqyv.bpmn) (3.6 KB)

While using conditional flows can make the process diagram more compact, it is much harder to read, understand, and (as you’re finding) debug should problems arise.

I hope this solves your problem.

Best,  
dg

---

<div class="post-metadata">

**Author:** ![krisMeta](https://forum.camunda.io/user_avatar/forum.camunda.io/krismeta/32/21216_2.png) [@krisMeta](https://forum.camunda.io/u/krisMeta)\
**Post date:** [June 13, 2022, 7:03am UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/4 "2022-06-13T07:03:03Z")

</div>

Hi @davidgs,

thank you for your reply.

I’m a little confused though. Are you trying to tell me that I made a typo somewhere  
and set the `taskOutput` variable to `value` instead and that’s why it’s not set for the conditional flow?

It may be, that you downloaded an older version of the example I created. I did a few typos at the beginning but corrected them and as far as I can see they are not present in the current version.

I ran your example. Since you used a `User Task` to set the output, I needed to claim and complete it first, before the conditional flow was processed. Then I got the same error:

 ![image](https://forum.camunda.io/uploads/default/original/3X/3/9/396cac69417df97a8f6777de0942658054f876f9.png)

To me, it still seems that conditional flows are processed before outputs are set.

---

<div class="post-metadata">

**Author:** ![davidgs](https://forum.camunda.io/user_avatar/forum.camunda.io/davidgs/32/11721_2.png) [@davidgs](https://forum.camunda.io/u/davidgs)\
**Post date:** [June 13, 2022, 11:48am UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/5 "2022-06-13T11:48:50Z")

</div>

It’s not a typo, per se. This will be easier to explain if we use a different variable name than `value`. Your process variable name is `taskOutput`. And you are setting the value of `taskOutput` to `value`. So let’s change that to say the value of `taskOutput` is `Foobar`. In your conditional, you are looking for `${tastOutput == "Foobar"}` which is a quoted string value. However, in your variable assignment statement, you are not using a quoted string. you are using value, not “value”, and therein lies the problem. Try setting the value of `taskOutput` to “Foobar” and change your comparator to `${taskOutput == "Foobar"}` and you will see what I mean.

If you look at the 2 examples I sent back, you will note that I am setting the variable `taskOutput` to “value”, not value.

Using `value` as an actual _value_ makes things very confusing, so I would advise against it in the future.

dg

---

<div class="post-metadata">

**Author:** ![krisMeta](https://forum.camunda.io/user_avatar/forum.camunda.io/krismeta/32/21216_2.png) [@krisMeta](https://forum.camunda.io/u/krisMeta)\
**Post date:** [June 13, 2022, 1:29pm UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/6 "2022-06-13T13:29:44Z")

</div>

So, we seem to have a great misunderstanding here and I am not able to recreate what you are saying. We can use `Foobar` instead of `value` if this helps us to understand each other.

This is how I understand (and have tested) how Camunda works, when defining an output:

I can set the Assignment type and it is set to `String or expression`.  
To me, this means, that if I type text, it is interpreted as a String. It is only interpreted as an expression if I surround it with `${<expression>}`.

Here are some examples to confirm my understanding:

- If the value field is filled with `Foobar`, then the remaining process interprets it’s as a string consisting of `Foobar`.

[taksOutputSetsFoobar.bpmn](https://forum.camunda.io/uploads/short-url/5rQVUiVV1n4O8KJ5bLwuHqmLKBD.bpmn) (5.4 KB)

 ![taksOutputSetsFoobar](https://forum.camunda.io/uploads/default/original/3X/9/0/90267a9f5c5a7d9157d8643a83dd4435caef6586.png)

[taksOutputSetsNotFoobar.bpmn](https://forum.camunda.io/uploads/short-url/cyDof9zqPv7VooI4B2R2d9l2Blz.bpmn) (5.4 KB)

 ![taksOutputSetsNotFoobar](https://forum.camunda.io/uploads/default/original/3X/7/1/71672bf93749ec7f3eb5a133cd025057265b7c28.png)

* * *

- If I fill the field with `"Foobar"` instead, it will be interpreted as a string consisting of `"Foobar"`

[taksOutputSetsQuotFoobarQuot.bpmn](https://forum.camunda.io/uploads/short-url/bpDwqgm8KlRh4eT0ROTuzMjWof0.bpmn) (5.5 KB)

 ![taskOutputSetsQuotFoobarQuot](https://forum.camunda.io/uploads/default/original/3X/5/e/5e9425529d67484fc59a939769250f25b246c511.png)

[taksOutputSetsQuotNotFoobarQuot.bpmn](https://forum.camunda.io/uploads/short-url/5rjIjwyOZxVr4HUHnlNDcsskwRv.bpmn) (5.5 KB)

 ![taksOutputSetsQuotNotFoobarQuot](https://forum.camunda.io/uploads/default/original/3X/5/7/570854e598b7f1d1f14416a2da5326f1a8206a54.png)

* * *

- And if I fill it with the expression `${"Foobar"}` it will be interpreted as a string consisting of `Foobar`

[taksOutputSetsFoobarAsExpression.bpmn](https://forum.camunda.io/uploads/short-url/eGgDGfaKGzObMQm1KhQAHA41qnE.bpmn) (5.5 KB)

 ![taksOutputSetsFoobarAsExpression](https://forum.camunda.io/uploads/default/original/3X/b/8/b8eecc8346d722ffbd7b66a5e386a411265d2a10.png)

[taksOutputSetsNotFoobarAsExpression.bpmn](https://forum.camunda.io/uploads/short-url/52VbnTsisRu6ppfzHamQ0w7fhjK.bpmn) (5.5 KB)

 ![taksOutputSetsNotFoobarAsExpression](https://forum.camunda.io/uploads/default/original/3X/8/5/85d152d5e4afb15b47fa503358d9797ebc10cd08.png)

All these processes create the expected results for me. Do they yield different results for you?

Because if they do, then we must be using some very different Camunda versions or something else is completely off.

Also, this is not the problem, because I got the exact same error when using your process example, as you can see in the screenshot I attached to my previous post.

If I take the first example from this post (`taksOutputSetsFoobar.bpmn`) and replace the XOR-Gateway with a conditional flow setup, I get the mentioned Error:

[taksOutputSetsFoobarConditionalFlowError.bpmn](https://forum.camunda.io/uploads/short-url/wFH8wVDjrIa1Ykdiww7f1I1wYOd.bpmn) (4.8 KB)

 ![taksOutputSetsFoobarConditionalFlowError](https://forum.camunda.io/uploads/default/original/3X/b/0/b0b07ae1078bd1d761f721b09a6463f95211adbd.png)  
 ![taksOutputSetsFoobarConditionalFlowErrorConsole](https://forum.camunda.io/uploads/default/original/3X/8/0/800b4d16bd7b5733fdee1513b91036e9e497d741.png)

Does this process not throw this error for you?  
If this isn’t a bug, how do I make this work?

---

<div class="post-metadata">

**Author:** ![hassang](https://forum.camunda.io/user_avatar/forum.camunda.io/hassang/32/16498_2.png) [@hassang](https://forum.camunda.io/u/hassang)\
**Post date:** [June 13, 2022, 2:08pm UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/7 "2022-06-13T14:08:36Z")

</div>

Hi @krisMeta,

Yes, I faced the same error when tested with version 7.17.0. It looks like a **bug**.  
I never thought of using conditional flows before.

---

<div class="post-metadata">

**Author:** ![davidgs](https://forum.camunda.io/user_avatar/forum.camunda.io/davidgs/32/11721_2.png) [@davidgs](https://forum.camunda.io/u/davidgs)\
**Post date:** [June 13, 2022, 5:37pm UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/8 "2022-06-13T17:37:58Z")

</div>

I am running Camunda Platform 7.15-ee right now, and all I can say is that if you put quotes around the string in the value assignment, it works. If you don’t, it will not.

This will **not** work:

 ![Screen Shot 2022-06-13 at 1.34.19 PM](https://forum.camunda.io/uploads/default/original/3X/e/7/e79a14dac2f57f3f5f60afb0a7ba5d8f670518a2.png)

This will:

 ![Screen Shot 2022-06-13 at 1.37.22 PM](https://forum.camunda.io/uploads/default/original/3X/2/3/23ac9816ab59ca914c9938d403f64a01ba14f9d0.png)

I will have to get 7.17 up and see if the same is true there.

dg

---

<div class="post-metadata">

**Author:** ![krisMeta](https://forum.camunda.io/user_avatar/forum.camunda.io/krismeta/32/21216_2.png) [@krisMeta](https://forum.camunda.io/u/krisMeta)\
**Post date:** [June 14, 2022, 8:06am UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/9 "2022-06-14T08:06:07Z")

</div>

@hassang: Thanks for testing this. It’s good to know that I’m not the only one 🙂

@davidgs: this is very interesting (and a little unintuitive imho 😉 ). I’m running 7.17.0, just as @hassang.  
However, are we in agreement that this would be a separate topic and is not related to the conditional flow issue?

---

<div class="post-metadata">

**Author:** ![krisMeta](https://forum.camunda.io/user_avatar/forum.camunda.io/krismeta/32/21216_2.png) [@krisMeta](https://forum.camunda.io/u/krisMeta)\
**Post date:** [June 14, 2022, 9:06am UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/10 "2022-06-14T09:06:48Z")

</div>

I created an issue on the jira board for this:  
[[CAM-14712] Output values not recognized by conditional flows - camunda JIRA](https://jira.camunda.com/browse/CAM-14712)

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 31, 2024, 10:17am UTC](https://forum.camunda.io/t/output-values-not-recognized-by-conditional-flows/37979/11 "2024-01-31T10:17:46Z")

</div>

Closed on January 31, 2024, 10:17am UTC


