Learn About Microsoft .NET Framework 3.5

These questions are based on 70-504: TS: Microsoft .NET Framework 3.5 – Windows Workflow Foundation (C# .NET).

A Self Test Software Practice Test

Objective: Create and host workflows.
Sub-objective: Create state machine workflows.

Single answer, multiple-choice

You are designing a Windows Workflow Foundation (WF) application using the Microsoft .NET Framework 3.5. The WF application will use a state machine workflow that represents customer accounts. A customer account can be in one of the following states:

•    Created: Initial state for new customers.   
•    Active: Customer can use the account for new purchases.   
•    Inactive: Customers can view their purchase history but cannot make new purchases.   
•    Canceled: Customers cannot make purchases or view purchase history, and all information associated with that account is removed.

Which code should you use to create and add these state activities to the workflow?

A.    public enum CustomerAccountState {
     Created, Active, Inactive, Cancelled
}

public class CustomerAccountStateMachineWorkflow :
  StateMachineWorkflow {
     public CustomerAccountStateMachineWorkflow () {
          this.States.Add( CustomerAccountState.Created );
          this.States.Add( CustomerAccountState.Active );
          this.States.Add( CustomerAccountState.Inactive );
          this.States.Add( CustomerAccountState.Cancelled );
     }
}
B.    public class CustomerAccountStateMachineWorkflow :
  StateMachineWorkflow {
     private StateActivity created = new StateActivity();
     private StateActivity active = new StateActivity();
     private StateActivity inactive = new StateActivity();
     private StateActivity cancelled = new StateActivity();
     public CustomerAccountStateMachineWorkflow () {
          this.Activities.Add( created );
          this.Activities.Add( active );
          this.Activities.Add( inactive );
          this.Activities.Add( cancelled );
     }
}
C.    public class…


cmadmin

ABOUT THE AUTHOR

Posted in Uncategorized|

Comment:

Powered by WebDesk