// We will use this to determine if the credit check
// has passed or failed.
public bool CreditOK { get; set; }
...
}
Now place a Code activity onto your WF designer named ValidateCreditActivity and set the
ExecuteCode value to a new method named ValidateCredit. Obviously, a production-level credit
check could involve a good number of subactivities, database lookups, and so forth. Here, we will
generate a random number to represent the chance the caller passes our credit test:
private void ValidateCredit(object sender, EventArgs e)
{
Do'stlaringiz bilan baham: |