Merged in paulis/processmaker/PM-140 (pull request #1452)
I used a function isBpmnProcess
This commit is contained in:
@@ -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,21 @@ class Process extends BaseProcess
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Check is the Process is BPMN.
|
||||
*
|
||||
* @param string $ProUid the uid of the Prolication
|
||||
* @return int 1 if is BPMN process or 0 if a Normal process
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user