2 using System
.ComponentModel
;
3 using System
.ComponentModel
.Design
;
4 using System
.Collections
;
6 using System
.Reflection
;
7 using System
.Workflow
.ComponentModel
.Compiler
;
8 using System
.Workflow
.ComponentModel
.Serialization
;
9 using System
.Workflow
.ComponentModel
;
10 using System
.Workflow
.ComponentModel
.Design
;
11 using System
.Workflow
.Runtime
;
12 using System
.Workflow
.Activities
;
13 using System
.Workflow
.Activities
.Rules
;
15 namespace Microsoft
.Samples
.ClassRegistration
17 partial class RegistrationWorkflow
19 #region Designer generated code
22 /// Required method for Designer support - do not modify
23 /// the contents of this method with the code editor.
25 [System
.Diagnostics
.DebuggerNonUserCode
]
26 private void InitializeComponent()
28 this.CanModifyActivities
= true;
29 System
.Workflow
.Activities
.Rules
.RuleConditionReference ruleconditionreference1
= new System
.Workflow
.Activities
.Rules
.RuleConditionReference();
30 System
.Workflow
.Activities
.Rules
.RuleConditionReference ruleconditionreference2
= new System
.Workflow
.Activities
.Rules
.RuleConditionReference();
31 this.updateRegistrationStatusRejected
= new System
.Workflow
.Activities
.CodeActivity();
32 this.RejectedEvent
= new System
.Workflow
.Activities
.HandleExternalEventActivity();
33 this.updateRegistrationStatusApproved
= new System
.Workflow
.Activities
.CodeActivity();
34 this.ApprovedEvent
= new System
.Workflow
.Activities
.HandleExternalEventActivity();
35 this.registrarRejected
= new System
.Workflow
.Activities
.EventDrivenActivity();
36 this.registrarApproved
= new System
.Workflow
.Activities
.EventDrivenActivity();
37 this.listenForRegistrarApproval
= new System
.Workflow
.Activities
.ListenActivity();
38 this.updateRegistrationStatusWaitingForApproval
= new System
.Workflow
.Activities
.CodeActivity();
39 this.updateRegistrationStatusWaitlisted
= new System
.Workflow
.Activities
.CodeActivity();
40 this.notifyStudentClassFull
= new System
.Workflow
.Activities
.CodeActivity();
41 this.classNotFull
= new System
.Workflow
.Activities
.IfElseBranchActivity();
42 this.classFull
= new System
.Workflow
.Activities
.IfElseBranchActivity();
43 this.notifyStudentOfSessionStatus
= new System
.Workflow
.Activities
.CodeActivity();
44 this.addRegistrationToDatabase
= new System
.Workflow
.Activities
.CodeActivity();
45 this.ifClassFull
= new System
.Workflow
.Activities
.IfElseActivity();
46 this.notifyStudentAlreadyRegistered
= new System
.Workflow
.Activities
.CodeActivity();
47 this.studentNotRegistered
= new System
.Workflow
.Activities
.IfElseBranchActivity();
48 this.studentRegistered
= new System
.Workflow
.Activities
.IfElseBranchActivity();
49 this.ifStudentAlreadyRegistered
= new System
.Workflow
.Activities
.IfElseActivity();
50 this.validateRegistration
= new System
.Workflow
.Activities
.CodeActivity();
52 // updateRegistrationStatusRejected
54 this.updateRegistrationStatusRejected
.Name
= "updateRegistrationStatusRejected";
55 this.updateRegistrationStatusRejected
.ExecuteCode
+= new System
.EventHandler(this.updateRegistrationStatusRejected_ExecuteCode
);
59 this.RejectedEvent
.EventName
= "Rejected";
60 this.RejectedEvent
.InterfaceType
= typeof(Microsoft
.Samples
.ClassRegistration
.IRegistrarService
);
61 this.RejectedEvent
.Name
= "RejectedEvent";
63 // updateRegistrationStatusApproved
65 this.updateRegistrationStatusApproved
.Name
= "updateRegistrationStatusApproved";
66 this.updateRegistrationStatusApproved
.ExecuteCode
+= new System
.EventHandler(this.updateRegistrationStatusApproved_ExecuteCode
);
70 this.ApprovedEvent
.EventName
= "Approved";
71 this.ApprovedEvent
.InterfaceType
= typeof(Microsoft
.Samples
.ClassRegistration
.IRegistrarService
);
72 this.ApprovedEvent
.Name
= "ApprovedEvent";
76 this.registrarRejected
.Activities
.Add(this.RejectedEvent
);
77 this.registrarRejected
.Activities
.Add(this.updateRegistrationStatusRejected
);
78 this.registrarRejected
.Name
= "registrarRejected";
82 this.registrarApproved
.Activities
.Add(this.ApprovedEvent
);
83 this.registrarApproved
.Activities
.Add(this.updateRegistrationStatusApproved
);
84 this.registrarApproved
.Name
= "registrarApproved";
86 // listenForRegistrarApproval
88 this.listenForRegistrarApproval
.Activities
.Add(this.registrarApproved
);
89 this.listenForRegistrarApproval
.Activities
.Add(this.registrarRejected
);
90 this.listenForRegistrarApproval
.Name
= "listenForRegistrarApproval";
92 // updateRegistrationStatusWaitingForApproval
94 this.updateRegistrationStatusWaitingForApproval
.Name
= "updateRegistrationStatusWaitingForApproval";
95 this.updateRegistrationStatusWaitingForApproval
.ExecuteCode
+= new System
.EventHandler(this.updateRegistrationStatusWaitingForApproval_ExecuteCode
);
97 // updateRegistrationStatusWaitlisted
99 this.updateRegistrationStatusWaitlisted
.Name
= "updateRegistrationStatusWaitlisted";
100 this.updateRegistrationStatusWaitlisted
.ExecuteCode
+= new System
.EventHandler(this.updateRegistrationStatusWaitlisted_ExecuteCode
);
102 // notifyStudentClassFull
104 this.notifyStudentClassFull
.Name
= "notifyStudentClassFull";
105 this.notifyStudentClassFull
.ExecuteCode
+= new System
.EventHandler(this.notifyStudentClassFull_ExecuteCode
);
109 this.classNotFull
.Activities
.Add(this.updateRegistrationStatusWaitingForApproval
);
110 this.classNotFull
.Activities
.Add(this.listenForRegistrarApproval
);
111 this.classNotFull
.Name
= "classNotFull";
115 this.classFull
.Activities
.Add(this.notifyStudentClassFull
);
116 this.classFull
.Activities
.Add(this.updateRegistrationStatusWaitlisted
);
117 ruleconditionreference1
.ConditionName
= "IsClassFullCondition";
118 this.classFull
.Condition
= ruleconditionreference1
;
119 this.classFull
.Name
= "classFull";
121 // notifyStudentOfSessionStatus
123 this.notifyStudentOfSessionStatus
.Name
= "notifyStudentOfSessionStatus";
124 this.notifyStudentOfSessionStatus
.ExecuteCode
+= new System
.EventHandler(this.notifyStudentOfSessionStatus_ExecuteCode
);
126 // addRegistrationToDatabase
128 this.addRegistrationToDatabase
.Name
= "addRegistrationToDatabase";
129 this.addRegistrationToDatabase
.ExecuteCode
+= new System
.EventHandler(this.addRegistrationToDatabase_ExecuteCode
);
133 this.ifClassFull
.Activities
.Add(this.classFull
);
134 this.ifClassFull
.Activities
.Add(this.classNotFull
);
135 this.ifClassFull
.Name
= "ifClassFull";
137 // notifyStudentAlreadyRegistered
139 this.notifyStudentAlreadyRegistered
.Name
= "notifyStudentAlreadyRegistered";
140 this.notifyStudentAlreadyRegistered
.ExecuteCode
+= new System
.EventHandler(this.notifyStudentAlreadyRegistered_ExecuteCode
);
142 // studentNotRegistered
144 this.studentNotRegistered
.Activities
.Add(this.ifClassFull
);
145 this.studentNotRegistered
.Activities
.Add(this.addRegistrationToDatabase
);
146 this.studentNotRegistered
.Activities
.Add(this.notifyStudentOfSessionStatus
);
147 this.studentNotRegistered
.Name
= "studentNotRegistered";
151 this.studentRegistered
.Activities
.Add(this.notifyStudentAlreadyRegistered
);
152 ruleconditionreference2
.ConditionName
= "IsSessionRegistered";
153 this.studentRegistered
.Condition
= ruleconditionreference2
;
154 this.studentRegistered
.Name
= "studentRegistered";
156 // ifStudentAlreadyRegistered
158 this.ifStudentAlreadyRegistered
.Activities
.Add(this.studentRegistered
);
159 this.ifStudentAlreadyRegistered
.Activities
.Add(this.studentNotRegistered
);
160 this.ifStudentAlreadyRegistered
.Name
= "ifStudentAlreadyRegistered";
162 // validateRegistration
164 this.validateRegistration
.Name
= "validateRegistration";
165 this.validateRegistration
.ExecuteCode
+= new System
.EventHandler(this.validateRegistration_ExecuteCode
);
167 // RegistrationWorkflow
169 this.Activities
.Add(this.validateRegistration
);
170 this.Activities
.Add(this.ifStudentAlreadyRegistered
);
171 this.Name
= "RegistrationWorkflow";
172 this.CanModifyActivities
= false;
178 private CodeActivity updateRegistrationStatusWaitingForApproval
;
179 private CodeActivity notifyStudentOfSessionStatus
;
180 private CodeActivity updateRegistrationStatusRejected
;
181 private EventDrivenActivity registrarRejected
;
182 private EventDrivenActivity registrarApproved
;
183 private ListenActivity listenForRegistrarApproval
;
184 private HandleExternalEventActivity ApprovedEvent
;
185 private HandleExternalEventActivity RejectedEvent
;
186 private IfElseBranchActivity studentNotRegistered
;
187 private IfElseBranchActivity studentRegistered
;
188 private IfElseActivity ifStudentAlreadyRegistered
;
189 private CodeActivity notifyStudentAlreadyRegistered
;
190 private CodeActivity notifyStudentClassFull
;
191 private CodeActivity addRegistrationToDatabase
;
192 private IfElseBranchActivity classNotFull
;
193 private IfElseBranchActivity classFull
;
194 private IfElseActivity ifClassFull
;
195 private CodeActivity updateRegistrationStatusWaitlisted
;
196 private CodeActivity updateRegistrationStatusApproved
;
197 private CodeActivity validateRegistration
;