Issue:
Registros corruptos: Crea 2 registros de un Elemento con 2 Tareas, se debe borrar los q no se usan
Cause:
- El problema se presenta cuando se tiene la combinacion gateway-to-gateway y al hacer (por ejemplo) un movimiento
de algun elemento del proceso y posteriormente guardarlo. Esto ocasiona que se creen registros corruptos en las tablas
TASK, ROUTE y ELEMENT_TASK_RELATION
- Este problema fue ocasionado por:
> Commit: 137a4ea2237573a54964414f477e13a4f5c76a5d, Card: PMLOCAL-3840
El commit 137a4ea2237573a54964414f477e13a4f5c76a5d tambien origino los siguientes issues:
> Commit: 6bb8ad6cc05a3d8e671baa5d358b409c1f2710f6, Card: HOR-421
> Commit: 9e8030904a4c0f4f670fc159c9220fead10a5859, Card: PMLOCAL-4270
> Commit: d3296132bf13f81aee12c0f7696d5952d79ee323, Card: HOR-1383
> Commit: b58dc888c1f54d981fc329c3a35cb4294785e0f7, Card: HOR-1358
Solution:
Se revirtieron los cambios de los commits involucrados, con el siguiente detalle:
- Commit 137a4ea2237573a54964414f477e13a4f5c76a5d: Se revirtio el cambio; se soluciono el problema problema planteado en el card
- Commit 6bb8ad6cc05a3d8e671baa5d358b409c1f2710f6: Se revirtio el cambio; se soluciono el problema problema planteado en el card
- Commit 9e8030904a4c0f4f670fc159c9220fead10a5859: Se revirtio el cambio
- Commit d3296132bf13f81aee12c0f7696d5952d79ee323: Se revirtio el cambio
- Commit b58dc888c1f54d981fc329c3a35cb4294785e0f7: Se revirtio el cambio; se soluciono el problema planteado segun el analisis del commit
73 lines
2.3 KiB
PHP
Executable File
73 lines
2.3 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* processes_Delete.php
|
|
*
|
|
* ProcessMaker Open Source Edition
|
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
*/
|
|
global $RBAC;
|
|
$access = $RBAC->userCanAccess( 'PM_FACTORY' );
|
|
if ($access != 1) {
|
|
switch ($access) {
|
|
case - 1:
|
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
|
G::header( 'location: ../login/login' );
|
|
die();
|
|
break;
|
|
case - 2:
|
|
default:
|
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
|
G::header( 'location: ../login/login' );
|
|
die();
|
|
break;
|
|
}
|
|
}
|
|
//G::LoadClass( 'processMap' );
|
|
//$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');
|
|
|
|
//$oProcessMap->deleteProcess($uid);
|
|
ProcessMaker\Project\Workflow::removeIfExists($uid);
|
|
ProcessMaker\Project\Bpmn::removeIfExists($uid);
|
|
}
|
|
|
|
$resp = new StdClass();
|
|
$resp->status = 0;
|
|
$resp->msg = 'All process was deleted successfully';
|
|
|
|
echo G::json_encode($resp);
|
|
|
|
} catch (Exception $e) {
|
|
$resp = new stdClass();
|
|
$resp->status = 1;
|
|
$resp->msg = $e->getMessage();
|
|
echo G::json_encode($resp);
|
|
}
|
|
|
|
|