protected override void Execute(CodeActivityContext context) { // Obtain the runtime value of the Text input argument Expense expense = context.GetValue(this.Expense); //expense.WorkflowID = this.WorkflowInstanceId; ExpenseComponent bc = new ExpenseComponent(); context.SetValue(this.Expense, bc.Escalate(expense)); }
protected override void Execute(CodeActivityContext context) { // Obtain the runtime value of the Text input argument Expense expense = context.GetValue(this.Expense); //expense.WorkflowID = Guid.NewGuid(); ExpenseComponent bc = new ExpenseComponent(); context.SetValue(this.Expense, bc.Submit(expense)); }
public List<ExpenseReview> ListExpenseReviews(long expenseID) { try { ExpenseComponent bc = new ExpenseComponent(); return bc.ListExpenseReviews(expenseID); } catch (Exception ex) { throw new FaultException<ProcessExecutionFault> (new ProcessExecutionFault(), ex.Message); } }
public List<Expense> ListActiveExpenses() { try { ExpenseComponent bc = new ExpenseComponent(); return bc.ListActiveExpenses(); } catch (Exception ex) { throw new FaultException<ProcessExecutionFault> (new ProcessExecutionFault(), ex.Message); } }
protected override void Execute(CodeActivityContext context) { // Obtain the runtime value of the Text input argument Expense expense = context.GetValue(this.Expense); ExpenseReview review = context.GetValue(this.ExpenseReview); ExpenseComponent bc = new ExpenseComponent(); if (review.IsApproved) { context.SetValue(this.Expense, bc.Disburse(expense, review)); } else { context.SetValue(this.Expense, bc.Reject(expense, review)); } }
public List<Expense> ListExpensesForApproval(string reviewerID) { try { ExpenseComponent bc = new ExpenseComponent(); return bc.ListExpensesForApproval(reviewerID); } catch (Exception ex) { throw new FaultException<ProcessExecutionFault> (new ProcessExecutionFault(), ex.Message); } }
/// <summary> /// Resets the database for the demo. This should not exist in real world /// business components. /// </summary> public void Purge() { Console.WriteLine("Reseting demo database ..."); // Get a list of active expenses. ExpenseComponent bc = new ExpenseComponent(); try { bc.Purge(); } catch (Exception ex) { throw new FaultException<ProcessExecutionFault> (new ProcessExecutionFault(), ex.Message); } Console.WriteLine("Demo database reseted."); }
public List<Expense> ListExpensesForEmployee(string employeeID) { try { ExpenseComponent bc = new ExpenseComponent(); return bc.ListExpensesForEmployee(employeeID); } catch (Exception ex) { throw new FaultException<ProcessExecutionFault> (new ProcessExecutionFault(), ex.Message); } }