Adding the features ui adhoc
This commit is contained in:
@@ -163,6 +163,51 @@ class Process extends Api
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @url GET /:processUid/activity/:activityUid/feature-configuration
|
||||
*/
|
||||
public function getActivityFeatures($activityUid, $processUid)
|
||||
{
|
||||
$response = array();
|
||||
|
||||
try {
|
||||
$task1 = new \Task();
|
||||
$task2 = new \ProcessMaker\BusinessModel\Task();
|
||||
|
||||
$arrayData = $task1->load($activityUid);
|
||||
|
||||
$arrayData = array(
|
||||
//"tas_uid" => $activityUid,
|
||||
"tas_title" => $arrayData["TAS_TITLE"],
|
||||
"tas_description" => $arrayData["TAS_DESCRIPTION"],
|
||||
"tas_posx" => $arrayData["TAS_POSX"],
|
||||
"tas_posy" => $arrayData["TAS_POSY"],
|
||||
"tas_start" => $arrayData["TAS_START"],
|
||||
"_extended" => array(
|
||||
"properties" => $task2->getProperties($activityUid, true),
|
||||
"steps" => array(
|
||||
"steps" => $task2->getSteps($activityUid, true),
|
||||
"conditions" => "...", //lo mismo que steps //$task->getSteps()
|
||||
"triggers" => $task2->getTriggers($activityUid, true),
|
||||
"users" => $task2->getUsers($activityUid, 1, true),
|
||||
"users_adhoc" => $task2->getUsers($activityUid, 2, true)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
//Response
|
||||
$response["success"] = true;
|
||||
$response["message"] = "Properties loaded successfully";
|
||||
$response["data"] = array("activity" => $arrayData);
|
||||
} catch (\Exception $e) {
|
||||
//Response
|
||||
$response["success"] = false;
|
||||
$response["message"] = $e->getMessage();
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @url GET /:processUid/activity/:activityUid/properties
|
||||
|
||||
@@ -59,6 +59,26 @@ class Activity extends Api
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prj_uid {@min 32} {@max 32}
|
||||
* @param string $act_uid {@min 32} {@max 32}
|
||||
* @param string $filter {@choice definition,,properties}
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
* @return array
|
||||
*
|
||||
* @url GET /:prj_uid/activity/:act_uid/feature-configuration
|
||||
*/
|
||||
public function doGetProjectActivityFeatureConfiguration($prj_uid, $act_uid, $filter = '')
|
||||
{
|
||||
try {
|
||||
return array('status' => 200, 'message' => 'success');
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prj_uid {@min 32} {@max 32}
|
||||
|
||||
Reference in New Issue
Block a user