public EngineProxy(DataContext ctx = null) { if (ctx == null) { this._contextIsSelfCreated = true; } else { this._context = ctx; this._engine = new InternalEngineProxy(ctx); this._contextIsSelfCreated = false; } }
public void CancelProcess(int processInstanceId) { DataContext context = this.GetContext(); try { InternalEngineProxy engineProxy = this.GetEngineProxy(context); using (TransactionScope scope = new TransactionScope()) { engineProxy.CancelProcess(processInstanceId); scope.Complete(); } } finally { this.ReleaseContext(context); } }
public void RejectApproveWorkItem(int workItemId, string approveComment, long nextActivityId) { DataContext context = this.GetContext(); try { InternalEngineProxy engineProxy = this.GetEngineProxy(context); using (TransactionScope scope = new TransactionScope()) { engineProxy.RejectApproveWorkItem(workItemId, approveComment, nextActivityId); scope.Complete(); } } finally { this.ReleaseContext(context); } }
public void CompleteWorkItemSelf(int workItemId) { DataContext context = this.GetContext(); try { InternalEngineProxy engineProxy = this.GetEngineProxy(context); using (TransactionScope scope = new TransactionScope()) { engineProxy.CompleteWorkItemSelf(workItemId); scope.Complete(); } } finally { this.ReleaseContext(context); } }
public void CompleteApproveWorkItemSelf(int workItemId, ApproveResultEnum approveResult, string approveComment, bool addUser = false, int?addUserId = new int?()) { DataContext context = this.GetContext(); try { InternalEngineProxy engineProxy = this.GetEngineProxy(context); using (TransactionScope scope = new TransactionScope()) { int?nullable = addUserId; engineProxy.CompleteApproveWorkItemSelf(workItemId, approveResult, approveComment, addUser, new int?(nullable.HasValue ? nullable.GetValueOrDefault() : -1)); scope.Complete(); } } finally { this.ReleaseContext(context); } }
public int StartProcessAsync(string processName, int startUserId, int relativeObjectId, List <IApproveUser> nextApproveUserList) { int num2; DataContext context = this.GetContext(); try { int num; InternalEngineProxy engineProxy = this.GetEngineProxy(context); using (TransactionScope scope = new TransactionScope()) { num = engineProxy.StartProcess(processName, startUserId, relativeObjectId, nextApproveUserList); scope.Complete(); } num2 = num; } finally { this.ReleaseContext(context); } return(num2); }