Title: Microsoft Windows Workflow Foundation???? ~3.0??3.5???~
1MicrosoftWindows Workflow Foundation????3.0??3.
5???
- ?????? ?????21
- 2008/06/21
- mxb
2Microsoft Windows Workflow Foundation(WF)??
- .NET Framework 3.0???????Windows
?????????????????????????????????? - WF????????????????????????????????API?????????
- WF?Microsoft?????????????????.NET
Framework??????????(??CLR?????)???? - ?????.NET??????????
- .NET??????????????????????????????????????????????
????
3WF???????????2?
- ??????
- ?????? ??????????????????????????
?????????????????????? - ?????????????????XAML (eXtensible Application
Markup Language) ??????????? - ????????????????????????????????????????
4WF???????????2?
- ???????
- ??????? ??????????????????????????????????????????
- ??????????????????????????????????????????????????
??????????WF?????????.NET?????????????????????????
???CLR???????? - ?????????C????Visual Basic??????CLR??????????????
???????
5WF????????
- WF????????????????????????????????????????????????
???
Service.cs
Workflow.cs or Workflow.xoml
Workflow Runtime
Service Instance
WorkflowOperationInvoker
App.config
Workflow ServiceHost
ServiceHost
DurableInstanceProvider
MessageContextInspector
ContextChannel
ListenerChannel
WF Persistence DB
??Microsoft? MSDN?????
6WF???
??????????????2??
7?????????????
- ?????????????????????????????????????????????????
?????????????????????????????????????????? - ?????????????????????????????????????????????????
????????????????????????????????????????
8?????????????????
1
A????
??
2
B????
?? ???
?? ???
?? ??
?? ??
????
3
4
9????????????????????????
??? ??
CallExternalMethodActivity ???? ?????????????????????????????????????????????????????????? ???????????????????????????????????
CodeActivity ??????????????????????????
CompensatableSequenceActivity SequenceActivity ??????????????????????????????????????
CompensatableTransactionScopeActivity TransactionScopeActivity ??????????????????????????????????????
ConditionedActivityGroup ?????????????????????????????????????
DelayActivity ???????????????????????????????????????????????????
EventDrivenActivity ????????????????? Activity ??????????????????????????????????????? CompositeActivity ???????????????????????????????????????????????????????EventDrivenActivity ??SequenceActivity ????????????????????????? IEventActivity ??????????????????????????????
EventHandlingScopeActivity ??????????????????????????????????????????
FaultHandlerActivity FaultType ????????????? Exception ???????????? ???????????????????????
??Microsoft? MSDN?????
10????????????????????????
??? ??
HandleExternalEventActivity ???? ???????????????????????????????????????????????
IfElseActivity ???????IfElseBranchActivity ?? 2 ??????????????? 1 ??????????????????????????????
InvokeWebServiceActivity ???? ??????? Web ??????????????????????????????????????????????????????
InvokeWorkflowActivity ????????????????????????????????
ListenActivity ???????????????????????????????????????????????????????????????????
ParallelActivity ???????????????????????????????????
PolicyActivity 1 ????????????????????????????????????? Rule ???????????????????????
ReplicatorActivity ?????????????????????????
SequenceActivity 1 ????????????????????????????
SynchronizationScopeActivity ??????????????????????????????????????SynchronizationScopeActivity ??????????????????????????????????????????????????????????????????????????????
??Microsoft? MSDN?????
11????????????????????????
??? ??
TerminateActivity ?????????????????????? ???????????????????????????
ThrowActivity ?????????????????????????????????
TransactionScopeActivity ???????????????????????????????? Activity ??????????? Transaction ??????Activity ????????????????????????????????????????
WebServiceFaultActivity ???????? Web ???? ????????????????????????????????????
WebServiceInputActivity ??????? Web ?????????????????????????????????????
WebServiceOutputActivity ?????????? Web ???????????????????????????????????
WhileActivity ?????? true ??????1 ?????????????????????
??Microsoft? MSDN?????
12?????????????
- ?????????????????????????????????????
- 1???????????????????????????????????????????(?????
??????????????????) - ??????????????????????????????????????????????
13?????????????????
Create
Start
Execute Activities
Complete
Receive Message
Idle
??Microsoft? MSDN?????
14????????????????????
Start
Execute Activities
Receive Message
UnLoad???????????????????????????????????
??Microsoft? MSDN?????
15?????????????????????????
??? ??
CallExternalMethodActivity ???? ?????????????????????????????????????????????????????????? ???????????????????????????????????
CompensateActivity ICompensatableActivity ?????????????????????? Activity ??????????????????????????????
CodeActivity ??????????????????????????
CompensatableSequenceActivity SequenceActivity ??????????????????????????????????????
CompensatableTransactionScopeActivity TransactionScopeActivity ??????????????????????????????????????
ConditionedActivityGroup ?????????????????????????????????????
DelayActivity ???????????????????????????????????????????????????
EventDrivenActivity ????????????????? Activity ??????????????????????????????????????? CompositeActivity ???????????????????????????????????????????????????????EventDrivenActivity ??SequenceActivity ????????????????????????? IEventActivity ??????????????????????????????
EventHandlingScopeActivity ??????????????????????????????????????????
??Microsoft? MSDN?????
16?????????????????????????
??? ??
FaultHandlerActivity FaultType ????????????? Exception ???????????? ???????????????????????
HandleExternalEventActivity ???? ???????????????????????????????????????????????
IfElseActivity ???????IfElseBranchActivity ?? 2 ??????????????? 1 ??????????????????????????????
InvokeWebServiceActivity ???? ??????? Web ??????????????????????????????????????????????????????
InvokeWorkflowActivity ????????????????????????????????
ParallelActivity ???????????????????????????????????
PolicyActivity 1 ????????????????????????????????????? Rule ???????????????????????
ReplicatorActivity ?????????????????????????
SequenceActivity 1 ????????????????????????????
SetStateActivity ???? ??? ??????? StateActivity ?????????????????????????
??Microsoft? MSDN?????
17?????????????????????????
??? ??
StateActivity StateMachineWorkflowActivity ?????????
StateFinalizationActivity ???? ??? ?????????????????????????????????????????????????????????????????
StateInitializationActivity StateActivity ??????????????????????? ????????????????????????????????
SuspendActivity ?????????? ???????????????????????????
SynchronizationScopeActivity ??????????????????????????????????????SynchronizationScopeActivity ??????????????????????????????????????????????????????????????????????????????
TerminateActivity ?????????????????????? ???????????????????????????
ThrowActivity ?????????????????????????????????
TransactionScopeActivity ???????????????????????????????? Activity ??????????? Transaction ??????Activity ????????????????????????????????????????
WebServiceFaultActivity ???????? Web ???? ????????????????????????????????????
??Microsoft? MSDN?????
18?????????????????????????
??? ??
WebServiceInputActivity ??????? Web ?????????????????????????????????????
WebServiceOutputActivity ?????????? Web ???????????????????????????????????
WhileActivity ?????? true ??????1 ?????????????????????
??Microsoft? MSDN?????
19WF?.NET Framework 3.5?????????
- WF?2????????????????????
- ??????2??????????????????????????
20.NET Framework 3.5?????????????
??? ??
ReceiveActivity Windows Communication Foundation (WCF) ???? ???????????????????????????????????
SendActivity Windows Communication Foundation (WCF) ???????????????????????????????????
??Microsoft? MSDN?????
21ReceiveActivity??
- WCF ???? ???????????????????????????????????
- ReceiveActivity ????????????? ?????????????? 1
????????????? - ????????????????????????????????WCF???????????????
??? - ReceiveActivity?????.NET Framework
3.0????WCF????????????????????????????????????????
???????????????????????? - ????WCF??????????????????????????????????
22SendActivity??
- WCF???????????????????????????????????
- SendActivity????????????? ?????????????? 1
????????????? - ?????????????????????????????????WCF?????????????
- SendActivity?????.NET Framework
3.0????WCF????????????????????????????????????????
???????????????????????? - ????WCF??????????????????????????????????
23Tech Ed 2008 North America??WF????
- ????????????
- WFWCF?.NET ?????????????IT?????????????
- ??????
- SharePoint Services????????
- BizTalk 2006 R3????????
- ??
24???????????
- ???????????????????
- ??URL
- Windows Vista ??????
- http//www.microsoft.com/japan/msdn/windowsvista/t
echarts.aspx - Windows Workflow Foundation ? Windows
Communication Foundation ??? - http//www.microsoft.com/japan/msdn/net/wf/bb26670
9.aspx - Windows Workflow Foundation integration with
Windows Communication Foundation - http//msdn.microsoft.com/en-us/library/cc626077.a
spx - ?????? ???????????????
- http//msdn.microsoft.com/ja-jp/library/bb412181.a
spx - Workflow Services Samples (WF)
- http//msdn.microsoft.com/en-us/library/bb943473.a
spx - Creating Workflow Services and Durable Services
- http//msdn.microsoft.com/en-us/library/bb412181.a
spx