HOR-1627-A "Notices al iniciar el caso..."

This commit is contained in:
Luis Fernando Saisa Lopez
2016-08-18 16:23:25 -04:00
parent bd88d15127
commit fb930edbbe
2 changed files with 19 additions and 12 deletions

View File

@@ -1111,15 +1111,22 @@ class Cases
$criteria = new Criteria("workflow"); $criteria = new Criteria("workflow");
$criteria->add(AppSolrQueuePeer::APP_UID, $sAppUid); $criteria->add(AppSolrQueuePeer::APP_UID, $sAppUid);
AppSolrQueuePeer::doDelete($criteria); AppSolrQueuePeer::doDelete($criteria);
try {
//Before delete verify if is a child case //Before delete verify if is a child case
$oCriteria2 = new Criteria('workflow'); $oCriteria2 = new Criteria('workflow');
$oCriteria2->add(SubApplicationPeer::APP_UID, $sAppUid); $oCriteria2->add(SubApplicationPeer::APP_UID, $sAppUid);
$oCriteria2->add(SubApplicationPeer::SA_STATUS, 'ACTIVE'); $oCriteria2->add(SubApplicationPeer::SA_STATUS, 'ACTIVE');
if (SubApplicationPeer::doCount($oCriteria2) > 0) { if (SubApplicationPeer::doCount($oCriteria2) > 0) {
G::LoadClass('derivation'); G::LoadClass('derivation');
$oDerivation = new Derivation(); $oDerivation = new Derivation();
$oDerivation->verifyIsCaseChild($sAppUid); $oDerivation->verifyIsCaseChild($sAppUid);
} }
} catch(Exception $e) {
Bootstrap::registerMonolog('DeleteCases', 200, 'Error in sub-process when trying to route a child case related to the case', ['application_uid' => $sAppUid, 'error' => $e->getMessage()], SYS_SYS, 'processmaker.log');
}
//Delete the registries in the table SUB_APPLICATION //Delete the registries in the table SUB_APPLICATION
$oCriteria2 = new Criteria('workflow'); $oCriteria2 = new Criteria('workflow');
$oCriteria2->add(SubApplicationPeer::APP_UID, $sAppUid); $oCriteria2->add(SubApplicationPeer::APP_UID, $sAppUid);

View File

@@ -166,7 +166,7 @@ class NotificationDevice
$response = array(); $response = array();
$typeList = 'todo'; $typeList = 'todo';
$arrayTaskUser = array(); $arrayTaskUser = array();
switch ($nextDel["TAS_ASSIGN_TYPE"]) { switch ((array_key_exists('TAS_ASSIGN_TYPE', $nextDel))? $nextDel['TAS_ASSIGN_TYPE'] : '') {
case "SELF_SERVICE": case "SELF_SERVICE":
$arrayTaskUser = $this->getTaskUserSelfService($nextDel["TAS_UID"], $appFields); $arrayTaskUser = $this->getTaskUserSelfService($nextDel["TAS_UID"], $appFields);
$typeList = 'unassigned'; $typeList = 'unassigned';