Hi,
I am trying to get the status of a task that has been submitted to the VCD. From the java SDK 5.1 documentation I see this for the Task class:
java.lang.Integer getProgress()
- Returns the progress of the task.
But I am at a loss to understand what the integer value returned means? i.e. how do I interpret the integer value as what task status? I don't see any explanation for that in the documentation. Beats me.
I am rather looking for a way to find out the task status so that I get a return type of "TaskStatusType" (which has values
[QUEUED, PRERUNNING, SUCCESS, RUNNING, ERROR, CANCELED, ABORTED]). But I don't think I see any method in the Task class that would provide me the status in TaskStatusType for the task.
How could I do this?
Thanks,
Raj
Never mind. I figured it out.
TaskType taskType = task.getResource();
String taskStatus = taskType.getStatus()
does what I need.
Never mind. I figured it out.
TaskType taskType = task.getResource();
String taskStatus = taskType.getStatus()
does what I need.
Progress indicates progress of the task (in percentage). You need status to check the status of the task.
HTH