views:

425

answers:

3

I'm working on revising some existing SPD WF's and strugling with some of the concepts including why 2 appearingly alike WF's doesn't produce the same output.

Are there anyone of you that has worked with SharePoint Designer / Workflows and knows any good resources (more detailed than the MSDN introductions) or tips on the matter. E.g. on debugging and how to inspect settings and how to connect information from several workflows...

In other words: come up with your best SPD WF links & tips :o)

I'm not able to choose another solution at the moment, so any tips are welcome. I have the USPJ Special Issue on SharePoint Designer Workflows. It' not bad, but there must be more goodies out there :o)

A: 

Have you seen this thread yet?

RailRhoad
Yes I know that one but its absolutely relevant. The SPD workflows are tricky to work with, though having a UI to define work flows you do not have the power of .NET based workflows or the ease of built-in SharePoint work flows
noesgard
+1  A: 

It appears from your question that you are hitting the limits of the solutions that SharePoint Designer is designed to solve.

There really isn't debugging support as the wizard approach shouldn't require it, however in reality we know this would really help! Similarly, connecting workflows is pushing the boundaries and I would consider moving to Visual Studio for that. You could consider developing custom actions if appropriate as a workaround or bridge to creating a full-blown Visual Studio workflow (here are examples with source code).

Web resources I would look at first are the SharePoint Designer Team Blog (obviously) and workflow articles on EndUserSharePoint.com.

Also, books that have a reasonable amount of SharePoint Designer workflow content:

Alex Angas
+1  A: 

I've learnt the following from programming workflows and deploying them with SPD.

1.don't rely on passing all the fields you need in the workflow callout: define what seems sensible, but remember that once you have access to the SPList item, you can work your way around the object model from within your workflow without having to repeatedly change the interface and redeploy.

i.e. once you have defined these three things in your .actions file and passed them to your workflow

public static DependencyProperty __ContextProperty = DependencyProperty.Register("__Context", typeof(WorkflowContext), typeof(YourWorkflowClass));
public static DependencyProperty __ListIdProperty = DependencyProperty.Register("__ListId", typeof(string), typeof(YourWorkflowClass));
public static DependencyProperty __ListItemProperty = DependencyProperty.Register("__ListItem", typeof(int), typeof(YourWorkflowClass));

you're set up to access whatever you might have forgotten to pass explicitly when deploying.

2.Watch out when using the Context directly to create your instance of the sharepoint item you want, as you may unknowingly pass on the permissions of the person calling the workflow. i.e. do this

SPWeb tmpweb = __Context.Web;
SPSite site = new SPSite(tmpweb.Url);
SPWeb web = site.OpenWeb();

instead of this:

SPWeb web = __Context.Web;

3.Debugging is difficult to set up if you don't happen to have visual studio installed on the same box as sharepoint.

davek