Could be a number of things. Is this a custom task? If your script runs that callback twice you will get the error.
task.chooseTransition(task.getTransitions()[0],"XML Generated from HTML successfully");can there be any other possibilities ?
If this custom task is a CGI WebTask, you might be transitioning once here in Java, and then again by directing the user to /iw-cc/transitiontask using the current task ID. When you execute the transition in Java, you want to use /iw-cc/transitiontask with the ID of the task returned by the chooseTransition() call.
It is a urlexternaltask i just referenced the a java class that would convert HTML to xml.
I can't imagine how could it be calling the transition twice unless if it is called with in that job by someother active task.Can you comment out your transition statment and see whether the job get stuck or continues to next task? just make sure you have a task after 'Generate XML' task which is not a end task.
Interesting .. I have commented out the choose transition line from my java file referred in this particular task but still workflow is not getting struck . and i do not see the error anymore .. I still don't understand how my task successfully go to the next task
That's not understandable when it is implemented through CSURLExternalTask, now it becomes tricky when there is need of deciding among more than one transition hope that's not the case for you here..