Transaction Support

  • 30 October 2008
  • 5 replies
  • 0 views

Badge +2

To what extent, if any, does K2 blackpearl (specifically 807) support distributed transactions?

 I am wanting to do some custom (MOSS) event handling that I would like to wrap in a System.Transactions transaction. In this block of code I am programatically connecting the the K2 server and starting a workflow instance, in addition to other non-K2 things.

 If something caused this transaction to rollback would K2 correctly rollback as well?


5 replies

Badge +9
K2 blackpearl does not support distributed transaction; the API interaction will not be enrolled in your distributed transaction and automatically rolled back.  You will need to detect the rollback in your code then clean up the K2 process instance accordingly (perhaps via the DeleteProcessInstances() method within the SourceCode.Workflow.Management API).
Badge +9

It's currently not supported.  I have already logged this as a feature request and it should come in one of the later service packs.


I guess the current workarounds are:



  1. Put your other non-K2 things into the K2 process.  Let K2 manage the state of the process.
  2. Put the K2 call at the end of your transaction.  If the K2 call fails, rollback your transaction.  This isn't really a true transaction but it will hopefully minimize errors in trying to rollback the K2 portion.
Badge +11
When do you expect it to be ready?
Badge +11

What happens to the business process if the k2 process or the k2 server crashes?


i should be responsible to reverse the changes???

Badge +8

K2 handles its own internal transactions. If the server crashes, it will rollback whatever it was executing.


Custom code that you might have written in server events (or any other modules fpr that matter) will need to cater for its own transaction handling if required.

Reply