Ask questions about installing and configuring ProcessMaker 3
By Artonbajrami
#813293
Hi team,
I did create a process for user accounts I have a issue when a Department Head request the account and if i rejected will go back to different user not to same user who have created the case thank you team.
User avatar
By amosbatto
#813297
To be able to route the case back to the first task and assign it to the user who started the case, you need to use Value Based Assignment in the first task in your process. See this example:
http://wiki.processmaker.com/3.0/Tasks# ... Assignment

If you want to assign the next task in the process to the user who started the case, then use Value Based Assignment for the next task and the variable @@FirstUser as shown in the example.
By Artonbajrami
#813302
Thank you for respond
The task cna be started from 64 users I only want if i reject the task for more info to go to the same person who started the task
User avatar
By amosbatto
#813315
An exclusive gateway and Value Based Assignment can be used to route a case back to the first task in the process and assign that task to the user who originally created the case. The following "Complaints Process" loops back to the first task ("File complaint) if the reviewer assigned to the second task decides that the user who filed the complaint didn't provide enough information:
ComplaintProcess.png
ComplaintProcess.png (17.9 KiB) Viewed 5139 times
The first task ("File complaint") has Value Based Assignment and its variable is set to: @@firstUserId
FileComplaintAssignmentRules.png
FileComplaintAssignmentRules.png (46.38 KiB) Viewed 5139 times
This task contains a Dynaform, where the user fills out a complaint form. Before this Dynaform a trigger is set to fire which sets the value of the @@firstUserId to the ID of the user who is logged in:
Code: Select all
if (empty(@@firstUserId)) {
    @@firstUserId = @@USER_LOGGED;
}

if (empty(@@complaintDate)) {
    @@complaintDate = getCurrentDate();
    $aUser = userInfo(@@USER_LOGGED);
    @@userFilingComplaint = $aUser['firstname'].' '.$aUser['lastname'].
        ' ('.@@USR_USERNAME.' )';
}
 
The empty() function is used to both check whether the variable has been created in the case and it has a value which is not '' (an empty string), 0 (zero) or an empty array or object. If the @@firstUserId variable has not been set, then this is the first pass through the "File complaint" task in the process, so the variable needs to be set to the @@USER_LOGGED system variable.

The second if clause in the trigger checks whether the @@complaintDate has been set. If not, then it sets the date when the complaint was filed and the full name of the user who filed the complaint which is looked up using the userInfo() function.

In the second task ("Review complaint"), a manager will review the complaint. If there are multiple managers in the organization who can review complaints, then it is recommended to create Departments and use the Reports To assignment rule in the second task, so that it will be assigned to the manager of the user who filled out the complaint in the first task.

The manager assigned to the second task can select an option in the "reviewerDecision" dropdown box to accept, reject or ask for more information about the complaint. If rejected, then the case will end. If accepted, then the case will continue to the third task ("Address complaint"). If more information is selected, then the case will return back to the first task in the process. Since the first task has Value Based Assignment and the @@firstUserId is set to the ID of the user who initially created the case, that same user will be reassigned to the "File complaint" task and have the opportunity to add more information about the complaint.

The following routing rules in the exclusive gateway determine how the case will be routed depending on the option selected by the manager in the "reviewerDecision" dropdown box:
routingRulesComplaintProcess.png
routingRulesComplaintProcess.png (40.48 KiB) Viewed 5139 times
The isset() function is used to check whether @@reviewerDecision variable has been set. It is possible that the user used the Steps menu to skip the Dynaform where the @@reviewerDecision variable was set, so it is recommended to first check if the variable was set and then check if the variable was set to a particular value, as shown in the above example.

Note that == (a double equal sign) is used to check for equality, whereas = (a single equals sign) is used for variable assignment. Remember to always use == in routing rule conditions and not =, because = will assign a value to a variable and the condition will evaluate to true if the value was able to be assigned to the variable. Also note that the values of the select option in a dropdown box are strings and should be enclosed in either single or double quotation marks. For more information, see Using Conditions.

To test this process, download and import the Complaint process:
(84.12 KiB) Downloaded 430 times
(right click on link and select "Save Link As").
Attachments
ComplaintProcess.png
ComplaintProcess.png (17.9 KiB) Viewed 5139 times

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[…]