Friday, July 24, 2009

How to build and Deploy a Workflow with WSPBuilder

I'm working on adding screenshots to this, but just follow the instructions for a very simple tutorial on deploying a workflow with wspbuilder.

1. Download and run the WSPBuilder Extensions from CodePlex. http://www.codeplex.com/wspbuilder

2. Start a new project in Visual Studio. If you ran the WSPBuilder Extensions you should have a new option for project type. Choose a “WSPBuilder Project with Workflow” template.

3. Right click on the project and add a sequential workflow:
Choose a Sequential Workflow Feature Template
Choose Scope as Site.

4. You’ll notice you are missing references:
Change the Target framework to .Net 3.0 for the project.

5. Double click on the projectname.cs file inside the WorkflowCode folder. Drag a “logtoHistoryListActivity” from your toolbox directly beneath the onWorkflowActivated1. On the properties for logtoHistoryListActivity1, add text to the HistoryDescription and HistoryOutcome. Save and close the file.

6. Open the elements.xml file that was placed in 12/Template/Features/projectname/. Remove the following attributes inside the workflow node: TaskListContentId, AssociationURL, InstantiationURL, ModificationURL, StatusPageURL. Save that file.

7. Right click on the project and add a new item:
Add a Solution Installer Configuration:

8. Edit the Setup.exe.config file and delete the row with the FarmFeatureId. Save and close that file.

9. Right click on the project and build.

10. Right click on the project – WSP Builder – Build WSP. (This will build your wsp file)

11. Right click on the project – WSPBuilder – Create Deployment Folder.

12. Execute \%projectfolder%\bin\deploy\%projectname%\setup.exe on the target server. Your installer will come up, once you click Next it will do a system check, you can accept the end user license, and then you can choose which web applications to deploy to.

13. Logon to Sharepoint. Go to site actions – Site Settings – Modify All Site Settings
Under Site Collection Administration, click on Site collection features. Find your feature and click on Activate

14. Once the feature is active, go to a Document Library, and go to Document Library Settings.
Click on Workflow settings. Click on Add a workflow. Select your workflow, and choose other options.

15. Go back to the Document Library and start the workflow manually, or however you chose with start options.

16. Verify that the workflow completed.

Wednesday, May 20, 2009

TechEd 09 Keynote Recap

It took less than 30 seconds for them to mention the economy. There are over 7000 people at Tech Ed 09, despite the bad economy and the swine flu!

There are two questions that need to be answered...
1. How do we apply virtualization.
2. When do you run in the data center vs. in the cloud.

Windows 7 cool features include the awesome new problem step recorder. This will be a life saver for us developers! The windows snap and shake. Since I haven't played with this feature, I'm not sure if I will like it or not, but you can basically shake a window and it will snap into place. Also Windows 7 will include virtualization.

Server 2008 will run on 64 bit only. It has remote administration features, an active directory undelete option, and can search using OCR technology, so it can find words on images.