function nf_alertUserMessage($taskrec, &$template, $rowid, $userid)
{
    $processid = $taskrec['processid'];
    $nfclass = new nexflow($processid);
    $nfclass->set_currentTaskid($taskrec['id']);
    $alertMsg = $nfclass->get_taskOptionalParm();
    // Define the template to use for this inline task
    $template->set_file("action{$rowid}", 'application/alertuser.thtml');
    // Define the Post-Form Handler function to use when task completes
    $template->set_var('function_handler', 'nf_alertUserMessage_posthandler');
    $template->set_var('rowid', $rowid);
    $template->set_var('message', $alertMsg);
    $template->parse('action_record', "action{$rowid}");
}
function nf_testsuite_setvar1_posthandler($processid, $taskid, $userid, $projectid)
{
    if ($processid > 0 and $taskid > 0) {
        $nfclass = new nexflow($processid, $userid);
        $nfclass->set_currentTaskid($taskid);
        $msg = $nfclass->get_taskOptionalParm();
        $var1 = COM_applyFilter($_POST['var1'], true);
        $nfclass->set_processVariable('VAR1', $var1);
        $nfclass->complete_task($taskid);
        nf_changeLog("You set VAR1 to {$var1}.  Verify the following messages line up!");
    }
}
Exemplo n.º 3
0
function nf_sleep($taskid, $processid)
{
    $nfclass = new nexflow($processid);
    $nfclass->set_currentTaskid($taskid);
    $wakeup_time = $nfclass->get_processVariable($nfclass->get_taskOptionalParm());
    $current_time = time();
    if ($current_time > $wakeup_time) {
        return true;
    } else {
        return false;
    }
}