共用方式為


WF 4.0 Templates - Beta2

During Beta1, I had talked about the templates we are shipping in depth and our rationale around here.

However, we got a lot of feedback around them as this is one where which has the first visibility and more or less is taken as some form of guidance from us(product team) around how to start the development with Workflows/WCF.

Based on this feedback, couple of things have been updated with respect to templates for Beta2. Please let us know what you think as we get ready for RTM and need to make some final changes in time before shipping VS 2010.

The Project Templates under the Workflow Node:

image

Yes, we have removed the Flowchart Console and the Sequential Console Project Templates. The biggest reasoning being we didn't want to portray(mis-guide) Sequence and Flowchart as being the only root activities possible. It is possible to have any composite or a leaf activity to have your root activity for the workflow.

Also, going down that route, we wouldn't know which ones to promote as first class root activities. We have Sequence and Flowchart. What happens when StateMachine comes? Or why not Parallel?

Hence the best approach going forward, was to have a single Activity Library and a single Workflow Console Application. They are both with the root being the ActivitySchema(Activity x:Class)

We also have the ActivityDesigner as a separate Project template, as we do expect users to consistently separate their activities and designers into separate assemblies so that onl the activities assemblies are deployed onto the production machines.

Finally, we also have the WCF Workflow Service Application. This is where we have the integration between the Workflow and WCF. This is the consolidation of the Declarative Sequential Service Library and the Declarative Flowchart Service Library. In Beta2, the Xamlx file only contains the Sequence template wrapping the ReceiveAndSendReply activities.

image

This specific Project Template is also part of the WCF node under Visual C# and VB as well as part of the root Visual C# and VB nodes.

Please note that it is a Web Application project type. So even though Xamlx is deployed standalone, the project can have other activities and designer items added to wrap them as a dll. Using the Web Application project type gave us a couple of advantages including the single click deploy and the the F5 on Cassini experience.

The Item Templates under the Workflow Node:

image

Continuing on the same principle followed in the Project templates, we have removed the Sequence and the Flowchart templates. We now have just the Activity template which is same as the Workflow authoring in Workflow 4.

The declarative Sequence and Flowchart item templates have been replaced by a single WCF Workflow Service item template with the the same Service.Xamlx file as the Project templates. Again following on the project template principle, the item template appears now in the Workflow node instead of the Web node in Beta1.

The ActivityDesigner template remains the same.

Finally, the Code Activity item template also has been updated to make it clear(through the comments) on how to use a code activity to return a value.

image