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

Moderator: ArturoRobles

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.
User avatar
By ashkufaraz
I have a process with 20 task and getaway.

I has a function sms($number,$text) that send message to special number.

I want after routing every task automatically call this function.

How can find next user and call this function in source code with out define a trigger for every task.

I want call this function in source of process maker and one time . I do not want write trigger for every task ....

I want call this function in
Code: Select all
and with
Code: Select all
data this way is correct?
By zainab

Yes it can be done this way.

You can define your function sms($number, $text) at the end of the file:
Code: Select all
and call the function in the foreach loop defined in this file for $_POST['form']['TASKS'] (at line number 77)
The value of $_POST['form']['TASKS'] is an array of format:
Code: Select all
Array ( [TAS_UID] => 606649904586cf8b442f040016351407 [USR_UID] => 764311640586c9c763b81b7084297386 [TAS_ASSIGN_TYPE] => BALANCED [TAS_DEF_PROC_CODE] => [DEL_PRIORITY] => [TAS_PARENT] => [ROU_CONDITION] => [SOURCE_UID] => 606649904586cf8b442f040016351407 ) 
In this you get the User ID of the user assigned to the next task (i.e. the next user) as USR_UID.
If after a particular task, there is a gateway that connects to multiple tasks, you get multiple arrays.

To access the next user's Id you can use $_POST['form']['TASKS']['USR_UID'].

Hope this helps.
By Burhanmalick13
I have the same issue but I want to send the quotes to the user which I have taken from here which I can not do it now does any have the solution please geek

Sometimes the data comes from a user, like when a […]

Found the solution here:[…]

Learn what's new in ProcessMaker 3.6! We are proud[…]

Hello, I have a case that appears both as comple[…]