我后台用的是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