Example - Retrieving Tasks with the Task Authorization Service

public void taskAuthorization() throws Exception
{
 
String taskViewId = "18";
loginEnv.getRequiredCapabilities().add("taskAuthorization");
TaskAuthorizationRequest taksAuthReq = new TaskAuthorizationRequest(loginEnv);
taksAuthReq.setTaskViewId(taskViewId);
 
 
String response = JDERestServiceProvider.jdeRestServiceCall(loginEnv, taksAuthReq, JDERestServiceProvider.POST_METHOD, JDERestServiceProvider.TASK_AUTHORIZATION);
 
 
//response can be serialized to TaskAuthorizationResponse class
TaskAuthorizationResponse taskAuthResp = loginEnv.getObjectMapper().readValue(response, TaskAuthorizationResponse.class);
System.out.println(writer.writeValueAsString(taskAuthResp));
 
    }

The TaskAuthorizationResponse object contains and array of Task type object, each with its own array of Task type objects. Although the structure supports an "infinite" number of levels, the service returns only two levels below the top task view or menu requested. You may call the service again to drill down two more levels, and so on.

This image is described in the surrounding text.

To drill down another two levels, pass values in for taskViewId, taskId, and parentTaskId (which you received from the original request). The results will include children two levels down from the taskViewId passed.

See also: