$_NF_TABLES['nfproject_timestamps'] = $_DB_table_prefix . 'nfproject_timestamps'; $_NF_TABLES['nfproject_comments'] = $_DB_table_prefix . 'nfproject_comments'; $_NF_TABLES['nfproject_taskhistory'] = $_DB_table_prefix . 'nfproject_taskhistory'; $_NF_TABLES['nfproject_approvals'] = $_DB_table_prefix . 'nfproject_approvals'; $_NF_TABLES['nfprocess'] = $_DB_table_prefix . 'nf_process'; $_NF_TABLES['nfqueue'] = $_DB_table_prefix . 'nf_queue'; $_NF_TABLES['nfprocessvariables'] = $_DB_table_prefix . 'nf_processvariables'; $_NF_TABLES['nfqueuefrom'] = $_DB_table_prefix . 'nf_queuefrom'; $_NF_TABLES['nfnotifications'] = $_DB_table_prefix . 'nf_notifications'; $_NF_TABLES['nfproductionassignments'] = $_DB_table_prefix . 'nf_productionassignments'; echo COM_siteHeader(); if (!SEC_inGroup('Root')) { echo COM_startBlock('Invalid Access'); echo "<br><blockquote>You don't have access to execute this program!</blockquote>"; } else { echo COM_StartBlock("nexFlow Initialization Script"); if ($_GET['op'] != 'initialize') { echo "<br><blockquote>This script will remove all workflow application related records and intialize all the Nexflow Process Tables but not effect your workflow defintions."; echo "<p>Do you want to proceed? <a href=\"{$_SERVER['PHP_SELF']}?op=initialize\">Yes</a> <a href=\"{$_CONF['site_url']}\">No</a></p>"; echo "</blockquote>"; } else { echo "<br><h3>Initialize Begins .... </h3>"; foreach ($_NF_TABLES as $table) { echo "<br>Removing all records in {$table} ..."; DB_query("DELETE FROM {$table}"); DB_query("ALTER TABLE {$table} AUTO_INCREMENT = 1"); } echo "<br><h3>Initialize Completed .... </h3>"; } } echo COM_endblock();
$reminderInterval = 3; // Number of days between reminder notifications $setEscalation = true; // Set to true if you want to set or reset the escalation settings $escalateAfterReminders = 0; // Set to number of reminder Notification > 0 if you want to set default escalation // Assumes the same Template Variable is available for all templates. // Need to lookup variable ID as thats used to identify the user to escalate to $escalateVariable = 'PD_Coordinator'; /* END of Setup Options */ echo COM_siteHeader(); if (!SEC_inGroup('Root')) { echo COM_startBlock('Invalid Access'); echo "<br><blockquote>You don't have access to execute this program!</blockquote>"; } else { echo COM_StartBlock("Initialization Script"); if ($_GET['op'] != 'initialize') { echo "<br><blockquote>This script will set default task notifications for all interactive tasks defined"; echo "<p>Do you want to proceed? <a href=\"{$_SERVER['PHP_SELF']}?op=initialize\">Yes</a> <a href=\"{$_CONF['site_url']}\">No</a></p>"; echo "</blockquote>"; } else { echo "<br><h3>Update Begin .... </h3>"; if ($deleteDefaultNotifications) { DB_query("DELETE FROM {$_TABLES['nf_templateassignment']} WHERE nf_prenotifyVariable = 999"); } if ($deleteDefaultReminders) { DB_query("DELETE FROM {$_TABLES['nf_templateassignment']} WHERE nf_remindernotifyVariable = 999"); } // Retrieve all interactive tasks - for all requested templates $sql = "SELECT id,nf_templateID FROM {$_TABLES['nf_templatedata']} "; $sql .= "WHERE (nf_stepType=1 OR nf_stepType=7 OR nf_stepType=8) ";