Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By kleung
#822411
Hi,

Grateful if somebody can give me a hand.
I'm using a Bitnami PM-3.2.1-0 on Window 10 as the development platform. I encountered a strange error.

The tasks of the process is simplified as follows.

Tasks A calls Subprocess SP1 and returns to Tasks B, afterwards Task B calls Subprocess SP2 and returns to task C

Tasks A calls SP1 and returns to Task B works properly.
However, occasionally, when Task B calls SP2, the following Notice and Error comes up.

Notice: Undefined index: objectPermissions in C:\ProgramFiles\Bitnami\processmaker-3.2.1-0\apps\processmaker\htdocs\workflow\engine\methods\cases\cases_Resume.php on line 79
Error: You do not have permission to see this case or you have not participated in it.

It is strange that if I repeated testing the WF several times, sometimes, the Notice and Error may stop and then the WF can work properly. I also observed that the problem comes up easily right after having the workflow design revised or saved again.

Thousand thanks in advance.

cheers,
Karl
User avatar
By amosbatto
#822414
You might see that error if your session variables get changed by opening multiple cases in the same web browser or if you login as multiple users in the same web browser.
If you are doing that, then you should use separate web browsers. For example, if you want to have two users logged in on your computer at the same time, then one user should login in Firefox and the other should login in Chrome. Likewise, if you need to open two cases as the same time, open one case in Firefox and open the second case in Chrome.

If you are editing your processes, while running cases, it is possible to get errors, but they should only effect the existing cases, but not the new cases.
By kleung
#822416
Hi amosbatto,

Thank you for your advice.
I'm using Firefox 64.0.2.
I'm such as lazy guy that I do not like to switch windows, hence I logged out developer account every time after editing. I then test the program by login as user.

Furthermore, I have tried using one window for editing and another for testing. The account in the not-in-use window was logout But the problem persisted.

Moreover, the problem occurs occasionally which is difficult for me to find the causes and bypass it.

Grateful if I can be advised further to tackle the problem.

Thousand Thanks.

cheers,
karl
User avatar
By amosbatto
#822418
I recommend using two web browser programs (for example, Firefox and Chrome) when designing processes and running cases at the same time. In Firefox, you can login as one user to design your processes. In Chrome you can login as another user to run cases. That way you will avoid screwing up the session variables.

ProcessMaker is not designed to have different session variables in different windows. If you login as user A in window 1 in Firefox, and then login as user B in window 2 in Firefox, ProcessMaker will think that user B is using both Window 1 and Window 2. For this reason, it is necessary to use two different web browser programs.
By kleung
#822420
Hi Amos,

I have followed your advice by using Firefox and Chrome for developer and user respectively. But I'm sorry to let you know that the problem still persist.
Furthermore, the problem still occur even if I only have one browser and login only with the user account, i.e. the browser has never login to the developer account.

Would it be a bug with PM or Bitnami?

cheers,
karl
User avatar
By amosbatto
#822434
Do you mind exporting your processes and posting the .pmx files?

If they are confidential, can you create sample processes that show the problem?
By justinopsky
#824034
I have the same problem.
The problem, in my case occurs when the user is of the type operator, and tries to access the cases in which participated, and finish with him.
It always gives the same error, in any case.
i have ProcessMaker 3.2.2
This is the error: Notice: Undefined index: objectPermissions in /opt/processmaker-3.2.2-0/apps/processmaker/htdocs/workflow/engine/methods/cases/cases_Resume.php on line 76
Anotação 2019-04-17 153743.png
Anotação 2019-04-17 153743.png (34.05 KiB) Viewed 1725 times
Note: The type operator don´t have the permission PM_ALLCASES, if not he can see all the cases.
By justinopsky
#824047
I have changed but now i have this error
Fatal error: Class 'ProcessMaker\BusinessModel\AppDelegationPeer' not found in /opt/processmaker-3.2.2-0/apps/processmaker/htdocs/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php on line 3215
Anotação 2019-04-18 114348.png
Anotação 2019-04-18 114348.png (36.01 KiB) Viewed 1700 times
User avatar
By amosbatto
#824052
justinopsky,
I can't replicate your error on my computer. Are you using PM 3.2.2 Community Bitnami or PM 3.2.2 Enterprise Bitnami ?

PS: Given the bugs that still haven't been fixed in the Community Edition, I recommend installing PM 3.2.1 and not upgrading until they have been fixed.
User avatar
By amosbatto
#824055
OK, now I'm able to reproduce the error in 3.2.2 Community Bitnami.
What you have to do is change from:
Code: Select all
            $oCriteria->add( AppDelegationPeer::APP_UID, $appUid );
            $oCriteria->add( AppDelegationPeer::USR_UID, $usrUid );
To:
Code: Select all
            $oCriteria->add( \AppDelegationPeer::APP_UID, $appUid );
            $oCriteria->add( \AppDelegationPeer::USR_UID, $usrUid );
Adding the \ before AppDelegationPeer should allow you to access the class correctly. For some reason this isn't necessary in PM 3.2.3, but it is in PM 3.2.2.

I have updated the documentation:
https://www.pmusers.com/index.php/Bugs_ ... n_3.2.2.2B
By justinopsky
#824078
Fatal error: Class 'ClassesCases' not found in /opt/processmaker-3.2.2-0/apps/processmaker/htdocs/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php on line 3255

At the line 3255 i have
$case = new ClassesCases();
User avatar
By amosbatto
#824084
justinopsky wrote:Fatal error: Class 'ClassesCases' not found in /opt/processmaker-3.2.2-0/apps/processmaker/htdocs/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php on line 3255

At the line 3255 i have
$case = new ClassesCases();
I don't see that error and my file /opt/processmaker-3.2.2-0/apps/processmaker/htdocs/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php doesn't have the line:
$case = new ClassesCases();

However, I'm using 3.2.2+001 Community Bitnami (the +001 means that it was patched) and I can't find the installer for 3.2.2 Community Bitnami. If I recall correctly, version 3.2.2 was withdrawn due to bugs.

If you go to Admin > System Information, does it say version 3.2.2 or 3.2.2+001?

Are you using ProcessMaker in production? If not, then I recommend that you do a manual installation of PM 3.2.1 in another machine and then import your process from your old installation. You will lose your cases, but it is better than using 3.2.2 which has bugs in the Community Edition.

If you need to keep your cases, then I recommend that you make a backup of your workspace. Then, also do a manual installation of 3.2.1 in another machine, but try to import your workspace into the new installation and hope that it works. (Sometimes it works when importing workspaces from a different version, but there is no guarantee.)

If importing the workspace doesn't work, then you will have to follow this procedure and then upgrade from 3.2.2 to 3.2.3 and then apply the code fixes.
Amosbatto, PMUsers.com is down.

It would be nice if ProcessMaker can let us know w[…]

Hi, What is your server config? Is your server Wi[…]

Hi, It's not possible, because processmaker set s[…]

Filtering Grids For Parallel Tasks

Hi, You must create a grid for example @=tempGrid[…]