Skip to main content
Listed below are the associated behaviour of Synchronous and Asynchronous settings in IPC and K2.net Server events.

K2.net Server Event
K2.Synchronous = True
Server Event is completed upon execution of all code.

K2.Synchronous = False
Server Event is NOT completed upon execution of all code. To complete the event, an explict statement has to call the "Finish" method on the ServerEvent item. See Sample code to build an Asynchronous Server Event

IPC Server Event
Synchronous
Calling process will wait for called process to complete before completing IPC Server Event

Asynchronous
Calling process will NOT wait for called process to complete. The IPC Server Event is completed immediately.
You can also specify to start a process instance synchronously or asynchronously:

Typically, you would start a process instance synchronously if you're using K2 as a website navigation tool, since you have to wait for the process instance to be created before redirecting the user to the subsequent worklist item. You would also use this method if you need to get some process information back from the K2 server after starting the process (e.g. process id).

Starting a K2 process asyncronously will result in better performance from the user's perspective, since they do not need to wait for process instance data to be returned by the K2 server.

Note that you can also finish a client event syncronously or asyncronously, and the same reasons apply in this case.

Have at look at Renier's following post for a comprehensive description and code samples:
http://forum.k2workflow.com/viewtopic.php?t=808

Reply