Merged colosa/processmaker into master

This commit is contained in:
Marco Antonio Nina Mena
2015-05-22 11:55:41 -04:00
14 changed files with 93 additions and 41 deletions

View File

@@ -42,9 +42,15 @@ if ($access != 1) {
//$oProcessMap = new ProcessMap();
$uids = explode(',', $_POST['PRO_UIDS']);
try {
foreach ($uids as $uid) {
//Add Audit Log
$oProcess = new Process();
$process=$oProcess->load($uid);
$nameProcess=$process['PRO_TITLE'];
G::auditLog("DeleteProcess", $nameProcess. ' ('.$uid.')' .' Deleted');
try {
foreach ($uids as $uid) {
//$oProcessMap->deleteProcess($uid);
ProcessMaker\Project\Workflow::removeIfExists($uid);
ProcessMaker\Project\Bpmn::removeIfExists($uid);
@@ -53,7 +59,7 @@ try {
$resp = new StdClass();
$resp->status = 0;
$resp->msg = 'All process was deleted successfully';
echo G::json_encode($resp);
} catch (Exception $e) {

View File

@@ -225,7 +225,7 @@ if ($action == "uploadFileNewProcess") {
//1 -exist process
$result->ExistGroupsInDatabase = ""; //"" -Default
//0 -Dont exist process
//1 -exist process
//1 -exist process
$optionGroupExistInDatabase = isset( $_REQUEST["optionGroupExistInDatabase"] ) ? $_REQUEST["optionGroupExistInDatabase"] : null;
//!Upload file
@@ -254,8 +254,8 @@ if ($action == "uploadFileNewProcess") {
//if file is a .pm file continues normally the importing
if ($processFileType == "pm") {
$oData = $oProcess->getProcessData( $path . $filename );
}
}
$importer->throwExceptionIfExistsReservedWordsSql($oData);
//!Upload file
@@ -303,6 +303,13 @@ if ($action == "uploadFileNewProcess") {
//!data ouput
$result->sNewProUid = $sProUid;
$result->proFileName = $Fields['PRO_FILENAME'];
//Add Audit Log
$ogetProcess = new Process();
$getprocess=$ogetProcess->load($oData->process['PRO_UID']);
$nameProcess=$getprocess['PRO_TITLE'];
G::auditLog("ImportProcess", 'PM File Imported '.$nameProcess. ' ('.$oData->process['PRO_UID'].')');
} catch (Exception $e) {
$result->response = $e->getMessage();
$result->catchMessage = $e->getMessage();

View File

@@ -150,7 +150,9 @@ $arrayAction = array(
"AssignUserTask" => G::LoadTranslation("ID_ASSIGN_USER_TASK"),
"AssignGroupTask" => G::LoadTranslation("ID_ASSIGN_GROUP_TASK"),
"DeleteUserTask" => G::LoadTranslation("ID_DELETE_USER_TASK"),
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK")
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK"),
"ImportProcess" => G::LoadTranslation("ID_IMPORT_PROCESS"),
"DeleteProcess" => G::LoadTranslation("ID_DELETE_PROCESS")
);
asort($arrayAction);