Here are some notes from my experience building a SharePoint state machine workflow.
- All fields delcared on the workflow object must be serializable type or marked nonSerializedAny activities before the workflow activated event will not have access to workflow properties
- Remember to remove dll's from the GAC when building, GAC'ed versions will supersede local versions
- Emailing from SharePoint requires the network service account to have local activation permission for "IIS WAMREG Admin Service" (a dcom service): http://www.cleverworkarounds.com/2007/10/25/dcom-fun-with-sharepoint/
- There is a bug in the delay activity, here are some patches: http://blogs.msdn.com/sharepoint/archive/2008/07/15/announcing-availability-of-infrastructure-updates.aspx, http://support.microsoft.com/kb/953630/
- SetSate is not like a return, the rest of the activities in that phase will still execute
- You cannot have more than one list template in a feature
- Set workflow logging level use this command:
- stsadm -o setlogginglevel -category "Workflow Infrastructure" -tracelevel verbose
- To get and set timer settings use this command:
- stsadm -o getproperty -pn job-workflow -url http://localhost/
- stsadm -o setproperty -pn job-workflow -pv "Every 1 minutes between 0 and 59" -url http://localhost/
- To allow unsigned powershell scripts to run use this command:
- Set-ExecutionPolicy Unrestricted
Workflow Versioning
- There is no concept of versioning for Visual Studio created SharePoint workflows
- Instead, include the version in the feature path, name, description and workflow name and description
- Change the assembly version, and the version in each of the other places
- Deploy as a new feature
- Make sure the old workflow is marked "No new instances" after you associate the new version (this should be automatic)
- Based on this, it seems like workflows should be in their own features to allow for simpler versioning
- Delay activities were not working correctly
- Worked with MS Premier support for weeks to try and resolve this
- Resetting the SharePoint timer service made the delay activity work correctly
- When they are initialized in the designer, setting the value to something else in the initialize event does not work
- If you bind the timeout property to a dependency field then it can be set in the initialize timeout handler, much like SendEmailActivity properties
No comments:
Post a Comment