Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
 public List<Expense> ListActiveExpenses()
 {
     try
     {
         ExpenseComponent bc = new ExpenseComponent();
         return bc.ListActiveExpenses();
     }
     catch (Exception ex)
     {
         throw new FaultException<ProcessExecutionFault>
             (new ProcessExecutionFault(), ex.Message);
     }
 }
Ejemplo n.º 5
0
        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));
            }
        }
Ejemplo n.º 6
0
 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);
     }
 }
Ejemplo n.º 7
0
        /// <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.");
        }
Ejemplo n.º 8
0
 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);
     }
 }