- Mon Apr 08, 2019 2:07 pm
#823847
Hi, I am trying to automate a script which is setup as follows (followed the forum post here)
In the above process , sign test displays a form to sign and then check if the vendor has signed(API call) and statis , it moves to "Status Completed" task. Gateway conditions :
Check Status : @@docsignstatus != "completed"
Status Completed : @@docsignstatus == "completed"
"Check Status" task has following script :
If I am running
timer is set to run every 5 minutes
Please assist where am I going wrong. This is very urgent.
In the above process , sign test displays a form to sign and then check if the vendor has signed(API call) and statis , it moves to "Status Completed" task. Gateway conditions :
Check Status : @@docsignstatus != "completed"
Status Completed : @@docsignstatus == "completed"
"Check Status" task has following script :
Code: Select all
I am fetching all tasks that is unassigned folder and sending variable "docsignstatus" as completed. When I am running thr trigger manually (by assigning to a user) , PMFDerivateCase returns 0. //set to the ID of the Self Service task in the "Return To Unassigned" process
//or use PMFGetUidFromText() to get the task ID:
$taskId = '4601691715ca78524b9f696056365990';
$anHourAgo = date('Y-m-d H:i:s', strtotime('-2 minutes'));
//Fetch cases that are unassigned
$sql = "SELECT * FROM APP_DELEGATION
WHERE TAS_UID='$taskId' AND DEL_THREAD_STATUS='OPEN' AND USR_UID = '0' ";
$aDelegations = executeQuery($sql);
if (!isset(@=aRoutedCases)) {
@=aRoutedCases = array();
}
$g = new G();
$g->sessionVarSave();
$_SESSION['USER_LOGGED'] = '4203070365c1914bf5d8230065328221';
foreach($aDelegations as $aDel) {
$aVars = array(
//'returnToUnassigned' => true,
'docsignstatus' => 'completed'
);
PMFSendVariables($aDel['APP_UID'], $aVars);
PMFDerivateCase($aDel['APP_UID'], $aDel['DEL_INDEX'],true);
}
$g->sessionVarRestore();
If I am running
Code: Select all
this returns "No existing records to continue a case, on date "2019-04-08 17:40:37 (UTC +00:00)"> php -f /var/www/processmaker/workflow/engine/bin/timereventcron.php
timer is set to run every 5 minutes
Please assist where am I going wrong. This is very urgent.