Qlik Community

QlikView Management

Discussion Board for collaboration on QlikView Management.

Not applicable

QMS API GetDocumentTask returning null

I have been using the QMS API for a while now, and have previously been able to grab tasks with GetDocumentTask fine. For some reason yesterday GetDocumentTask started returning null on a server, I am able to connect to the server and generate a QMSClient object through that server, I am also able to generate a servicekey and functions such as GetServices and GetTasks work fine. For whatever reason when trying to generate a DocumentTask object with the GetDocumentTask function using an ID from one of the tasks in the list (GetTasks) and DocumentTaskScope.All, the method returns null. I have successfully accomplished this in the exact same way before, and it suddenly quit working.

The log inside the QlikView server reports this:

20160809T123538.553-0700    Error    GetDocumentTask failed: Specified argument was out of the range of valid values.

I cannot figure out what has happened, all the qlikview services are started on the server, I also tried rebooting the server with no success. Any ideas?

Code, successfully getting task infos, but failing to getdocumenttask (returns null)

IQMS apiClient = new QMSClient();

ServiceKeyClientMessageInspector.ServiceKey = apiClient.GetTimeLimitedServiceKey();;

List<ServiceInfo> serviceList = apiClient.GetServices(ServiceTypes.All).ToList();

List<TaskInfo> taskInfoList = apiClient.GetTasks(serviceList[1].ID).ToList();

TaskInfo taskInfo = apiClient.GetTask(taskInfoList[0].ID);

DocumentTask docTask = new DocumentTask();

docTask = apiClient.GetDocumentTask(taskInfoList[0].ID, DocumentTaskScope.All);

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: QMS API GetDocumentTask returning null

Solved. Was an issue with the tasks being empty on the server.

1 Reply
Not applicable

Re: QMS API GetDocumentTask returning null

Solved. Was an issue with the tasks being empty on the server.

Community Browser