Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

By pocket
#814452
I have an exclusive gateway that keeps resetting to the value of 1 for both options.

We have a process where 3 tasks that point to an exclusive gateway.
From the gateway there are two outcomes, an end email event or another task. This is decided on the value of a boolean in the dynaforms.

variable: candidateApproved
type: Boolean
Options: 'Approved' for true and 'Denied' for false

The routing rule or the gateway is:
Action condition: @@candidateApproved==1
Denied condition: @@candidateApproved==0

So after We save and then run the form all tasks get directed to the next task whether they have been approved or denied.

Am I missing a step somewhere to get this to work?

Thanks.
By amosbatto
#814453
What is the value of the variable in the debugger? Your variable is probably being transformed to a value which isn't a boolean, such as an array if set by a checkbox or a string if set by a dropdown.

How are you setting the variable? With a checkbox, dropdown, radio button or trigger?
By amosbatto
#814455
For example, if you are using a checkbox to set your candidateApproved variable, then you should use conditions like this:
empty(@=candidateApproved) or @=candidateApproved[0] == 0

!empty(@=candidateApproved) and @=candidateApproved[0] == 1


Use empty() because it will check whether the variable has been set (in case the user used the Steps menu to skip the Dynaform) and use @= to access the variable as an array. If you use @@, then you are converting the variable into a string, so it is transformed from array(0) or array(1) to "Array".
By amosbatto
#814465
I don't understand why you are having a problem, but try using the label variable in your conditions, like this:
@@candidateApproved_label == "Approved"

@@candidateApproved_label != "Approved"
By amosbatto
#814466
The only way that I can imagine a variable changing its value is if you try to open two cases at the same time in the same web browser. When there are two case opens in the same web browser, then it is possible for the variables from the second case to overwrite the variables in the first case. There is an option in the Enterprise Edition to only allow users to open ProcessMaker in one tab/window to prevent this problem.
See: http://wiki.processmaker.com/3.2/faq#multiple_cases
By pocket
#814470
I've found that the routing rule will remain there if only 2 links go into the gateway, and as soon as a third or more occurs it panics and resets sending all traffic one way.

I've introduced a new gateway that does nothing before it heads to the important one which has fixed the problem.

Thanks for your help.
By amosbatto
#814479
What you are describing is very strange. Would you mind posting your process? I would like to examine your process to determine if it is a bug in PM.

Hello guys, I'm new in ProcessMaker and I have som[…]

DBA changed the php.ini file and the timezone is n[…]

Test SQL Query

I'm working on a suggested field, but I don't rece[…]