Skip to main content
In my asp.Net web page, i have a function to update data in sql server DB, then follow by using K2ROM to create K2 process instance, and finally redirect to a new aspx page. When K2 process been triggered, it take some time to complete. The issue is system had redirected to new aspx page, while K2 process still processing. I wonder is there a recommended way to handle this transaction? Currenly, there is a problem happen once a while, where after the system been redirected to new page and reading the new page function, the parent page happen to reload again (after K2 process completed) and trying to execute some function which throw exception with error message Object reference not set.. (this error function is trying to read data from sql server DB)

Does anyone having this similiar problem? Any solution? 😞
you can choose to start a k2 process asyncronously, in which case the client page willl wait for the k2 server to send back a response before continuing.
the code you would use to start the process asyncronously is
oK2Connection.StartProcessInstance(oNewProsessInstance, True)
Thanks for your reply. So after i put in the code, do i need to write a set of code to read the K2 result? Or this 1 line of code is good enough "oK2Connection.StartProcessInstance(oNewProsessInstance, True)"?

Reply