Hi,
I'm currently trying to retrieve the status from a task by using oData service "tasks.svc".
But I don't know how I can access that information.
In Postman the result of GET request http://<host>:<port>/bpmodata/tasks.svc/TaskCollection(<taskID>)looks like that:
I tried the following in SAPUI5:
var taskDataSvcURL = "/bpmodata/taskdata.svc/" + taskId; var oDataModel = new sap.ui.model.odata.ODataModel( taskDataSvcURL, true, false); // Both ways to retrieve "Status" don't work... var status = tasksODataModel.read("/TaskCollection('" + taskId + "')?$select=Status", null); status = tasksODataModel.getProperty("Status"); if (status === "COMPLETED" || status === "RESERVED") { alert(status); }
Could you please tell me how I can access the attribute 'Status'?
Thanks in advance!
Best regards,
Thorsten.