SharePoint Designer Workflows - tips and resources?

不羁岁月 提交于 2019-11-30 16:30:57

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:

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!