Lesson learned Nr 1, Never use Sharepoint 2010 designer if you have custom activities.

Posted on Updated on

On my current assignment I was asked to do something like this:
When a new event is created, a new document library should be created, then in the event a link to the document library should be updated. After 30 days the document library should be moved to an archive subsite and the link should be deleted.

I suggested at the beginning that it should be done via a Visual Studio workflow but I was suggested that it should be done with Sharepoint Designer so we can use out of the box functionality and do it faster.

Well, I am going to explain why this is not an option, in this particular scenario, Sharepoint Designer does not have activities to Create a document library with specific naming logic and it does not have an activity to move the document library from one site to another subsite. Sharepoint designer can copy or move files, but it does not allow to loop through folders or library neither.

Sharepoint Designer 2010 SUCKS big time for developers. Maybe its good for powerusers, but for really experience developers or consultants, its not an option in scenarios where you need custom activities.

The reasons are very simple:
1. Timing.
2. Easy of maintenance.
3. Easy deployment

Option 1: SP designer workflow.
1. You start creating a Sp designer workflow.
2. Then you need a custom activity.
3. You create the custom activity in visual studio
4. You need to create a feature that deploys the dll to the gac.
5. You need to create a feature that adds the authorizedtypes entry into the web.config.
6. You go back to sharepoint designer, you have to close it and open it back to see the custom activity.
7. You finish the workflow.
8. Then you need to export it to see it in the assets library
9. Then you can download the WSP
10. Then you need to write a long document in how to deploy all these things in test and production environment.
11. If a change needs to be done, you need to go change the custom activity, and also the sharepoint designer workflow, then export again, update, etc, I am not going to run into details here, but you get my point.

Option 2: Visual studio workflow.
1. You open visual studio, create one solution with 2 projects, one for custom activities, another for the workflow.
2. You develop all the logic there.
3. You create in the same vs solution one feature to add the authorized types into the web.config
4. There is only one WSP created which will include inside the custom activities dll.
5. Installation can be done in 20% of the time with the other solution.
6. Maintenance its a lot easier and faster. Updates as well.

Because I wanted to prove this, I did Option 2 at home, in my own time.

Option 1: 4 days.

Option 2:  1.5 days.

Lesson learned Nr 1.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s