PM-3659 "Uso de interface lenta (assignment rules) cuando..." SOLVED
Issue:
Uso de interface lenta (assignment rules) cuando se tienen varios usuarios (40000)
Cause:
No se realizo de manera correcta el paginado de registros
Solution:
> Se a implementado los siguientes end-points:
GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/paged
GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/available-assignee/paged
GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-assignee/paged
GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
Estos end-points aceptan los siguientes parametros:
/paged?filter={filter}&start={start}&limit={limit}&type={type}
/paged?lfilter={lfilter}&start={start}&limit={limit}&type={type}
/paged?rfilter={rfilter}&start={start}&limit={limit}&type={type}
Donde:
filter: Representa la busqueda de registros que contienen este valor
lfilter: Representa la busqueda de registros que empiezan con este valor
rfilter: Representa la busqueda de registros que terminan con este valor
type: Acepta los siguentes valores: "user", "group"
Ejemplo:
GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/paged?start=0&limit=3
<<<<< 200
{
"total": 15,
"start": 0,
"limit": 3,
"filter": "",
"data": [
{
"aas_uid": "60593768854492f8fa43aa2064326562",
"aas_name": "GROUP1 (2 Users)",
"aas_lastname": "",
"aas_username": "",
"aas_type": "group"
},
{
"aas_uid": "11886228656016c9329c898096916123",
"aas_name": "GROUP2 (1 User)",
"aas_lastname": "",
"aas_username": "",
"aas_type": "group"
},
{
"aas_uid": "52242914255f202805bd552031573543",
"aas_name": "user1",
"aas_lastname": "user1",
"aas_username": "user1",
"aas_type": "user"
}
]
}
> Se a mejorado los siguientes end-points:
GET /api/1.0/{workspace}/users?filter={filter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/users?lfilter={lfilter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/users?rfilter={rfilter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/groups?filter={filter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/groups?lfilter={lfilter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/groups?rfilter={rfilter}&start={start}&limit={limit}
This commit is contained in:
@@ -169,10 +169,10 @@ class Process
|
||||
public function throwExceptionIfDataNotMetFieldDefinition($arrayData, $arrayFieldDefinition, $arrayFieldNameForException, $flagValidateRequired = true)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
\G::LoadSystem('inputfilter');
|
||||
$filter = new \InputFilter();
|
||||
|
||||
|
||||
if ($flagValidateRequired) {
|
||||
foreach ($arrayFieldDefinition as $key => $value) {
|
||||
$fieldName = $key;
|
||||
@@ -191,7 +191,7 @@ class Process
|
||||
foreach ($arrayData as $key => $value) {
|
||||
$fieldName = $key;
|
||||
$fieldValue = $value;
|
||||
|
||||
|
||||
|
||||
if (isset($arrayFieldDefinition[$fieldName])) {
|
||||
$fieldNameAux = (isset($arrayFieldNameForException[$arrayFieldDefinition[$fieldName]["fieldNameAux"]]))? $arrayFieldNameForException[$arrayFieldDefinition[$fieldName]["fieldNameAux"]] : "";
|
||||
@@ -435,38 +435,6 @@ class Process
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if doesn't exists the Task in table TASK
|
||||
*
|
||||
* @param string $processUid Unique id of Process
|
||||
* @param string $taskUid Unique id of Task
|
||||
* @param string $fieldNameForException Field name for the exception
|
||||
*
|
||||
* return void Throw exception if doesn't exists the Task in table TASK
|
||||
*/
|
||||
public function throwExceptionIfNotExistsTask($processUid, $taskUid, $fieldNameForException)
|
||||
{
|
||||
try {
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\TaskPeer::TAS_UID);
|
||||
|
||||
if ($processUid != "") {
|
||||
$criteria->add(\TaskPeer::PRO_UID, $processUid, \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$criteria->add(\TaskPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = \TaskPeer::doSelectRS($criteria);
|
||||
|
||||
if (!$rsCriteria->next()) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_ACTIVITY_DOES_NOT_EXIST", array($fieldNameForException, $taskUid)));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if doesn't exists the Template in Routing Screen Template
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user