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

Moderator: amosbatto

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.
By amosbatto
#815155
You can use PMFAddUserGroupToTask() want to add users to the assignment list for a task:
Code: Select all
$taskId = '1234567890abcdef1234567890abcdef'; //set to the ID of the task
$sql = "SELECT USR_UID FROM USERS";
$aUsers = executeQuery($sql);
for ($aUsers as $aUser) {
   PMFAddUserGroupToTask($taskId,  $aUser['USR_UID']);
}
If you need to assign all users to a task in a case, then use a parallel marker in the task.
By amosbatto
#815180
The recommended way to do this is create a group which contains all your users and then assign that group to the task. However, if you really want to do this, then set the trigger to fire before the case is created in the process properties.

By the way, your question is not clear. Are you talking about adding users to the assignment list of a task or are you talking about assigning users to a task in a particular case where the task has a parallel marker?
By PipSqueak
#815185
I want all users to be able to start a process/case. For example, all users can request leave, so all of them should be assigned to it. But I wouldn't like to be adding the new users into that group every time, so is there anyway to do this dynamically? With a cron job perhaps?
By amosbatto
#815210
You could create a script which is executed as a cron job, but it is easier to create a process which periodically executes a script task which adds the users to a group. Then assign that group to the task.
See:
https://sourceforge.net/p/pmcommunity/c ... rsToGroup/
By amosbatto
#815259
Kind of hard, unless you are willing to ship it to La Paz, Bolivia. :-)
Send for clarification

Cost: Will you be using PM entrerprise or open sou[…]

SMS Gateway

Hello natesh, I have a Get ready to use integrate[…]

delete information after CSV export

thanks for your attention, i have some change on y[…]

Thanx again amosbatto... I'll re-check file permis[…]