I have not found an API to list user-supervised cases ... can you tell me which REST API is appropriate?
There is no REST endpoint to get the cases list under Home > Review.
To display the case list under Home > Review, you can use this URL:
http://<URL>/sys<WORKSPACE>/<LANG>/<SKIN>/cases/casesListExtJs?action=to_revise&sid=<SESSION-ID>
where <SESSION-ID> was obtained with a web service login.
For example:
http://example.com/sysworkflow/en/neocl ... 67890abcde
If you want to display the case list in own interface, you can create a trigger to retrieve the case list and assign it to a case variable. Then execute the trigger with REST and then retrieve the case variable with REST.
Here would be the trigger code:
Code: Select allG::LoadClass("applications");
/*In /workflow/engine/classes/class.applications.php
Applications::getAll(
$userUid,
$start = null,
$limit = null,
$action = null,
$filter = null,
$search = null,
$process = null,
$status = null,
$type = null,
$dateFrom = null,
$dateTo = null,
$callback = null,
$dir = null,
$sort = "APP_CACHE_VIEW.APP_NUMBER",
$category = null,
$configuration = true,
$paged = true,
$newerThan = '',
$oldestThan = ''
)*/
$oApp = new Applications();
$aList = $oApp->getAll(@@USER_LOGGED, null, null, 'to_revise');
@=reviewCasesList = $aList['data'];
Similar to the previous example I gave you, create a permanent case for executing this trigger with REST and then retrieve the "reviewCasesList" variable.
Here is the structure of the array in the @=reviewCasesList variable:
Code: Select allarray(2) {
[0]=>
array(44) {
["APP_UID"]=>
string(32) "58710999959eec5c40e4650064585027"
["DEL_INDEX"]=>
string(1) "2"
["DEL_LAST_INDEX"]=>
string(1) "1"
["APP_NUMBER"]=>
string(2) "68"
["APP_STATUS"]=>
string(5) "TO_DO"
["USR_UID"]=>
string(32) "00000000000000000000000000000001"
["PREVIOUS_USR_UID"]=>
string(32) "00000000000000000000000000000001"
["TAS_UID"]=>
string(32) "68632115059eeb9d11337e8058023548"
["PRO_UID"]=>
string(32) "91274247259eeb7d86ab916042797239"
["DEL_DELEGATE_DATE"]=>
string(19) "2017-10-24 00:47:00"
["DEL_INIT_DATE"]=>
NULL
["DEL_FINISH_DATE"]=>
NULL
["DEL_TASK_DUE_DATE"]=>
string(19) "2017-10-24 17:00:00"
["DEL_RISK_DATE"]=>
string(19) "2017-10-24 15:24:00"
["DEL_THREAD_STATUS"]=>
string(4) "OPEN"
["APP_THREAD_STATUS"]=>
string(4) "OPEN"
["APP_TITLE"]=>
string(3) "#68"
["APP_PRO_TITLE"]=>
string(15) "Check web entry"
["APP_TAS_TITLE"]=>
string(6) "Task 1"
["APP_CURRENT_USER"]=>
string(19) "admin Administrator"
["APP_DEL_PREVIOUS_USER"]=>
string(19) "admin Administrator"
["DEL_PRIORITY"]=>
string(6) "NORMAL"
["DEL_DURATION"]=>
string(1) "0"
["DEL_QUEUE_DURATION"]=>
string(1) "0"
["DEL_DELAY_DURATION"]=>
string(1) "0"
["DEL_STARTED"]=>
string(1) "0"
["DEL_FINISHED"]=>
string(1) "0"
["DEL_DELAYED"]=>
string(1) "0"
["APP_CREATE_DATE"]=>
string(19) "2017-10-24 00:47:00"
["APP_FINISH_DATE"]=>
NULL
["APP_UPDATE_DATE"]=>
string(19) "2017-10-24 00:47:00"
["APP_OVERDUE_PERCENTAGE"]=>
string(1) "0"
["USR_FIRSTNAME"]=>
string(13) "Administrator"
["USR_LASTNAME"]=>
string(5) "admin"
["USR_USERNAME"]=>
string(5) "admin"
["APPDELCR_APP_TAS_TITLE"]=>
string(6) "Task 1"
["USRCR_USR_UID"]=>
string(32) "00000000000000000000000000000001"
["USRCR_USR_FIRSTNAME"]=>
string(13) "Administrator"
["USRCR_USR_LASTNAME"]=>
string(5) "admin"
["USRCR_USR_USERNAME"]=>
string(5) "admin"
["PREVIOUS_USR_FIRSTNAME"]=>
string(13) "Administrator"
["PREVIOUS_USR_LASTNAME"]=>
string(5) "admin"
["PREVIOUS_USR_USERNAME"]=>
string(5) "admin"
["APP_STATUS_LABEL"]=>
string(5) "To do"
}
[1]=>
array(44) {
["APP_UID"]=>
string(32) "70098586859eec5a747a730036274121"
["DEL_INDEX"]=>
string(1) "2"
["DEL_LAST_INDEX"]=>
string(1) "1"
["APP_NUMBER"]=>
string(2) "67"
["APP_STATUS"]=>
string(5) "TO_DO"
["USR_UID"]=>
string(32) "00000000000000000000000000000001"
["PREVIOUS_USR_UID"]=>
string(32) "00000000000000000000000000000001"
["TAS_UID"]=>
string(32) "68632115059eeb9d11337e8058023548"
["PRO_UID"]=>
string(32) "91274247259eeb7d86ab916042797239"
["DEL_DELEGATE_DATE"]=>
string(19) "2017-10-24 00:46:32"
["DEL_INIT_DATE"]=>
NULL
["DEL_FINISH_DATE"]=>
NULL
["DEL_TASK_DUE_DATE"]=>
string(19) "2017-10-24 17:00:00"
["DEL_RISK_DATE"]=>
string(19) "2017-10-24 15:24:00"
["DEL_THREAD_STATUS"]=>
string(4) "OPEN"
["APP_THREAD_STATUS"]=>
string(4) "OPEN"
["APP_TITLE"]=>
string(3) "#67"
["APP_PRO_TITLE"]=>
string(15) "Check web entry"
["APP_TAS_TITLE"]=>
string(6) "Task 1"
["APP_CURRENT_USER"]=>
string(19) "admin Administrator"
["APP_DEL_PREVIOUS_USER"]=>
string(19) "admin Administrator"
["DEL_PRIORITY"]=>
string(6) "NORMAL"
["DEL_DURATION"]=>
string(1) "0"
["DEL_QUEUE_DURATION"]=>
string(1) "0"
["DEL_DELAY_DURATION"]=>
string(1) "0"
["DEL_STARTED"]=>
string(1) "0"
["DEL_FINISHED"]=>
string(1) "0"
["DEL_DELAYED"]=>
string(1) "0"
["APP_CREATE_DATE"]=>
string(19) "2017-10-24 00:46:31"
["APP_FINISH_DATE"]=>
NULL
["APP_UPDATE_DATE"]=>
string(19) "2017-10-24 00:46:31"
["APP_OVERDUE_PERCENTAGE"]=>
string(1) "0"
["USR_FIRSTNAME"]=>
string(13) "Administrator"
["USR_LASTNAME"]=>
string(5) "admin"
["USR_USERNAME"]=>
string(5) "admin"
["APPDELCR_APP_TAS_TITLE"]=>
string(6) "Task 1"
["USRCR_USR_UID"]=>
string(32) "00000000000000000000000000000001"
["USRCR_USR_FIRSTNAME"]=>
string(13) "Administrator"
["USRCR_USR_LASTNAME"]=>
string(5) "admin"
["USRCR_USR_USERNAME"]=>
string(5) "admin"
["PREVIOUS_USR_FIRSTNAME"]=>
string(13) "Administrator"
["PREVIOUS_USR_LASTNAME"]=>
string(5) "admin"
["PREVIOUS_USR_USERNAME"]=>
string(5) "admin"
["APP_STATUS_LABEL"]=>
string(5) "To do"
}
}
Here is a sample process:
(25.55 KiB) Downloaded 292 times