Add list of triggers of an activity in the endpoint get activities

This commit is contained in:
Freddy Daniel Rojas Valda
2014-09-23 17:18:04 -04:00
parent e5e85246b6
commit efa6ff05d2

View File

@@ -120,6 +120,13 @@ class Activity extends Api
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
$response = $task->getSteps($act_uid);
$step = new \ProcessMaker\Services\Api\Project\Activity\Step();
for ($i = 0; $i < count($response); $i++) {
$response[$i]["triggers"] = $step->doGetActivityStepTriggers($response[$i]["step_uid"], $act_uid, $prj_uid);
}
return $response;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));