adding pm workflow process creation while a bpmn project is created

This commit is contained in:
Erik Amaru Ortiz
2013-12-09 10:42:01 -04:00
parent a88a06f552
commit dbed38c0a7
2 changed files with 15 additions and 13 deletions

View File

@@ -30,8 +30,14 @@ class Project extends Api
{
try {
$bpmnModel = new BpmnModel();
$uids = $bpmnModel->createProject($request_data);
$wfProcess = \ProcessMaker\Adapter\Workflow::loadFromBpmnProject($request_data);
$process = new \BusinessModel\Process();
$userUid = $this->getUserId();
$data = array('process' => $wfProcess);
$process->createProcess($userUid, $data);
return $bpmnModel->createProject($request_data);
return $uids;
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}