Create a loop section in your worlflow with SharePoint Designer 2010

OOTB, SharePoint Designer doesn’t offer you the ability to create a workflow with a loop.

Fortunately by manipulating the .oxml file of the workflow, everything become possible !

First take care that SharePoint’s web.config has this line as bellow:

<authorizedType Assembly=”System.Workflow.Activities, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ Namespace=”System.Workflow.*” TypeName=”WhileActivity” Authorized=”True” />

Next, you can start to create your workflow as you need replacing the expected loop section by an if condition section and encapsulate your activity inside the if in a section called “while do” or something you can find easily later.


Take care to design your workflow correctly and test it now because after the manipulation, you won’t be able to design the workflow any more because SharePoint Designer can’t display a while in the design view.

Save and publish your workflow.

Close the workflow and go to “all files/workflow/your workflow name” and open its .xoml file with Note Pad.


In the XML file, search the section you have created called “While Do” or something else and modify the content of the section as bellow replacing in-red section:


By the in-red section bellow:


Save the bloc note, click on the file .oxml to open the workflow and Save again. Click No when confirm Save.


Restart SharePoint Designer and open the workflow, Make a Check Errors and Publish.


The workflow is ready to be used. Fortunately if you need to update the workflow you have the make the reverse change again in the .oxml file as you see SharePoint Designer can’t display your workflow loop in design mode :



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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

%d bloggers like this: