- Mon Dec 23, 2019 12:39 pm
#827223
I have recently started working with Processmaker in order to build an app, but as of now, I am only testing it. Everything is going well but I have stumbled across a problem I am not able to solve.
In this test pool I made, when goods arrive, they are sorted to any of the 4 warehouses depending on product and quantity and depending on the final review of the manager through a checklist. The process will stop or return again to the starting point to be re-done. ]: https://i.stack.imgur.com/hRJ8x.png
There are 4 checks with keys 0-3 and their labels in 'Storage Succes'. My idea was for the manager to approve all 4 of the checks, showing that the process went right. Then, a trigger placed before the routing would see if there was any check not filled and if that would have happened, it would have restarted the process from the start. Otherwise, the process could end without any problem.
This is the trigger I wrote:
a. At first, I tried using the empty() php function, but that didn't work.
b. Then I tried simply equaling position to value like this:
if (@@checkgroupVar001[0] == 0 && @@checkgroupVar001[1] == 1 && @@checkgroupVar001[2] == 2 && @@checkgroupVar001[3] == 3 ) {
@@checklistFull == 1
}else{
@@checklistFull == 0
}
Since the key value I wrote was the same as the position, I figured it would work, but once again I get the Whoops!.
I created the variable checkListFull using the variable menu, so there should not be any problem as well...
Last, I placed a routing rule at the last gateway stating that the process would end given that @@checklistFull == 1 and it would be restarted if @@checklistFull == 0.
Obviously there is something not being done properly, I'm inclined to think that it must be the trigger or that variable, but I have not wrote php in a long time, so this could also be just me not remembering something basic.
Either way, thank you so much in advance for your help!
Happy evening and holidays!
------------------------------------------EDIT---------------------------------------------
I tried moving the trigger around, instead of just leaving it before the routing I put it before assignment and after Dynaform too. I also tried to send @@checklistFull as hidden because I thought that the variable could not be getting to the gateway properly, but in a previous trial i made a checkbox work for this same purpose, so I am still trying.
---------------------------------------EDIT 2-------------------------------------------------------
After thinking, I decided that my issue could be solved using a simple checkbox (Y/N) as I did in previous examples, but since this was a test, I am still curious about how can this be done, even knowing this may not be the correct flow! Any answers are still welcome.
In this test pool I made, when goods arrive, they are sorted to any of the 4 warehouses depending on product and quantity and depending on the final review of the manager through a checklist. The process will stop or return again to the starting point to be re-done. ]: https://i.stack.imgur.com/hRJ8x.png
There are 4 checks with keys 0-3 and their labels in 'Storage Succes'. My idea was for the manager to approve all 4 of the checks, showing that the process went right. Then, a trigger placed before the routing would see if there was any check not filled and if that would have happened, it would have restarted the process from the start. Otherwise, the process could end without any problem.
This is the trigger I wrote:
a. At first, I tried using the empty() php function, but that didn't work.
b. Then I tried simply equaling position to value like this:
if (@@checkgroupVar001[0] == 0 && @@checkgroupVar001[1] == 1 && @@checkgroupVar001[2] == 2 && @@checkgroupVar001[3] == 3 ) {
@@checklistFull == 1
}else{
@@checklistFull == 0
}
Since the key value I wrote was the same as the position, I figured it would work, but once again I get the Whoops!.
I created the variable checkListFull using the variable menu, so there should not be any problem as well...
Last, I placed a routing rule at the last gateway stating that the process would end given that @@checklistFull == 1 and it would be restarted if @@checklistFull == 0.
Obviously there is something not being done properly, I'm inclined to think that it must be the trigger or that variable, but I have not wrote php in a long time, so this could also be just me not remembering something basic.
Either way, thank you so much in advance for your help!
Happy evening and holidays!
------------------------------------------EDIT---------------------------------------------
I tried moving the trigger around, instead of just leaving it before the routing I put it before assignment and after Dynaform too. I also tried to send @@checklistFull as hidden because I thought that the variable could not be getting to the gateway properly, but in a previous trial i made a checkbox work for this same purpose, so I am still trying.
---------------------------------------EDIT 2-------------------------------------------------------
After thinking, I decided that my issue could be solved using a simple checkbox (Y/N) as I did in previous examples, but since this was a test, I am still curious about how can this be done, even knowing this may not be the correct flow! Any answers are still welcome.