We are planning to develop a system based on SharePoint 2010 (SP objects, workflows, UI etc.).
The syste开发者_如何转开发m will contain about a dozen workflows that interact with the SharePoint objects.
From asking around I understood the following:
- SharePoint 2010 workflows are .NET Framework 3.5 WF
- There has been a big leap from the WF in 3.5 to the WF in 4.0 (it was basically rewritten).
- It's possible to write my workflows in 4.0, but they won't integrate as easily into SharePoint 2010.
- I can write my workflows in 3.5 but if we will upgrade our SharePoint version we will have to rewrite our workflows.
You can only use .NET 3.5 workflows with SharePoint 2010. You are right, .NET 4.0 workflows won't integrate in SharePoint 2010. Don't worry about upgradation, even SharePoint product team would be aware of this scenario. They might either come up with an upgrade tool or a backward compatibility.
Use .NET 3.5 - otherwise it won't work.
There are some people saying you should not develop State-Machine Workflows because they do not exist in .NET 4, it only has "Flowchart" workflows. But a recent update to .NET 4 re-introduced State-Machine Workflows...
You do not have any other choice right now but to use .NET 3.5. But you should keep in mind that once a new Sharepoint version comes out (SP 2010 is pretty new!), you might have to upgrade your workflows - but in the end you would have to upgrade all code to the new version.
WF in .NET 4 uses the Interop activity to leverage backwards-compatibility. You can safely execute your existing assets (obviously with some limitations) when the new workflow engine becomes available in SharePoint.
精彩评论