Home
TeamSite
Workflow using OpenAPI
Purnima
I am using IW workflow engine via OpenAPI and trying to transition a task from a java application and immediately trying to find out what is the next task that got activated.
The task is a user task and I am calling finish() API with the required transition option. After that I want to find out the task in the workflow that got activated due to the transition.
My question is, according to the implementation of the transition API, will the transition happen immediately or
interwoven internally schedules it to be transitioned at
some later point of time. If the finish() API call returns only
after a successful transition is completed, then my code
will not have a problem. But if the API returns after
scheduling a transition for the task, then it might not be
appropriate to find out the next active task immediately.
(May be, I might need to have some polling mechanism
in my program that waits till the transition is successfully
completed and visible through the openAPI)
Please throw some light on this if someone has done this.
Find more posts tagged with
Comments
Migrateduser
I saw your post on this before, and was waiting to see if anyone else would comment first, but I'll throw down now: AFAIK, there is no designed latency in a transition action. Immediately after transitioning, you should be able to do a task query in your OpenAPI code, looking for active tasks, and the new one should be active. OTOH, I don't know internal details of the workflow engine, and nothing is _ever_ truly instantaneous, so you might want to set up a "watcher" loop--have it check the task state and re-query if it has not yet transitioned.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
Migrateduser
I am fairly certain that the OpenAPI method does not return until the transition has occurred, unless the transition involves a nested workflow. Most of the workflow engine methods are synchronous.
I would question why you are looking for the task that got activated, and how critical it is that the result be correct. This may not be the most direct way of getting the information of interest, and it is possible that additional transitions may have transpired before the query is made.
Brinko Kobrin
Interwoven Staff Engineer