I solved the issue PM-140 and PM-1547

This commit is contained in:
Paula V. Quispe
2015-02-13 14:57:00 -04:00
parent cb54201594
commit 3ac5fdf9ba
2 changed files with 18 additions and 2 deletions

View File

@@ -240,7 +240,14 @@ class Derivation
//1. There is no rule //1. There is no rule
if (count($arrayNextTask) == 0) { if (count($arrayNextTask) == 0) {
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE")); $c = new Criteria("workflow");
$c->add(BpmnProcessPeer::PRJ_UID, $_SESSION['PROCESS']);
$res = BpmnProcessPeer::doSelect($c);
if( sizeof($res) == 0 ){
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE"));
}else{
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_BPMN_RULE"));
}
} }
//Return //Return

View File

@@ -1019,7 +1019,16 @@ try {
} }
//Add content content step - End //Add content content step - End
} catch (Exception $e) { } catch (Exception $e) {
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 ); //Check if the process is BPMN
$c = new Criteria("workflow");
$c->add(BpmnProcessPeer::PRJ_UID, $_SESSION['PROCESS']);
$res = BpmnProcessPeer::doSelect($c);
if( sizeof($res) == 0 ){
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
}else{
G::SendTemporalMessage( G::LoadTranslation( 'ID_BPMN_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
}
$aMessage = array (); $aMessage = array ();
$aMessage['MESSAGE'] = $e->getMessage(); $aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();