Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By blokje
#795783
Hello,

The problem I have is that the process reacts differently depending on the order of the tasks executed.
I have attached a rtf-file with the different senario's I have tried.

The tasks have been brought back to the most simple task, all tasks just have a submit button, except task 3, it has alse a checkbox (name= back) on the form.

What do I wrong and how can I make it work the way I want (wait until both paths are finished).
Attachments
(80.01 KiB) Downloaded 292 times
(89.05 KiB) Downloaded 297 times
(16.81 MiB) Downloaded 315 times
User avatar
By amosbatto
#795790
The condition to go from Task 3 to the converging parallel gateway is always false. You should change the routing rules in your exclusive gateway to use these conditions:
RoutingRulesForExclusiveGatewayParallelExample.png
RoutingRulesForExclusiveGatewayParallelExample.png (21.65 KiB) Viewed 4343 times
Your test_parallel-1.pmx process works correctly in PM 3.2.1. Here is the order I see when I execute cases:
Task 1 -> Task 2 -> Task 3 -> [X gateway] -> Task 2 -> Task 3 -> [X gateway] -> {waits for other thread} -> Task 4 {now both threads are completed} -> Task 5 -> (end)

Task 1 -> Task 4 -> {waits for other thread} -> Task 2 -> Task 3 -> [X gateway] -> Task 2 -> Task 3 -> [X gateway] {now both threads are completed} -> Task 5 -> (end)

In both scenarios, the converging parallel gateway waits until both threads have finished before continuing to Task 5. Do you want something different to happen?
By blokje
#795795
Thank you for your response.

I have tried this onsite but it still doesn't work for me.
I created a trial enviroment here (I assume it is the latest version), and even here it doesn't work.

What I did is:
Task 1 -> Task 2 -> Task 3 -> [X gateway] -> Task 2
then Task 4 it continues to Task 5, I think that should not happen, it should wait for Task 3 to set Back to false / [0]

I have also tried for the gateway conditions:
Code: Select all
Task 2 condition:        isset(@=Back) and @@Back[0] == "1"
gateway condition:       empty(@=Back) or @@Back[0] == "0"
Have you any other idea's?
User avatar
By amosbatto
#795803
I retried it again and see that you are right. Please file a bug report about this at http://bugs.processmaker.com

You need to use the conditions that I gave you. You need to access arrays as @=Back[0] and not as @@Back[0].

In the meantime, you can get around this problem by sticking a loop with an intermediate timer and an empty script task in your process to force the Task 4 thread to wait until the other thread completes:
WaitForBackToBeTrue.png
WaitForBackToBeTrue.png (26.07 KiB) Viewed 4324 times
Here is the sample process:
(102.94 KiB) Downloaded 330 times
If you are using this on your own server, then you need to configure your server to periodically execute the timereventcron.php file. See:
http://wiki.processmaker.com/3.2/Executing_cron.php

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]