Nick Grattan's Blog

About Microsoft SharePoint, .NET, Natural Language Processing and Machine Learning

Archive for the ‘SharePoint Designer’ Category

Creating While Loops in SharePoint Designer Workflows using Stateful Workflows – Part 2

with 3 comments

Here’s some additional information to this post about this subject.

An alternative to our solution for while loops in SharePoint Designer workflows have been previously proposed based on setting a workflow to start when an item is changed. This gets over the problem of how to get a workflow to restart itself (which we do with the “Restart This Workflow” action). You can find a description of how to do this here: http://sharepointmagazine.net/technical/development/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders

However, the technique of a workflow restarting itself when an item changes will not work with SP2. Take a look at this Microsoft post:

http://blogs.msdn.com/sharepointdesigner/archive/2009/07/13/service-pack-2-prevents-an-on-change-workflow-from-starting-itself.aspx

In SP2 a workflow cannot restart itself recursively, and so this will break stateful workflows written in this way. Seems strange that Microsoft would introduce a breaking change when using these techniques have been well documented.

Written by Nick Grattan

October 7, 2009 at 12:40 pm

Creating While Loops in SharePoint Designer Workflows using Stateful Workflows

with 14 comments

For an update on this topic please see this blog entry: http://nickgrattan.wordpress.com/2010/12/14/while-loops-in-sharepoint-designer-workflows/

Amongst several significant limitations with SharePoint Designer workflows, perhaps the most important is the lack of looping. Therefore, expressing processes like “while not approved, rework” becomes difficult.

We have published a paper that describes how to implement while loops by emulating stateful workflows in Microsoft SharePoint Designer. You can download the paper here (PDF, Oct 2009). The technique uses our “Restart this workflow” custom action, which is part of our “Custom Activity Pack” which can be downloaded here for free.

Update: 10-Nov-2013. Source code and WSP now available in GitHub: https://github.com/NickGrattan/NGCCustomActivities.git

Written by Nick Grattan

October 6, 2009 at 10:00 am

Custom Workflow Action: Send to Records Center

with 7 comments

Our Custom Activity Pack contains actions that can be installed for use in Microsoft SharePoint Designer workflows. The latest version includes an action for sending documents and items to a Records Center site collection directly from your workflows.

The Custom Activity Pack is free and can be downloaded from GitHub: https://github.com/NickGrattan/NGCCustomActivities.

Other custom actions in this pack include:

  • Start Workflow – Start another workflow for the item or document and return.
  • Call Workflow – Start another workflow and wait until that workflow has completed.
  • Halt Workflow – Halt another workflow executing against the item or document.
  • Restart This Workflow – great for implementing stateful workflows in SharePoint Designer
  • Is Workflow Running – check if another workflow is running against the item or document.

Here is the entire list of actions:

CustomActivities.png.PNG

Written by Nick Grattan

October 1, 2009 at 5:18 pm

Microsoft SharePoint Designer Download Now Free!

leave a comment »

Written by Nick Grattan

April 24, 2009 at 9:26 am

Increasing size of Rich Text Editing Control

with 6 comments

When using the rich text column type in SharePoint lists the edit control has a fixed width of 384 pixels. This is often too small for easy editing.

The width of the control used to edit rich text is set through the ms-rtelong style. You can change the width using the style in the core.css or other style sheets you may be using. However, this will change the width for every use of this control in your site.

If you need to change the width for a single form, open the form in SharePoint Designer and add a style defining ms-rtelong at the top of the content place holder in which the form is displayed with new dimensions, e.g.

<asp:Content ContentPlaceHolderId=”PlaceHolderMain” runat=”server”>

<style type=”text/css”>
.ms-rtelong {
 width:700px;
 height:600px;
}
</style>

You can do this for standard uncustomised forms (e.g. NewForm.aspx) or for pages you create using the custom list form web part.

Written by Nick Grattan

December 1, 2008 at 3:50 pm

SharePoint Designer: Clearing the Web Part Cache

with one comment

When developing web parts (say in Visual Studio 2008) and using these web parts in SharePoint Designer 2007 you may find that your property definitions are not refreshed in SharePoint Designer. For example, if you add a new property in VS 2008 and recompile, the new property may not not displayed in SharePoint Designer.

To remedy this you can clear SharePoint Designers web site cache:

  • Navigate to {my profile}\AppData\Local\Microsoft\WebsiteCache
  • Locate the folder that relates to the web site you’re using (server name + port)
  • Delete the contents of the folder.

You will find a file in this folder called {webpartproject}.Proxy.DLL. If you cannot delete this file because it’s in use just rename it.

Now, when you next run SharePoint Designer you’ll get a refreshed list of web parts.

Written by Nick Grattan

November 3, 2008 at 10:17 am

Follow

Get every new post delivered to your Inbox.

Join 59 other followers