1 person found this helpful
getFormInstanceforTask gives you a FormInstance object.
From the FormInstance object you can use getDocument which returns a Document object.
From the Document object you can use getInputStream to get an InputStream objet.
Then you can use standard java code to convert the InputStream to a xml Document like the following link http://www.theserverside.com/discussions/thread.tss?thread_id=18743
Thanks for the reply Jasmin.
I don’t want to complicate this matter to this deeper.
My requirement is here:
1. When a Task is completed by any user of a particular workflow, the task status and the comments entered for that task must be saved in a third-party database.
2. For this, I'm using the TaskCompleted event as a start point in another process (say logger)
3. The logger process will be invoked for each task completion. Now I have the task Id in hand and need to fetch the form data for that completed task.
Is there any other easier way to do that instead of writing standard java code?
Why don't you use configure a TaskResult object on you user step. This will contain all this information.
You could create a subprocess that receives a TaskResult object and takes care of the archive.
Do you prefer placing a sub-process after each AssignTask activity in the workflow?