Home Tips and Tricks Workflow How can I 'advance in dialog' with asynchronous tasks?
|
|
|
|
How can I 'advance in dialog' with asynchronous tasks? |
|
|
|
|
Written by Anon.
|
|
Thursday, 19 April 2007 |
This is unfortunately not possible as the very nature of asynchronous tasks contradicts the idea of 'advance in dialog', also known as synchronous dialog chains. The two main reasons for using asynch tasks are either that the termination can happen outside of WF, or to ensure that all database updates are complete. Both of these imply that there is an action happening outside of workflow (database updates can happen outside the user session after the transaction is completed). Since these happen outside the current dialog session, one would have to 'continue' another user's session in the current dialog, which is not possible.
How it works on a more technical level...
Asynchronous tasks use terminating events which live in the instance linkage tables (tx SWEINST). You don't normally have to touch instance linkages, the WF system creates these as necessary, and deletes it when a task completes. The main difference between instance and type linkages is that instance linkages have a key and are specific to one instance (hence the name), they are only triggered for the object with the same key. Like any other event they are passed on to the event manager who triggers the receiver (the task completion in this case) via RFC (user WF-BATCH). This is why it is theoretically impossible to advance in dialog - because the task completion happens in a separate dialog under a different user, quite possibly on a different server.
Workarounds can include secondary methods (though they have their own restrictions), or redesigning your flow so that it uses a synchronous task instead e.g. by using a wait for event in a separate branch or creating a synchronous task instead.
Related Items:
|
|
Last Updated ( Thursday, 19 April 2007 )
|
|
|
|