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

Moderator: amosbatto

By milanshah
#815288
Hi,
I want to set permissions for group but processmaker is not showing my groups in permissions.
Attachments
glpi-user.png
glpi-user.png (25.38 KiB) Viewed 599 times
permission.png
permission.png (57.01 KiB) Viewed 599 times
By amosbatto
#815301
Strange. What version of PM are you using? Bitnami or manual install?
By amosbatto
#815311
I just tried creating a new process permission in PM 3.2.1 Community and I can assign it to a group. Does this problem occur with all groups or just with your "GLPI users" group?

Have you installed multiple languages in ProcessMaker? If you created the group when logged in using one language, and are now using a different interface language, then the database query for the groups in the CONTENT table might now find the group. (ProcessMaker shouldn't have this problem, but it can occur.) You need to edit the properties of the group again and save them again, so it will create a record in the current interface language in the CONTENT table for the group.
By milanshah
#815318
This problem is occurring with all groups of processmaker and I have only installed one language i.e. English.
and my colleague also installed new processmaker but he is also unable find groups in permissions
By amosbatto
#815334
Did you import this group using LDAP or Advanced LDAP? What happens if you create a new group? Do you still see the same problem?

Do this in the wf_workspace database (or whatever you named your database):
SELECT * FROM GROUPWF WHERE GRP_TITLE='GLPI users';
SELECT C.* FROM GROUPWF G, CONTENT C WHERE G.GRP_TITLE='GLPI users' AND G.GRP_UID=C.CON_ID;

Post your results.
By milanshah
#815335
GLPI users are imported from GLPI and i also created few users in processmaker and assigned them to new group in processmaker but that group is also not getting displayed in permission dropdown.

SELECT * FROM GROUPWF WHERE GRP_TITLE='GLPI users';
Code: Select all
"3001111755b4c7b1934ac33018699477"	"GLPI Users"	"ACTIVE"	""	"NORMAL"

SELECT C.* FROM GROUPWF G, CONTENT C WHERE G.GRP_TITLE='GLPI users' AND G.GRP_UID=C.CON_ID;
Code: Select all
"GRP_TITLE"	""	"3001111755b4c7b1934ac33018699477"	"en"	"GLPI Users"
By amosbatto
#815369
I don't see any problem with your database records for the group. I don't think anyone has tested PM with GLPI users. It may be different than OpenLDAP or Active Directory.

For a user which was imported from GLPI, can you post its database record?
SELECT * FROM USERS WHERE USR_USERNAME='XXXXXXXXX';

What happens if you create users inside the PM interface (don't import them from GLPI) and then create a new group and only assign users to that group which were created inside PM? Can you still not see the group when creating a process permission.
By milanshah
#815385
Hi,
SELECT * FROM USERS WHERE USR_USERNAME='XXXXXXXXX';
Code: Select all
"8116989145b4c7b7cd29099020662147"	"6"	"glpi"	"102dc8eda1b0c34ccc60e8355139ab33"	"glpi"	"glpi"	"[email protected]"	"2035-12-31"	"2018-07-16 07:03:24"	"2018-07-25 08:40:13"	"ACTIVE"	""	""	""	""	""	""	""	""	""	""	""	"2018-07-16"	"PROCESSMAKER_OPERATOR"	""	""	"NORMAL"	"0.00"	""	""	\N	""	""	\N
And I also tried making users and group in processmaker but still that group didn't show up in permissions.
By amosbatto
#815409
Perhaps importing users from GLPI is screwing something up and ProcessMaker can't get groups correctly. Try deleting all your users that you imported from GLPI and see if that fixes the problem. I have never seen this problem before, but nobody has tested PM with GLPI.
By amosbatto
#815476
This is bizarre. If you want me to check it, you can export the workspace for your second installation of ProcessMaker where you don't have any imported users and email me the .tar file at [email protected]

I'd like to see if I can replicate this problem.
#815628
Hello, I have this problem too.
When attempting to add permission to the process the registered groups do not appear.

I already deleted the installation and database and reinstalled both but the problem still occurs. I have already tested with LDAP and ProcessMaker (MYSQL) authentication, but in both cases the problem occurs.

I performed manual installation on Debian 9, ProcessMaker version 3.2.1-community.


Sorry, my English is not good.
By amosbatto
#815637
edsondalsoquio and milanshah,
I am using PM 3.2.1 Community (manual install) in Debian 8.4 and I am not seeing this problem.

Are you using the "admin" user (or another user with the PROCESSMAKER_ADMIN role) when you try to assign the group to the permission?

OK, let's investigate. The first thing is to check the response being returned by the /api/1.0/{workspace}/groups?filter=X endpoint.

In the ProcessMaker source code, edit the file workflow/engine/src/ProcessMaker/Services/Api/Group.php and in the index() function at lines 48-50, change the code from:
Code: Select all
             $response = $group->getGroups($arrayFilterData, null, null, $start, $limit);

            return $response["data"];
To:
Code: Select all
             $response = $group->getGroups($arrayFilterData, null, null, $start, $limit);
            file_put_contents("/tmp/groups_endpoint_response.txt",  json_encode($response["data"]));
            return $response["data"];
Then, try to assign a group to a permission in ProcessMaker. Then, post the contents of your /tmp/groups_endpoint_response.txt file here.
#815651
I am using the user "admin", I can already have another user with the "admin" permissions.


I performed some tests by inserting the line in the file Group.php, however nothing is generating in the folder / tmp.
From what I've noticed that point in Group.php is only being used when permission is saved in the process. I used the User.php file of the same path in lines 35 to 37 inserting the same line of code is including the permission. The file in / tmp is only generating after saving the permission.

I also performed a test by changing the ProcessPermissions.php file located in /engine/src/ProcessMaker/BusinessModel/ by inserting the code between lines 59 and 75 in some combinations.
This is also only generating a file when saving the permissions.

It would have the location of the code line that loads all the groups and users, or even the line that performs the filter interaction with the loaded data, so I believe it would be possible to perform a test before saving the permission.
By amosbatto
#815656
In my installation of PM 3.2.1 Community (manual install) in Debian 8.4, using PHP 5.6.20, MySQL 5.5.47 and Firefox 51, when I make the change the change to the source code that I described above, I am seeing the /tmp/groups_endpoint_response.txt being written the moment I type in the Group or User text box in the Create Permission dialog box.

What versions of PHP and MySQL are you using and what web browser are you using?

If you press F12, to open your web browser's debugger and go to the "Console" or "Network" tab, you should see a POST to the /api/1.0/{workspace}/groups?filter={X} and /api/1.0/{workspace}/groups?filter={X} endpoints when you type in text in the Group or User field.

Here is what I'm seeing in the Firefox debugger for the POST:
restGroupsCallPermission.png
restGroupsCallPermission.png (101.65 KiB) Viewed 375 times
and response:
restGroupsResponse.png
restGroupsResponse.png (105.29 KiB) Viewed 375 times
Are you seeing the POST and response?
By milanshah
#815716
Sorry for replying so late.
I am using admin user for setting permissions

I also tried following method but that file did not get created in /tmp
Code: Select all
$response = $group->getGroups($arrayFilterData, null, null, $start, $limit);
file_put_contents("/tmp/groups_endpoint_response.txt",  json_encode($response["data"]));
return $response["data"];
I have attached screenshot of network tab

I have group named 'GLPI user' which is not getting displayed here

this is the request API : 'http://workflow.milan.com:9000/api/1.0/workflow/'

Response with 200 status returned 'glpi' user
Attachments
admin_group_permision.png
admin_group_permision.png (105.29 KiB) Viewed 356 times
User avatar
By tomolimo
#815720
Hello
Just to add my penny worth piece of information:
I'm using 3.0.1.8CE, and I am using it with GLPI, and I get no problem with the permissions on processes.
I think this can be an issue with the configuration of the web server, can it be?
I'll try the test proposed by amosbatto, and I'll post the results.
Regards
Tomolimo
By amosbatto
#815730
milanshah,
It appears that the api/1.0/workflow/groups endpoint is not working on your installation of ProcessMaker. Please file a bug report about it at http://bugs.processmaker.com

Let's see if we can debug the problem. Edit your my.cnf file and add the following lines:
Code: Select all
[mysqld]
general-log=1
log-raw=1
general-log-file=/var/log/mysql/general.log
Then, restart the mysql service (or reboot).
In Linux:
service mysqld restart
or
service mysql restart

Then, try assigning a group to a permission in ProcessMaker and see if the bad query appears in the /var/log/mysql/general.log file. You should see something like SELECT ... GROUPWF or SELECT ... FROM CONTENT FROM CONTENT WHERE CON_CATEGORY='GRP_TITLE'.

You can try executing that same database query in your wf_workflow database in MySQL, so see if there is anything wrong with it.
The problem is that if there is an error in the query, MySQL generally won't log it.

Also, in your workflow/engine/config/env.ini file, add the following line:
Code: Select all
debug = 1
This might give you more information inside ProcessMaker.

The question is what makes your installation different? This is really hard to debug without running tests on your server.

Do you have any group names which have non-ASCII letters (like ë or Ñ) or symbols (like & or ")?
(I'm guessing here, but I have seen problems importing when there are non-ASCII letters.)
By milanshah
#815737
I enabled general logs in mysql but there was no Query for table 'GROUPWF' and 'CONTENT' when i searched for Groups in processmaker permissions.

And there is no Non-ASCII characters in Group names
By milanshah
#815738
There are queries like
Code: Select all
SELECT COUNT(USERS.USR_UID) FROM USERS WHERE USERS.USR_STATUS='ACTIVE'
 AND ((USERS.USR_USERNAME LIKE '%test%' OR USERS.USR_FIRSTNAME LIKE '%test%')
 OR USERS.USR_LASTNAME LIKE '%test%')
Code: Select all
SELECT USERS.USR_UID, USERS.USR_USERNAME, USERS.USR_PASSWORD, USERS.USR_FIRSTNAME, USERS.USR_LASTNAME, USERS.USR_EMAIL, USERS.USR_DUE_DATE, USERS.USR_CREATE_DATE, 
USERS.USR_UPDATE_DATE, USERS.USR_STATUS, USERS.USR_COUNTRY, USERS.USR_CITY, USERS.USR_LOCATION, USERS.USR_ADDRESS, USERS.USR_PHONE, USERS.USR_FAX, USERS.USR_CELLULAR, USERS.USR_ZIP_CODE, USERS.DEP_UID, USERS.USR_POSITION, USERS.USR_RESUME, USERS.USR_BIRTHDAY, USERS.USR_ROLE, 
USERS.USR_REPORTS_TO, USERS.USR_REPLACED_BY, USERS.USR_UX, USERS.USR_TOTAL_INBOX, USERS.USR_TOTAL_DRAFT, USERS.USR_TOTAL_CANCELLED, USERS.USR_TOTAL_PARTICIPATED, USERS.USR_TOTAL_PAUSED, USERS.USR_TOTAL_COMPLETED, USERS.USR_TOTAL_UNASSIGNED, 
USERS.USR_TIME_ZONE, UPPER(USERS.USR_LASTNAME) FROM USERS WHERE USERS.USR_STATUS='ACTIVE' AND ((USERS.USR_USERNAME LIKE '%test%' OR USERS.USR_FIRSTNAME LIKE '%test%') OR USERS.USR_LASTNAME LIKE '%test%') ORDER BY UPPER(USERS.USR_LASTNAME) 
ASC LIMIT 10

I have groups named 'test1' and 'test2'
Attachments
test_group.png
test_group.png (23.72 KiB) Viewed 335 times
By milanshah
#815775
Hello amosbatto and edsondalsoquio,
We found the problem regarding this issue, Problem was with Mysql configuration STRICT mode.
In MySql variables, sql_mode was set to following
Code: Select all
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Just remove all these rules.
And give it a try, it should work.

Mine is working fine.
Thank you for all your support
By amosbatto
#815780
Oh, I didn't think about that setting in MySQL! I'm glad that you solved it.

Hi, Please tell to processmaker team for solu[…]

Hey jamesjohnston, Your first course of action is[…]

https://wiki.processmaker.com/3.2/Case_Summary#Mor[…]

instagram download for pc

Download images on Instagram, you have to take a s[…]