Page 1 of 1

Master Process is (Unassigned)

Posted: Tue Nov 08, 2016 11:44 am
by touhamm
Hi,

I am facing a wired problem where the master process show [Unsassigned] in the current user. This is not deterministic and does not apply to all cases of the process.

In more details, I have a master process and depending on its parameters a bunch of sub processes is started. Some cases are fine but some are not. While the master sub process both work fine and the sub process is correctly assigned, the current user is [Unassigned] for the master process. This causes the managers and case initiators not to know who is working on the subprocess. This was worked around by appending the master case number in the title of the subprocess number since we use the case IDs a lot and it it easy.

Image

What is causing this issue and how can I debug this?

EDIT: After deeper research, cases displaying [UNASSIGNED] are master cases indeed, but have not been paused (?) when the sub case was created. When looking for the master case ID, two results are returned, the unassigned master one and the sub process one. Doing the same for a sane case only returns one result.

PS: The two results are because the master case number is injected in the sub case title.

Re: Master Process is (Unassigned)

Posted: Tue Nov 08, 2016 8:01 pm
by amosbatto
Is the subprocess run in synchronous or asynchrononous mode?
To debug it use the debugger to get the value of the APPLICATION variable for the master case. Then, login into MySQL from the command line.
If using windows, first change to the directory where MySQL is:
cd <install directory>mysql\bin
Then login:
mysql -u root -p
Once inside mysql:
Code: Select all
use wf_workflow;
select * from APP_CACHE_VIEW where APP_UID='16820977557c7577c2e5c42054010817';
Replace with your APPLICATION value. Then paste the results here and I will see if I can figure out why the case is unassigned.

Re: Master Process is (Unassigned)

Posted: Wed Nov 09, 2016 6:58 am
by touhamm
Thank you for your answer.

The Process is a synchronous one.

Here is the output of the query:
Code: Select all
+----------------------------------+-----------+----------------+------------+------------+----------------------------------+----------------------------------+----------------------------------+----------------------------------+---------------------+---------------------+---------------------+---------------------+-------------------+-------------------+----------------------------------------------------------------+-------------------+-------------------------------+-------------------+-----------------------+--------------+--------------+--------------------+--------------------+-------------+--------------+-------------+---------------------+-----------------+---------------------+------------------------+
| APP_UID                          | DEL_INDEX | DEL_LAST_INDEX | APP_NUMBER | APP_STATUS | USR_UID                          | PREVIOUS_USR_UID                 | TAS_UID                          | PRO_UID                          | DEL_DELEGATE_DATE   | DEL_INIT_DATE       | DEL_TASK_DUE_DATE   | DEL_FINISH_DATE     | DEL_THREAD_STATUS | APP_THREAD_STATUS | APP_TITLE                                                      | APP_PRO_TITLE     | APP_TAS_TITLE                 | APP_CURRENT_USER  | APP_DEL_PREVIOUS_USER | DEL_PRIORITY | DEL_DURATION | DEL_QUEUE_DURATION | DEL_DELAY_DURATION | DEL_STARTED | DEL_FINISHED | DEL_DELAYED | APP_CREATE_DATE     | APP_FINISH_DATE | APP_UPDATE_DATE     | APP_OVERDUE_PERCENTAGE |
+----------------------------------+-----------+----------------+------------+------------+----------------------------------+----------------------------------+----------------------------------+----------------------------------+---------------------+---------------------+---------------------+---------------------+-------------------+-------------------+----------------------------------------------------------------+-------------------+-------------------------------+-------------------+-----------------------+--------------+--------------+--------------------+--------------------+-------------+--------------+-------------+---------------------+-----------------+---------------------+------------------------+
| 14148574957ebde00a498b8053508438 |         1 |              0 |      48857 | TO_DO      | 896351322530344d15c5d87090987558 |                                  | 51099666854d091a6d23db4036287069 | 63044906554d091a6d10919062646443 | 2016-09-28 15:13:04 | 2016-09-28 15:13:04 | 2016-09-29 15:13:04 | 2016-09-28 15:16:31 | CLOSED            | OPEN              | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | XXXXXXXXXXXXXXXXX | XXXXXXXXXXX                   | XXXXXXXX XXXXXXX  |                       | 3            |            0 |                  0 |                  0 |           0 |            0 |           0 | 2016-09-28 15:13:04 | NULL            | 2016-11-04 15:25:32 |                      0 |
| 14148574957ebde00a498b8053508438 |         2 |              0 |      48857 | TO_DO      | 193100061530344c594c083073095282 | 896351322530344d15c5d87090987558 | 82604146554d091a6d293a1037429701 | 63044906554d091a6d10919062646443 | 2016-09-28 15:16:31 | 2016-10-04 10:44:59 | 2016-09-29 15:16:31 | 2016-10-04 10:45:12 | CLOSED            | OPEN              | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | XXXXXXXXXXXXXXXXX | XXXXXXXXX XXXXXXXX            | XXXXXXX XXXXXXXXX | XXXXXXXXXX XXXXXX     | 3            |            0 |                  0 |                  0 |           0 |            0 |           0 | 2016-09-28 15:13:04 | NULL            | 2016-11-04 15:25:32 |                      0 |
| 14148574957ebde00a498b8053508438 |         3 |              0 |      48857 | TO_DO      | 92444836256125121668bc4034837109 | 193100061530344c594c083073095282 | 34090630554d091a6d18eb4059420092 | 63044906554d091a6d10919062646443 | 2016-10-04 10:45:12 | 2016-10-04 11:16:51 | 2016-10-05 10:45:12 | 2016-10-04 11:17:32 | CLOSED            | OPEN              | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | XXXXXXXXXXXXXXXXX | XX XXXXXXXX                   | XXXXXXX XXXXX     | XXXXXXXXXX XXXXXX     | 3            |            0 |                  0 |                  0 |           0 |            0 |           0 | 2016-09-28 15:13:04 | NULL            | 2016-11-04 15:25:32 |                      0 |
| 14148574957ebde00a498b8053508438 |         4 |              0 |      48857 | TO_DO      | 687039125530344d188c5f0084057344 | 92444836256125121668bc4034837109 | 52479201554d091a6d13388039846394 | 63044906554d091a6d10919062646443 | 2016-10-04 11:17:32 | 2016-11-04 15:25:32 | 2016-10-05 11:17:32 | NULL                | OPEN              | OPEN              | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | XXXXXXXXXXXXXXXXX | XXXXXX XXXXXXXXXXX XXXXXXXXXX | XXXXXX XXXXX      | XXXXXXXXXX XXXXXX     | 3            |            0 |                  0 |                  0 |           0 |            0 |           0 | 2016-09-28 15:13:04 | NULL            | 2016-11-04 15:25:32 |                      0 |
+----------------------------------+-----------+----------------+------------+------------+----------------------------------+----------------------------------+----------------------------------+----------------------------------+---------------------+---------------------+---------------------+---------------------+-------------------+-------------------+----------------------------------------------------------------+-------------------+-------------------------------+-------------------+-----------------------+--------------+--------------+--------------------+--------------------+-------------+--------------+-------------+---------------------+-----------------+---------------------+------------------------+

Re: Master Process is (Unassigned)

Posted: Wed Nov 09, 2016 8:22 pm
by amosbatto
This is very strange. The information is correct in the APP_CACHE_VIEW table which PM uses to generate the cases list in the Inbox. What version of PM are you using? Can you post the same information for the APPLICATION and the APP_DELEGATION tables?

select * from APPLICATION where APP_UID='XXXXXXXXXXXXXXX';
select * from APP_DELEGATION where APP_UID='XXXXXXXXXXXXXXX';

Re: Master Process is (Unassigned)

Posted: Thu Nov 10, 2016 5:33 am
by touhamm
I have already tried clearing all the caches and rebuilding cases' cache list with no success.
Code: Select all
mysql> select APP_UID, APP_NUMBER, APP_PARENT, APP_STATUS, PRO_UID, APP_PROC_STATUS, APP_PROC_CODE, APP_PARALLEL, APP_INIT_USER, APP_CUR_USER, APP_CREATE_DATE, APP_INIT_DATE, APP_FINISH_DATE, APP_UPDATE_DATE, 'XXXXX' AS APP_DATA, 'XXXXX' AS APP_PIN from APPLICATION WHERE APP_UID = '14148574957ebde00a498b8053508438';
+----------------------------------+------------+------------+------------+----------------------------------+-----------------+---------------+--------------+----------------------------------+----------------------------------+---------------------+---------------------+-----------------+---------------------+----------+---------+
| APP_UID                          | APP_NUMBER | APP_PARENT | APP_STATUS | PRO_UID                          | APP_PROC_STATUS | APP_PROC_CODE | APP_PARALLEL | APP_INIT_USER                    | APP_CUR_USER                     | APP_CREATE_DATE     | APP_INIT_DATE       | APP_FINISH_DATE | APP_UPDATE_DATE     | APP_DATA | APP_PIN |
+----------------------------------+------------+------------+------------+----------------------------------+-----------------+---------------+--------------+----------------------------------+----------------------------------+---------------------+---------------------+-----------------+---------------------+----------+---------+
| 14148574957ebde00a498b8053508438 |      48857 |            | TO_DO      | 63044906554d091a6d10919062646443 |                 |               | N            | 896351322530344d15c5d87090987558 | 896351322530344d15c5d87090987558 | 2016-09-28 15:13:04 | 2016-09-28 15:13:04 | NULL            | 2016-11-04 15:27:38 | XXXXX    | XXXXX   |
+----------------------------------+------------+------------+------------+----------------------------------+-----------------+---------------+--------------+----------------------------------+----------------------------------+---------------------+---------------------+-----------------+---------------------+----------+---------+
Code: Select all
mysql> SELECT * FROM APP_DELEGATION WHERE APP_UID = '14148574957ebde00a498b8053508438';
+----------------------------------+-----------+--------------+----------------+----------------------------------+----------------------------------+----------------------------------+----------+------------+-------------------+--------------+---------------------+---------------------+---------------------+---------------------+--------------+--------------------+--------------------+-------------+--------------+-------------+----------+------------------------+
| APP_UID                          | DEL_INDEX | DEL_PREVIOUS | DEL_LAST_INDEX | PRO_UID                          | TAS_UID                          | USR_UID                          | DEL_TYPE | DEL_THREAD | DEL_THREAD_STATUS | DEL_PRIORITY | DEL_DELEGATE_DATE   | DEL_INIT_DATE       | DEL_TASK_DUE_DATE   | DEL_FINISH_DATE     | DEL_DURATION | DEL_QUEUE_DURATION | DEL_DELAY_DURATION | DEL_STARTED | DEL_FINISHED | DEL_DELAYED | DEL_DATA | APP_OVERDUE_PERCENTAGE |
+----------------------------------+-----------+--------------+----------------+----------------------------------+----------------------------------+----------------------------------+----------+------------+-------------------+--------------+---------------------+---------------------+---------------------+---------------------+--------------+--------------------+--------------------+-------------+--------------+-------------+----------+------------------------+
| 14148574957ebde00a498b8053508438 |         1 |            0 |              0 | 63044906554d091a6d10919062646443 | 51099666854d091a6d23db4036287069 | 896351322530344d15c5d87090987558 | NORMAL   |          1 | CLOSED            | 3            | 2016-09-28 15:13:04 | 2016-09-28 15:13:04 | 2016-09-29 15:13:04 | 2016-09-28 15:16:31 |            0 |                  0 |                  0 |           0 |            0 |           0 |          |                      0 |
| 14148574957ebde00a498b8053508438 |         2 |            1 |              0 | 63044906554d091a6d10919062646443 | 82604146554d091a6d293a1037429701 | 193100061530344c594c083073095282 | NORMAL   |          1 | CLOSED            | 3            | 2016-09-28 15:16:31 | 2016-10-04 10:44:59 | 2016-09-29 15:16:31 | 2016-10-04 10:45:12 |            0 |                  0 |                  0 |           0 |            0 |           0 |          |                      0 |
| 14148574957ebde00a498b8053508438 |         3 |            2 |              0 | 63044906554d091a6d10919062646443 | 34090630554d091a6d18eb4059420092 | 92444836256125121668bc4034837109 | NORMAL   |          1 | CLOSED            | 3            | 2016-10-04 10:45:12 | 2016-10-04 11:16:51 | 2016-10-05 10:45:12 | 2016-10-04 11:17:32 |            0 |                  0 |                  0 |           0 |            0 |           0 |          |                      0 |
| 14148574957ebde00a498b8053508438 |         4 |            3 |              0 | 63044906554d091a6d10919062646443 | 52479201554d091a6d13388039846394 | 687039125530344d188c5f0084057344 | NORMAL   |          2 | OPEN              | 3            | 2016-10-04 11:17:32 | 2016-11-04 15:25:32 | 2016-10-05 11:17:32 | NULL                |            0 |                  0 |                  0 |           0 |            0 |           0 |          |                      0 |
| 14148574957ebde00a498b8053508438 |         5 |            3 |              0 | 63044906554d091a6d10919062646443 | 42059015157bd85b05c09a9008511823 | 5895060185714a71d9d8148059988821 | NORMAL   |          3 | OPEN              | 3            | 2016-10-04 11:17:32 | NULL                | 2016-10-05 11:17:32 | NULL                |            0 |                  0 |                  0 |           0 |            0 |           0 |          |                      0 |
| 14148574957ebde00a498b8053508438 |         6 |            3 |              1 | 63044906554d091a6d10919062646443 | 61488159857bd85b358d104006097896 | 687039125530344d188c5f0084057344 | NORMAL   |          4 | OPEN              | 3            | 2016-10-04 11:17:32 | NULL                | 2016-10-05 11:17:32 | NULL                |            0 |                  0 |                  0 |           0 |            0 |           0 |          |                      0 |
+----------------------------------+-----------+--------------+----------------+----------------------------------+----------------------------------+----------------------------------+----------+------------+-------------------+--------------+---------------------+---------------------+---------------------+---------------------+--------------+--------------------+--------------------+-------------+--------------+-------------+----------+------------------------+

Re: Master Process is (Unassigned)

Posted: Thu Nov 10, 2016 8:19 pm
by amosbatto
In your APP_DELEGATION table, you have 6 tasks, with the last 3 are open. It looks like you have 3 parallel tasks which are still open, but two of them do not yet have an INIT_DATE, so ProcessMaker is treating them as unassigned. Are you sure that two of your parallel tasks are not using Self Service or Self Service Value Based Assignment?

Re: Master Process is (Unassigned)

Posted: Mon Nov 14, 2016 6:28 am
by touhamm
Thank you for your support.

The sub processes are using Manual Assignment. There are 10 parallel sub processes. The assignment is done via a custom derivation form. I just made a test before replying and it worked correctly. Maybe there was an unusual manipulation by users or some recurring edge case on the unassigned tasks.....

I could reproduce the issue:
There are 12 parallel tasks and 10 of them are sub process. This is to have a dynamic number of parallel tasks running.
If the master process happen to trigger both a sub process and a regular task, then => [UNASSIGNED].

To put it simply, having a regular task and a subprocess active at the same time is problematic in ProcessMaker 2.5.

Is there a way to work around this?

Re: Master Process is (Unassigned)

Posted: Mon Nov 14, 2016 9:21 pm
by amosbatto
If you can post a sample process which shows the problem, I will give it to the developers to test.

Re: Master Process is (Unassigned)

Posted: Wed Nov 16, 2016 6:21 am
by touhamm
Thank you again for your support.

Attached are a master and sub process to reproduce the issue. Please kee in mind while the master process shows unassigned in the problematic combination, the sub process is correctly assigned. The inconvinence caused by this is that the manager and initiator have no way to figure out who a case is assigned to.

To use the attached file, simply import them and affect users to each step. The issue can be reproduced by choosing to start a regular and sub process.

Thank you.

Re: Master Process is (Unassigned)

Posted: Wed Jan 04, 2017 4:47 am
by RichardBracken
some cases are fine but some are not. While the master sub process both work fine and the sub process is correctly assigned, the current user is [Unassigned] for the master process. This causes the managers and case initiators not to know who is working on the subprocess. This was worked around by appending the master case number in the title of the subprocess number since we use the case IDs a lot and it it easy.