Transactions in K2

  • 18 August 2005
  • 7 replies
  • 4 views

Badge
Hi -

I need to create several database records (in SQL server), and I need to start 2 different K2 processes all in one transaction.

I can easily create the database records in one transaction, but it looks like I can't do the K2 part in my transaction.

The best situation for me would be to put it all in one COM+ transaction. If any part failed, the whole thing would roll back. It looks like there hasn't been any recent discussion about transactions here. My questions are:

1. Is there any new functionality in the later service packs that support transactions? It would be great if there was!!!

2. If there isn't transactional support, how can I manually remove one of the K2 processes if the other failed? Everything needs to be deleted - the process instance, worklist items, etc.

One way or the other, I need to be able to support something failing, and removing whatever is left. I can t leave my system in a bad state. If there is a manual way to delete a transaction, then that would at least work, even if it isn't truly transaction. Is this supported?

Please advise.

Thanks!

7 replies

Badge +9
Hi Matt,

We have had a couple of discussions on this topic, please have a look at the following: http://forum.k2workflow.com/viewtopic.php?t=200&highlight=transactions

Searching for transactions also returns a number of discussions.
Badge +5
I don't suppose since this has been written there has been any new support for Transaction Handling in the K2ROM?

We have a similar situation of updating SQL Server, Oracle databases and creating/releasing/updating K2 Work items all in a transaction. We can put the DB's in a transaction but not the K2 updates. We are using the new transactional programming model in .NET 2 (system.transactions namespace) and it would be nice to put update calls to K2 in the scope of this transaction. Obviously we have work arounds to ensure the systems are all in a consistent state upon failure. Are there any plans for Transaction Handling in the K2ROM?

Thanks
Badge +11
the http://forum.k2workflow.com/viewtopic.php?t=200&highlight=transactions
 link is not working
Badge +11
any updates...please...
Badge +13
K2MNG.DeleteProcessInstances (check k2mng.hlp)

This method enable administrators to Delete unwanted ProcessInstances from the
K2.net 2003 Server, with the option to delete the associated log entries. The
log entries of the ProcessInstance is used by the K2.net 2003 Server Reports,
removing the log entries result in the removal of the ProcessInstance from the
reports section.

 Can you only create K2 processinstance IF the external transaction succeed?

Otherwise the above API allows you to delete the K2 Process afterwards.

 

Badge +11
does this apply to k2 blackpearl?
Badge +13
There should be equivalent APIs in BlackPearl to delete the process.

Reply