Questions, suggestions and discussion around ProcessMaker 3 documentation
By XimenaCampania
#822986
Good morning, I have a question. I need to import users from a .csv file to a process already developed in the community version, I do not have LDAP or ActiveDirectory. I do not understand how to configure the trigger and what I should do later. If you could help me with an example. Thanks for your help.
User avatar
By ziadeh
#822988
Your CSV file should include:
1- Username
2- Password
3- First Name
4- Last Name
5- Email
6- Role

I have attached a sample CSV file, you can add all of your users there to create accounts for them.

First you have to upload the CSV file on your server, then we will create a trigger :
Code: Select all
echo "<pre>";
$file = "/opt/processmaker/createUsers.csv";  // <-- use full path to the CSV file that uploaded to your server

$users = array_map('str_getcsv', file($file));
    array_walk($users, function(&$a) use ($users) {
      $a = array_combine($users[0], $a);
    });
 array_shift($users); # remove CSV file header

$count = count($users);
$i = 0;
while($i < $count) { 
    $var = PMFCreateUser($users[$i]["username"], $users[$i]["password"],$users[$i]["firstname"],$users[$i]["lastname"],$users[$i]["email"],$users[$i]["role"]); 

if ($var == 0)
    echo 'not created';
else
   echo 'created:' . $users[$i]["username"] . '<br/>';
   $i++;
}
die("</pre>");

Attachments
(177 Bytes) Downloaded 604 times
Last edited by ziadeh on Tue Feb 19, 2019 4:33 pm, edited 1 time in total.
User avatar
By ziadeh
#822989
I have attached a process that you can use, it have :
Dynaform that display all created users from the CSV file.
Trigger with code: read of csv file and create users.

1- You have to modify the Trigger to add full path of the CSV file.
2- Assign the task to Admin user, and you will find it in New Case.
Attachments
(22.33 KiB) Downloaded 602 times
By XimenaCampania
#823004
I have managed to create the users, thanks for the shared information.
If I use the community version 3.2.1. Could you tell me how I get the web service?
In older versions this information was shown in Web Services Test.
By XimenaCampania
#823006
I am using the version community 3.x, when I entered the link mentioned with the change of information an error is displayed on the page. On the other hand, Another error is presented when wanting to make use of an external system, the error refers to the difference of soap version in which the process was created (PM 2.xx and SOAP 1.1) and the current version where I want to see the workflow (PM 3.xx and SOAP 1.2). Is there any way to change the SOAP version?


Thank you very much for the answers.
User avatar
By ziadeh
#823009
Seems you are using Processmaker 3.2.2 and above which Web Services page is not available any more, you can check your PM version from:
Admin -> Settings -> System Information

For SOAP, you can change the version through the request by adding an options array to the SoapClient with array('soap_version'=> SOAP_1_2)

Example:
Code: Select all
$client = new SoapClient('http(s)://yourdomain/sysworkflow/en/neoclassic/services/wsdl2', array('soap_version' => SOAP_1_2));
By XimenaCampania
#823041
I am creating users in processmaker but at the moment of viewing in the mysql database they do not appear, however if I authenticate with one of the newly created users I can access processmaker. On what basis and in what table can I visualize them?

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]