question

Laurenz Peleman avatar image
0 Likes"
Laurenz Peleman asked Phil BoBo edited

ProcessFlow: potential bug in conditional decide statements

Hello everyone

I noticed some strange outcomes while using the Conditional Decide option in a Decide activity in ProcessFlow. I want to make a decision based on the non-zero value of a token label labelName by setting "token.labelName?" as Condition. This results in the following code

int condition = /** \nCondition: *//***tag:expression*//**/token.labelName?/**/;
if (condition)
	return /** \nIf Condition is true: *//***tag:true*//**/1/**/;
return /** \nIf Condition is false: *//***tag:false*//**/2/**/;

Strangely, while token.labelName is a non-zero value, condition equals 0 and the Decide activity returns the wrong exit. If I replace condition in the if statement by an explicit token.labelName?, the conditional decide is correct.

Kind regards

Laurenz Peleman

Choose One
processflowconditional decide
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·

I couldn't replicate this issue. Can you post a model that demonstrates the issue?

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
0 Likes"
Phil BoBo answered Phil BoBo edited

What version of the software are you using?

The pick option was fixed in 17.0.6 and 17.1.3. From the Release Notes:

  • Updated conditional statements in picklists so they aren't put into ints. This allows you to use current.labels["labelname"] directly in a picklist's condition field.

But even despite this change, the code you posted still returns 1 for non-zero label values and 2 for zero label values and non-existent labels.


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.