Expand my Community achievements bar.

getFormInstanceForTask - How to??

Avatar

Level 10

I retrieved the form instance binary data using getFormInstanceForTask web service method.

I need to know how to convert this binary data into XDP (xml format) to fetch the data from the the form.

Can someone help me on this?

Many Thanks,

Nith

4 Replies

Avatar

Level 10

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

Jasmin

Avatar

Level 10

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?

Many thanks,

Nith

Avatar

Level 10

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.

Jasmin

Avatar

Level 10

Hi Jasmin,

Do you prefer placing a sub-process after each AssignTask activity in the workflow?

Nith