I replace the code with a function isBpmnProcess

This commit is contained in:
Paula V. Quispe
2015-02-13 16:30:11 -04:00
parent 3ac5fdf9ba
commit 0087164f0d
3 changed files with 22 additions and 13 deletions

View File

@@ -326,6 +326,8 @@ class Process extends BaseProcess
}
$aFields['PRO_DYNAFORMS'] = @unserialize( $aFields['PRO_DYNAFORMS'] );
//Check if is BPMN process
$aFields['PRO_BPMN'] = $this->isBpmnProcess($ProUid);
return $aFields;
} else {
@@ -1009,5 +1011,16 @@ class Process extends BaseProcess
return 0;
}
}
public function isBpmnProcess($proUid){
$c = new Criteria("workflow");
$c->add(BpmnProcessPeer::PRJ_UID, $proUid);
$res = BpmnProcessPeer::doSelect($c);
if( sizeof($res) == 0 ){
return 0;
}else{
return 1;
}
}
}