- Thu Nov 24, 2016 6:10 am
#787575
Dear any Master,
i has a case was paralled to 3 person, if one person was reject the case , i want the case was delete ( another 2 person will not show the case and end the case),
i search the example:
http://wiki.processmaker.com/index.php/Trigger_Examples
Routing (Derivating) all Parallel Tasks in a Case
the @@ManagerDecision means what? means a managerdescision=??
in my case , personx_approve=0 , personx_reject=1(selection box) , the i change @@ManagerDecision = personx_reject=1
that`s example will pass the case for another 2 person , if i want to del the case , how to change the code or has another best idea ?
Please help me !!
Sony Lam
i has a case was paralled to 3 person, if one person was reject the case , i want the case was delete ( another 2 person will not show the case and end the case),
i search the example:
http://wiki.processmaker.com/index.php/Trigger_Examples
Routing (Derivating) all Parallel Tasks in a Case
Code: Select all
i dont understand the "if (isset(@@ManagerDecision))" ,//if set, then a decision was submitted by the manager
if (isset(@@ManagerDecision)) {
$caseId= @@APPLICATION;
$userLogged = @@USER_LOGGED;
$index = @%INDEX;
//Select all the other parallel tasks for the current case that are still open
$query = "SELECT DEL_INDEX, U.USR_USERNAME FROM APP_DELEGATION AD, USERS U ".
"WHERE AD.APP_UID = '$case_id' AND AD.DEL_THREAD_STATUS='OPEN' AND " .
"AD.USR_UID = U.USR_UID AND AD.DEL_INDEX <> $index";
$threads = executeQuery($query);
if (is_array($threads) and count($threads) > 0) {
foreach ($threads as $thread) {
//Login as the assigned users and route on their tasks
$sql = "SELECT USR_PASSWORD FROM USERS WHERE USR_USERNAME = '{$thread['USR_USERNAME']}'";
$task_user = executeQuery($sql,'rbac');
if (is_array($task_user) && count($task_user) > 0) {
$pass = 'md5:' . $task_user[1]['USR_PASSWORD'];
WSLogin($thread['USR_USERNAME'], $pass);
WSDerivateCase($case_id, $thread['DEL_INDEX']);
}
}
}
}
the @@ManagerDecision means what? means a managerdescision=??
in my case , personx_approve=0 , personx_reject=1(selection box) , the i change @@ManagerDecision = personx_reject=1
that`s example will pass the case for another 2 person , if i want to del the case , how to change the code or has another best idea ?
Please help me !!
Sony Lam