Merged in mcuiza/processmaker/PM-1585 (pull request #1463)
PM-1585 (Audit Log para todas las opciones del menu contextual del PROCESO)
This commit is contained in:
@@ -28,8 +28,15 @@ if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
|
||||
die();
|
||||
}
|
||||
|
||||
$eventInstance = new Event();
|
||||
$eventFields = $eventInstance->load($_POST['EVN_UID']);
|
||||
$proUid = $eventFields['PRO_UID'];
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($proUid);
|
||||
G::auditLog('Events','Delete event ('.$_POST['EVN_UID'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
$evnUid = $_POST['EVN_UID'];
|
||||
require_once 'classes/model/Event.php';
|
||||
$oEvent = new Event();
|
||||
$oEvent->remove( $evnUid );
|
||||
|
||||
|
||||
@@ -60,6 +60,10 @@ if ($_POST['form']['EVN_UID'] == '') {
|
||||
$oEvent->update( $_POST['form'] );
|
||||
}
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['form']['PRO_UID']);
|
||||
G::auditLog('Events','Save intermediate message ('.$_POST['form']['EVN_UID'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
function replaceQuotes ($aData)
|
||||
{
|
||||
for ($i = 0; $i < sizeof( $aData ); $i ++) {
|
||||
|
||||
@@ -36,3 +36,11 @@ if ($_POST['form']['TRI_UID'] != '') {
|
||||
|
||||
$oTrigger->update( $_POST['form'] );
|
||||
|
||||
$triggerFields = $oTrigger->load($_POST['form']['TRI_UID']);
|
||||
$proUid = $triggerFields['PRO_UID'];
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($proUid);
|
||||
|
||||
G::auditLog('Events','Save event ('.$_POST['form']['TRI_UID'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
|
||||
@@ -42,12 +42,88 @@ try {
|
||||
if (isset($_REQUEST['data'])) {
|
||||
if($_REQUEST['action']=="addText"||$_REQUEST['action']=="updateText") {
|
||||
$oData = Bootstrap::json_decode($_REQUEST['data']);
|
||||
$oDataAux = G::json_decode($_REQUEST['data']);
|
||||
$oDataAux = (array)$oDataAux;
|
||||
} else {
|
||||
$oData = Bootstrap::json_decode(stripslashes($_REQUEST['data']));
|
||||
$oDataAux = G::json_decode(stripslashes($_REQUEST['data']));
|
||||
$oDataAux = (array)$oDataAux;
|
||||
}
|
||||
//$oData = $oJSON->decode( stripslashes( $_REQUEST['data'] ) );
|
||||
$sOutput = '';
|
||||
$sTask = '';
|
||||
|
||||
if(array_key_exists('pro_uid', $oDataAux) || array_key_exists('uid', $oDataAux) || array_key_exists('PRO_UID', $oDataAux) || array_key_exists('UID', $oDataAux)) {
|
||||
if(array_key_exists('pro_uid', $oDataAux) || array_key_exists('PRO_UID', $oDataAux)) {
|
||||
if(array_key_exists('pro_uid', $oDataAux)) {
|
||||
$proUid = $oDataAux['pro_uid'];
|
||||
} else {
|
||||
$proUid = $oDataAux['PRO_UID'];
|
||||
}
|
||||
} else {
|
||||
$proUid = $oDataAux['uid'];
|
||||
$uidAux = $proUid;
|
||||
}
|
||||
|
||||
G::LoadClass('processes');
|
||||
$infoProcess = new Processes();
|
||||
|
||||
if(!$infoProcess->processExists($proUid)) {
|
||||
$oSL = new SwimlanesElements();
|
||||
if($oSL->swimlanesElementsExists($proUid)) {
|
||||
$aFields = $oSL->load($proUid);
|
||||
$proUid = $aFields['PRO_UID'];
|
||||
} else {
|
||||
$k = new Criteria('workflow');
|
||||
$k->clearSelectColumns();
|
||||
$k->addSelectColumn(TaskPeer::PRO_UID);
|
||||
$k->add(TaskPeer::TAS_UID, $uidAux );
|
||||
$rs = TaskPeer::doSelectRS($k);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
$proUid = $row['PRO_UID'];
|
||||
}
|
||||
}
|
||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||
} else {
|
||||
if(array_key_exists('PU_UID', $oDataAux)) {
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn(ProcessUserPeer::PRO_UID);
|
||||
$c->addSelectColumn(ProcessUserPeer::USR_UID);
|
||||
$c->add(ProcessUserPeer::PU_UID, $oData->PU_UID);
|
||||
$oDataset = AppDelegationPeer::doSelectRS($c);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
$userSupervisor = $row['USR_UID'];
|
||||
|
||||
G::LoadClass('processes');
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->getProcessRow($row['PRO_UID']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['pro_uid']) && !empty($_REQUEST['pro_uid']) || isset($_REQUEST['PRO_UID']) && !empty($_REQUEST['PRO_UID'])) {
|
||||
if(isset($_REQUEST['pro_uid']) && !empty($_REQUEST['pro_uid'])) {
|
||||
$proUid = $_REQUEST['pro_uid'];
|
||||
} else {
|
||||
$proUid = $_REQUEST['PRO_UID'];
|
||||
}
|
||||
G::LoadClass('processes');
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||
}
|
||||
|
||||
if($proUid != "") {
|
||||
$valuesProcess['PRO_UID'] = $proUid;
|
||||
$valuesProcess['PRO_UPDATE_DATE'] = date("Y-m-d H:m:i");
|
||||
G::LoadClass('processes');
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->updateProcessRow($valuesProcess);
|
||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||
}
|
||||
|
||||
//G::LoadClass( 'processMap' );
|
||||
@@ -85,6 +161,7 @@ try {
|
||||
break;
|
||||
case 'process_Export':
|
||||
include (PATH_METHODS . 'processes/processes_Export.php');
|
||||
G::auditLog('ExportProcess','Export Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'process_User':
|
||||
include (PATH_METHODS . 'processes/processes_User.php');
|
||||
@@ -101,9 +178,14 @@ try {
|
||||
break;
|
||||
case 'webEntry_delete':
|
||||
$form = $_REQUEST;
|
||||
unlink(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . $form['FILENAME']);
|
||||
unlink(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . str_replace(".php", "Post", $form['FILENAME']) . ".php");
|
||||
if(file_exists(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . $form['FILENAME'])) {
|
||||
unlink(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . $form['FILENAME']);
|
||||
}
|
||||
if(file_exists(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . str_replace(".php", "Post", $form['FILENAME']) . ".php")) {
|
||||
unlink(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . str_replace(".php", "Post", $form['FILENAME']) . ".php");
|
||||
}
|
||||
$oProcessMap->webEntry($_REQUEST['PRO_UID']);
|
||||
G::auditLog('WebEntry','Delete web entry ('.$form['FILENAME'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'webEntry_new':
|
||||
$oProcessMap->webEntry_new($oData->PRO_UID);
|
||||
@@ -113,6 +195,7 @@ try {
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->listProcessesUser($oData->PRO_UID);
|
||||
G::auditLog('AssignRole','Assign new supervisor ('.$oData->USR_UID.') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'removeProcessUser':
|
||||
$oProcessMap->removeProcessUser($oData->PU_UID);
|
||||
@@ -122,6 +205,8 @@ try {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
G::auditLog('RemoveUser','Remove supervisor ('.$userSupervisor.') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'supervisorDynaforms':
|
||||
$oProcessMap->supervisorDynaforms($oData->pro_uid);
|
||||
@@ -159,9 +244,11 @@ try {
|
||||
break;
|
||||
case 'addTask':
|
||||
$sOutput = $oProcessMap->addTask($oData->uid, $oData->position->x, $oData->position->y);
|
||||
G::auditLog('AddTask','Add new task in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'addSubProcess':
|
||||
$sOutput = $oProcessMap->addSubProcess($oData->uid, $oData->position->x, $oData->position->y);
|
||||
G::auditLog('AddSubProcess','Add new sub process in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'taskColor':
|
||||
$oTask->taskColor($oData->pro_uid, $oData->tas_uid);
|
||||
@@ -174,33 +261,48 @@ try {
|
||||
break;
|
||||
case 'saveTaskPosition':
|
||||
$sOutput = $oProcessMap->saveTaskPosition($oData->uid, $oData->position->x, $oData->position->y);
|
||||
$oTask = new Task();
|
||||
$oTask->load($uidAux);
|
||||
G::auditLog('SaveTaskPosition','Change task position ('.$oTask->getTasTitle().') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'deleteTask':
|
||||
$sOutput = $oProcessMap->deleteTask($oData->tas_uid);
|
||||
break;
|
||||
case 'addGuide':
|
||||
$sOutput = $oProcessMap->addGuide($oData->uid, $oData->position, $oData->direction);
|
||||
$sOutputAux = G::json_decode($sOutput);
|
||||
$sOutputAux = (array)$sOutputAux;
|
||||
G::auditLog('Add'.ucwords($oDataAux['direction']).'Line','Add '.$oDataAux['direction'].' line ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'saveGuidePosition':
|
||||
$sOutput = $oProcessMap->saveGuidePosition($oData->uid, $oData->position, $oData->direction);
|
||||
G::auditLog('SaveGuidePosition','Change '.$oData->direction.' line position in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'deleteGuide':
|
||||
$sOutput = $oProcessMap->deleteGuide($oData->uid);
|
||||
G::auditLog('DeleteLine','Delete line ('.$oData->uid.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'deleteGuides':
|
||||
$sOutput = $oProcessMap->deleteGuides($oData->pro_uid);
|
||||
G::auditLog('DeleteLines','Delete all lines in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'addText':
|
||||
$sOutput = $oProcessMap->addText($oData->uid, $oData->label, $oData->position->x, $oData->position->y);
|
||||
$sOutputAux = G::json_decode($sOutput);
|
||||
$sOutputAux = (array)$sOutputAux;
|
||||
G::auditLog('AddText','Add new text ('.$sOutputAux['uid'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'updateText':
|
||||
$sOutput = $oProcessMap->updateText($oData->uid, $oData->label);
|
||||
G::auditLog('UpdateText','Edit text ('.$oData->uid.' ) in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'saveTextPosition':
|
||||
$sOutput = $oProcessMap->saveTextPosition($oData->uid, $oData->position->x, $oData->position->y);
|
||||
G::auditLog('SaveTextPosition','Change text position ('.$oData->uid.' ) in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'deleteText':
|
||||
$sOutput = $oProcessMap->deleteText($oData->uid);
|
||||
G::auditLog('DeleteText','Delete text ('.$oData->uid.' ) in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'dynaforms':
|
||||
$oProcessMap->dynaformsList($oData->pro_uid);
|
||||
@@ -326,9 +428,11 @@ try {
|
||||
case 'exploreDirectory':
|
||||
$_SESSION["PFMDirectory"] = $oData->main_directory;
|
||||
$oProcessMap->exploreDirectory($oData->pro_uid, $oData->main_directory, $oData->directory);
|
||||
G::auditLog('ProcessFileManager','Upload template ('.$oData->main_directory.') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'deleteFile':
|
||||
$oProcessMap->deleteFile($oData->pro_uid, $oData->main_directory, $oData->directory, $oData->file);
|
||||
G::auditLog('ProcessFileManager','Delete template ('.$oData->main_directory.': '.$oData->file.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'deleteDirectory':
|
||||
$oProcessMap->deleteDirectory($oData->pro_uid, $oData->main_directory, $oData->directory, $oData->dir_to_delete);
|
||||
@@ -440,9 +544,11 @@ try {
|
||||
switch ($sDir) {
|
||||
case 'mailTemplates':
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Edit template ('.$_REQUEST['filename'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'public':
|
||||
$sDirectory = PATH_DATA_PUBLIC . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Edit public template ('.$_REQUEST['filename'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
default:
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
@@ -530,9 +636,11 @@ try {
|
||||
switch ($sDir) {
|
||||
case 'mailTemplates':
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Save template ('.$_REQUEST['filename'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'public':
|
||||
$sDirectory = PATH_DATA_PUBLIC . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Save public template ('.$_REQUEST['filename'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
default:
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
|
||||
@@ -58,3 +58,7 @@ try {
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
print G::json_encode( $result );
|
||||
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->getProcessRow($sProcessUID);
|
||||
G::auditLog('DeletePermissions','Delete Permissions ('.$_GET['OP_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
//G::LoadThirdParty( 'pear/json', 'class.json' );
|
||||
|
||||
$function = isset( $_POST['function'] ) ? $_POST['function'] : '';
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcessOld = $infoProcess->load($_POST['form']['PRO_UID']);
|
||||
switch ($function) {
|
||||
case 'lookForNameProcess':
|
||||
require_once 'classes/model/Content.php';
|
||||
@@ -92,3 +93,53 @@ switch ($function) {
|
||||
break;
|
||||
|
||||
}
|
||||
$resultProcessNew = $infoProcess->load($_POST['form']['PRO_UID']);
|
||||
$oldFields = array_diff_assoc($resultProcessOld,$resultProcessNew);
|
||||
$newFields = array_diff_assoc($resultProcessNew,$resultProcessOld);
|
||||
|
||||
if(array_key_exists('PRO_TITLE', $newFields)) {
|
||||
$fields[] = G::LoadTranslation('ID_TITLE');
|
||||
}
|
||||
if(array_key_exists('PRO_DESCRIPTION', $newFields)) {
|
||||
$fields[] = G::LoadTranslation('ID_DESCRIPTION');
|
||||
}
|
||||
if(array_key_exists('PRO_CALENDAR', $newFields)) {
|
||||
$fields[] = G::LoadTranslation('ID_CALENDAR');
|
||||
}
|
||||
if(array_key_exists('PRO_CATEGORY', $newFields)) {
|
||||
$fields[] = "Process Category";
|
||||
}
|
||||
if(array_key_exists('PRO_SUMMARY_DYNAFORM', $newFields)) {
|
||||
$fields[] = "Dynaform to show a case summary";
|
||||
}
|
||||
if(array_key_exists('PRO_DERIVATION_SCREEN_TPL', $newFields)) {
|
||||
$fields[] = "Routing Screen Template";
|
||||
}
|
||||
if(array_key_exists('PRO_DEBUG', $newFields)) {
|
||||
$fields[] = G::LoadTranslation('ID_PRO_DEBUG');
|
||||
}
|
||||
if(array_key_exists('PRO_SHOW_MESSAGE', $newFields)) {
|
||||
$fields[] = "Hide the case number and the case title in the steps";
|
||||
}
|
||||
if(array_key_exists('PRO_SUBPROCESS', $newFields)) {
|
||||
$fields[] = "This a sub process";
|
||||
}
|
||||
if(array_key_exists('PRO_TRI_DELETED', $newFields)) {
|
||||
$fields[] = "Execute a trigger when a case is deleted";
|
||||
}
|
||||
if(array_key_exists('PRO_TRI_CANCELED', $newFields)) {
|
||||
$fields[] = "Execute a trigger when a case is canceled";
|
||||
}
|
||||
if(array_key_exists('PRO_TRI_PAUSED', $newFields)) {
|
||||
$fields[] = "Execute a trigger when a case is paused";
|
||||
}
|
||||
if(array_key_exists('PRO_TRI_REASSIGNED', $newFields)) {
|
||||
$fields[] = "Execute a trigger when a case is reassigned"; G
|
||||
}
|
||||
if(array_key_exists('PRO_TRI_UNPAUSED', $newFields)) {
|
||||
$fields[] = "Execute a trigger when a case is unpaused";
|
||||
}
|
||||
if(array_key_exists('PRO_TYPE_PROCESS', $newFields)) {
|
||||
$fields[] = "Type of process (only owners can edit private processes)";
|
||||
}
|
||||
G::auditLog('EditProcess','Edit fields ('.implode(', ',$fields).') in process "'.$_POST['form']['PRO_TITLE'].'"');
|
||||
@@ -76,3 +76,8 @@ $oOP->save();
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->getObjectsPermissionsCriteria( $sValue['PRO_UID'] );
|
||||
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->getProcessRow($sValue['PRO_UID']);
|
||||
$participation = $sValue['OP_PARTICIPATE'] == 1 ? "YES" : "NO";
|
||||
G::auditLog('ProcessPermissions','Add Permission (group or user: '.end(explode( '|', $sValue['GROUP_USER'] )).', permission: '.$sValue['OP_ACTION'].', status case: '.$sValue['OP_CASE_STATUS'].', type: '.$sValue['OP_OBJ_TYPE'].', participation required: '.$participation.') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
@@ -39,6 +39,9 @@ try {
|
||||
|
||||
$sContent = '';
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($sPRO_UID);
|
||||
|
||||
if ($withWS) {
|
||||
//creating sys.info;
|
||||
$SITE_PUBLIC_PATH = '';
|
||||
@@ -74,6 +77,8 @@ try {
|
||||
$template->assign( 'wsPass', Bootstrap::hashPassword($sWS_PASS, '', true) );
|
||||
$template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN );
|
||||
|
||||
G::auditLog('WebEntry','Generate web entry with web services ('.$dynTitle.'.php) in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
if ($sWE_USR == "2") {
|
||||
$template->assign( 'USR_VAR', "\$cInfo = ws_getCaseInfo(\$caseId);\n\t \$USR_UID = \$cInfo->currentUsers->userId;" );
|
||||
} else {
|
||||
@@ -119,7 +124,6 @@ try {
|
||||
print $link;
|
||||
//print "\n<a href='$link' target='_new' > $link </a>";
|
||||
|
||||
|
||||
} else {
|
||||
$G_FORM = new Form( $sPRO_UID . '/' . $sDYNAFORM, PATH_DYNAFORM, SYS_LANG, false );
|
||||
$G_FORM->action = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/cases_StartExternal.php';
|
||||
@@ -159,6 +163,7 @@ try {
|
||||
}
|
||||
|
||||
print_r( '<textarea cols="70" rows="20">' . htmlentities( str_replace( '</body>', '</form></body>', str_replace( '</form>', '', $template->getOutputContent() ) ) ) . '</textarea>' );
|
||||
G::auditLog('WebEntry','Generate web entry with single HTML (dynaform uid: '.$sDYNAFORM.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -42,24 +42,31 @@ try {
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
|
||||
$infoProcess = new Processes();
|
||||
$resultProcess = $infoProcess->getProcessRow($_POST['PRO_UID']);
|
||||
|
||||
switch ($_POST['action']) {
|
||||
case 'availableSupervisorDynaforms':
|
||||
$oProcessMap->availableSupervisorDynaforms( $_POST['PRO_UID'] );
|
||||
break;
|
||||
case 'assignSupervisorDynaform':
|
||||
$oProcessMap->assignSupervisorStep( $_POST['PRO_UID'], 'DYNAFORM', $_POST['DYN_UID'] );
|
||||
G::auditLog('AssignSupervisorDynaform','Assign Supervisor Dynaform ('.$_POST['DYN_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'removeSupervisorDynaform':
|
||||
$oProcessMap->removeSupervisorStep( $_POST['STEP_UID'], $_POST['PRO_UID'], 'DYNAFORM', $_POST['DYN_UID'], $_POST['STEP_POSITION'] );
|
||||
G::auditLog('RemoveSupervisorDynaform','Remove Supervisor Dynaform ('.$_POST['DYN_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'availableSupervisorInputs':
|
||||
$oProcessMap->availableSupervisorInputs( $_POST['PRO_UID'] );
|
||||
break;
|
||||
case 'assignSupervisorInput':
|
||||
$oProcessMap->assignSupervisorStep( $_POST['PRO_UID'], 'INPUT_DOCUMENT', $_POST['INP_DOC_UID'] );
|
||||
G::auditLog('AssignSupervisorInput','Assign Supervisor Input ('.$_POST['INP_DOC_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'removeSupervisorInput':
|
||||
$oProcessMap->removeSupervisorStep( $_POST['STEP_UID'], $_POST['PRO_UID'], 'INPUT_DOCUMENT', $_POST['INP_DOC_UID'], $_POST['STEP_POSITION'] );
|
||||
G::auditLog('RemoveSupervisorInput','Remove Supervisor Input ('.$_POST['INP_DOC_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
}
|
||||
} catch (Exception $oException) {
|
||||
|
||||
@@ -25,6 +25,10 @@ try {
|
||||
if (isset( $_POST['form']['action'] )) {
|
||||
$_POST['action'] = $_POST['form']['action'];
|
||||
}
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||
|
||||
switch ($_POST['action']) {
|
||||
case 'availableCaseTrackerObjects':
|
||||
G::LoadClass( 'processMap' );
|
||||
@@ -37,24 +41,28 @@ try {
|
||||
$cto_UID = $oProcessMap->assignCaseTrackerObject( $_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
echo $cto_UID;
|
||||
G::auditLog('CaseTrackers','Assign Case Tracker Object ('.$cto_UID.' - '.$_POST['OBJECT_TYPE'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'removeCaseTrackerObject':
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->removeCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
G::auditLog('CaseTrackers','Remove Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'upCaseTrackerObject':
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->upCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
G::auditLog('CaseTrackers','Move Up Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'downCaseTrackerObject':
|
||||
G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->downCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||
G::auditLog('CaseTrackers','Move Down Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'editStagesMap':
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
|
||||
|
||||
@@ -48,6 +48,10 @@ try {
|
||||
$aFields = $oCaseTrackerObject->load( $value['CTO_UID'] );
|
||||
$aFields['CTO_CONDITION'] = $value['CTO_CONDITION'];
|
||||
$oCaseTrackerObject->update( $aFields );
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($value['PRO_UID']);
|
||||
G::auditLog('CaseTrackers','Save Condition Case Tracker Object ('.$value['CTO_UID'].', condition: '.$value['CTO_CONDITION'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
} catch (Exception $oException) {
|
||||
die( $oException->getMessage() );
|
||||
}
|
||||
|
||||
@@ -15,3 +15,14 @@ require_once 'classes/model/CaseTracker.php';
|
||||
$oCaseTracker = new CaseTracker();
|
||||
$oCaseTracker->update( $sValue );
|
||||
|
||||
$infoProcess = new Process();
|
||||
$resultProcess = $infoProcess->load($sValue['PRO_UID']);
|
||||
|
||||
if($sValue['CT_DERIVATION_HISTORY'] == 1) {
|
||||
$type[] = "Routing History";
|
||||
}
|
||||
if($sValue['CT_MESSAGE_HISTORY'] == 1) {
|
||||
$type[] = "Messages History";
|
||||
}
|
||||
G::auditLog('CaseTrackers','Save Case Tracker Properties ('.$sValue['CT_MAP_TYPE'].' - '.implode(', ',$type).') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user