Hi,
I am trying to get the task progress status using SDK Api but i get runtime errors always. Pls help me with the below code.
int progress = 0; try{ ConverterTaskInfo taskInfo = null; do { System.out.println("--- getProgressStatus ---"); taskInfo = _converterService.converterGetTaskInfo(_converterServerContent.getTaskManager(), conversionJobInfo.getJob()); System.out.println("Getting task details...."); Thread.sleep(1000); if(taskInfo == null) { System.out.println("ERROR: Failed to get task Job info."); return progress; } ConverterTaskInfoState state = taskInfo.getState(); progress = taskInfo.getProgress(); System.out.println("progress is" + progress); } while (taskInfo.getState() != ConverterTaskInfoState.error && taskInfo.getState() != ConverterTaskInfoState.success); } catch(Exception e) { }
Correct me if i am doing something wrong here. If you have any sample in java it would be helpful.
Thanks in advance