首页 新闻 会员 周边 捐助

WF 中自定义持久化 事物的问题

0
悬赏园豆:200 [已关闭问题]

我后台用的是oracle 所以必须得

 

代码
1 public class OraclePersistenceService : WorkflowPersistenceService, IPendingWork
2
3 {
4
5   ////
6  
7 }
8
9 public void Commit(Transaction transaction, System.Collections.ICollection items) { try { foreach (WorkItem item in items) { if (item.State == WorkItem.workflowState.ActiveInstance) { Serialize(item,item.instanceId, item.contextId, item.activity); } else { DeleteWorkflow(item.instanceId); } } } catch (Exception ex) { RaiseException(Guid.Empty, "Exception in commit", ex); } } public void Complete(bool succeeded, System.Collections.ICollection items) { } public bool MustCommit(System.Collections.ICollection items) { return true; }
10
11 public void Commit(Transaction transaction, System.Collections.ICollection items) { try { foreach (WorkItem item in items) { if (item.State == WorkItem.workflowState.ActiveInstance) { Serialize(item,item.instanceId, item.contextId, item.activity); } else { DeleteWorkflow(item.instanceId); }
12 } } catch (Exception ex) { RaiseException(Guid.Empty, "Exception in commit", ex); } } public void Complete(bool succeeded, System.Collections.ICollection items) {
13 }
14 public bool MustCommit(System.Collections.ICollection items) { return true; }
15  

 

 

 

但是 持久化的过程是异步的,我如何在有自己保存的业务数据的逻辑 保证持久化工作 与 业务过程在同一事物下运行
啤酒花的主页 啤酒花 | 初学一级 | 园豆:2
提问于:2010-06-19 17:35
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册