Example #1
0
function unpauseApplications()
{
    global $sFilter;
    global $sNow;
    if ($sFilter != '' && strpos($sFilter, 'unpause') === false) {
        return false;
    }
    setExecutionMessage("Unpausing applications");
    try {
        G::LoadClass('case');
        $oCases = new Cases();
        $oCases->ThrowUnpauseDaemon($sNow, 1);
        setExecutionResultMessage('DONE');
        saveLog('unpauseApplications', 'action', 'Unpausing Applications');
    } catch (Exception $oError) {
        setExecutionResultMessage('WITH ERRORS', 'error');
        eprintln("  '-" . $oError->getMessage(), 'red');
        saveLog('unpauseApplications', 'error', 'Error Unpausing Applications: ' . $oError->getMessage());
    }
}
Example #2
0
    if (is_array($confCasesList)) {
        $sTypeList = $confCasesList['sTypeList'];
    } else {
        $sTypeList = 'to_do';
    }
} else {
    $sTypeList = $_GET['l'];
    $confCasesList = array('sTypeList' => $sTypeList);
    $conf->saveObject($confCasesList, 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '');
}
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
$_SESSION['CASES_MENU_OPTION'] = $sTypeList;
$oCases = new Cases();
/** here we verify if there is a any case with a unpause on this day*/
if ($sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused') {
    $oCases->ThrowUnpauseDaemon(date('Y-m-d'));
}
/* *
 * Prepare the addtional filters before to show
 * By Erik
 */
$aAdditionalFilter = array();
if (isset($_GET['PROCESS_UID']) and $_GET['PROCESS_UID'] != "0" && $_GET['PROCESS_UID'] != "") {
    $PRO_UID = $_GET['PROCESS_UID'];
    $aAdditionalFilter['PRO_UID'] = $PRO_UID;
} else {
    $PRO_UID = "0";
}
if (isset($_GET['READ']) and $_GET['READ'] == "1") {
    $aAdditionalFilter['READ'] = $_GET['READ'];
}