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

Moderators: ArturoRobles, 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
#789004
Hi
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
processmaker-3.0.1.8-0\apps\processmaker\htdocs\workflow\engine\methods\cases\cases_Derivate.php
and with
Code: Select all
$_POST['form']['TASKS']
data this way is correct?
By zainab
#789017
Hello,

Yes it can be done this way.

You can define your function sms($number, $text) at the end of the file:
Code: Select all
processmaker-3.0.1.8-0\apps\processmaker\htdocs\workflow\engine\methods\cases\cases_Derivate.php
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
#827980
I have the same issue but I want to send the quotes to the user which I have taken from here https://techin.pk/sms/good-morning-sms/ which I can not do it now does any have the solution please geek

Hello, I'm trying to make a HTML page in which a[…]

IOS PUSH Notification

Latest Mobileios.pem already get its SSL cert expi[…]

Enabling SQL Server in Windows

Nice. https://360digitmg.com/india/ethical-hacking[…]

PM 3.5.0 supports MySQL 5.7.X configurations with […]