コード例 #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));
        }
コード例 #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));
        }
コード例 #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);
     }
 }
コード例 #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);
     }
 }
コード例 #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));
            }
        }
コード例 #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);
     }
 }
コード例 #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.");
        }
コード例 #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);
     }
 }