Creating Custom Workflows with SharePoint Designer 2007

Microsoft just published another Visual How To, Creating a Custom Approval Workflow for SharePoint Server 2007 Using SharePoint Designer 2007, written by yours truly. This Visual How To explains how to build a SharePoint Designer approval workflow for the sample expense report form template that comes with InfoPath 2007. The article and video show how to modify and then publish the form template to a SharePoint document library, define a new workflow and attach it to that document library, and add conditional logic within the workflow designer. This codeless approach to building an expense report workflow is an alternative to working in Visual Studio 2008, which fellow 3Sharp developer Mike Rand describes in the Visual How To titled Building an Expense Report Approval Workflow for SharePoint Server 2007 Using Visual Studio 2008.

41 thoughts on “Creating Custom Workflows with SharePoint Designer 2007

  1. I have created a task list in Sharepoint 3.0 to manage a large number of action items (100) for my office. I’m not a programmer or a developer. Now I want to create a custom workflow to send reminders periodically BEFORE an action is due and also periodically AFTER the items are OVERDUE. The 3-state workflow that comes with Sharepoint does NOT meet our needs at all. I was told that the type of workflow I need is called an “escalation” workflow–is that correct? Can this be done using Sharepoint Designer? I do not have Visual Studio. I have never used Designer nor have I had any training yet. I have used Sharepoint for a couple of years.Other questions:- We do not want our task list populated with any workflow progress items (“workflow initiated”, etc.) Is there a way to have those go somewhere else? a different list? a different view?- Does sharepoint know when to start each stage of a workflow automatically once you set up the workflow, or will we have to manually change the status of an action item to initiate each stage (open, reminder, overdue…)?What we would like the workflow to do is:- at the halfway point between the date the action was assigned and the due date, generate the first email reminder automatically to the “assignee”. – auto-generate the 2nd reminder approx. one week before due date- auto-generate 1st Overdue reminder the day after the due date passes- auto-generate 2nd Overdue reminder 2 weeks later- auto-generate subsequent Overdue reminders every 2-3 weeks until the action is closed.I would greatly appreciate any help/advice you can give me.

  2. David,There seems to be a hack to create a column as a single value, then change it to multiple value after it has been added in the SharePoint designer to allow sending to multiple email recipients. I get all that, I even get ways to manipulate and store the email list, separate all the values, etc.What I want to know is if I can somehow collect the email addresses using SharePoint designer either from the initiation form or through the collect data as the first action in the workflow.The behavior I want to mimic is that of the default approval workflow where a user can just specify anybody from the address book (active directory lookup?) as an approver. Or is there someway to edit the default approval workflow in SharePoint designer?Thank you for any assistance you can give on this topic.

  3. Hi, Ed.With a SharePoint Designer workflow, you cannot define an initiation parameter that is of type “Person or Group”. However, you can define a “Single line of text” (string) initiation parameter and then have users provide email addresses that are separated by semicolons. Of course, with this approach, you do not get address book capabilities.I hope this helps…Regards,David

  4. Hi to all, I am creating a reminder workflow using SharePoint Designer, and when I use “Pause Until Date” activity. It doesn’t resume and Workflow status does not change from “In Progress”.(i.e. it displays “Pausing for 0 minutes” only, under Workflow History but it doesn’t take any specified action).I have done some googling for that in last 4 days, and from there I had got a hot fix – KB 932394 and installed it but still I am in same trouble with “Pause Until Date” Activity.I have also changed “job-workflow” time duration using stsadm command from 5 minutes to 1 minute as below: stsadm -o setproperty -propertyname “job-workflow” -propertyvalue “every 1 minutes between 0 and 59” -url http://localhostbut found same problem.What should I do for this? Please suggest me why “Pause Until Date” doesn’t resume and Workflow status does not change from “In Progress” in my workflow.

  5. David,I’m slowly making progress on the workflow I asked you about earlier. However, I’m stuck again on a really weird problem:I’ve started creating a workflow to include an action to send an email message (a reminder) to the “assigned to” for a task. I’ve created a workflow lookup to look up the information in the “assigned to” column and send an email reminder–this step works. When I created this step (Email this message), I clicked on “this message” and it brings up “define email message”. In the “to” line, I clicked the “addressbook” icon In the “select users” box, I clicked “workflow lookup…”In “define workflow lookup” I selected “current item” as the source, and “assigned to” as the fieldThe action looked like this: Email test:Assigned To (“test” is the name of the task list)I created subsequent email reminder steps and saved the workflow (it indicated no errors). When I reopened the workflow later and wanted to create another email reminder action, I followed the same steps, but when I got to “define workflow lookup” and selected “current item” as the source, when I went to select “assigned to” for the field, it is not there among the options that can be selected. Do you have any idea why this would happen?? I even tried creating an entirely new workflow attached to the same list (“test”) but the same thing happens… HELP!Alicia

  6. Hi, Saurabh.When setting the Pause Until Date action, don’t forget that there is a time element involved. So, if you are testing a solution and the Pause Until Date action is set to today, technically the date/time will have already passed (at 12am). You might want to consider running your tests with tomorrow’s date as the value for your Pause Until Date action.I hope this helps…Regards,David

  7. Hi, Alicia.You should check to make sure that the data type for your “assigned to” field has not been changed. Columns for certain data types will not appear in the “Field” list of the Define Workflow Lookup dialog box, including Date and Time, Currency, and (I believe) Lookup.I hope this helps…Regards,David

  8. Hi, Mark.There are no “looping” capabilities in the SPD Workflow Designer that allows you to iterate through a list and copy multiple items. You would need a Visual Studio workflow to copy multiple items from one list to another.Regards,David

  9. Hi David,I have a SPD workflow that copies an initial single task from a (master) list “A” to another defined list “B” based on a define column value within list A. In the next step a user updates a column in list B which then initiates the process to copy a number of additional task from list A to list B using COPY LIST ITEM based on a value defined in list A.The problem is that as the SPD workflow ACTIONS name suggest, it only copies a single item from list A to list B. What do I need to do in order for the process to copy all of the task that is defined to be copied to list B?Thanks & Regards,Mark.

  10. I am trying to create a business process in which1. A user uploads a document to the ‘Request Document Approval’ document library2. The new document activates a workflow which creates a task (for the submitter) to provide additional information via a ‘Collect Data from a User’ action3. Once the provide additional information task is complete, a list item is created in a custom list named ‘verify new submission’4. As soon as the new item is created in the ‘verify new submission’ list, I want to automatically activate the next workflow. The new workflow requires a different user to verify that the uploaded document – as well as the additional information provided by the submitter – is ready to be processed further.This where my troubles begin. I want to provide the user who is supposed to verify the information with a) a link to the uploaded document, b) most of the information collected in the ‘provide information’ task in view-only format, and c) a task/action to indicate whether they accept the submission (document + additional information collected) or they reject the submission.How do I provide the data I have already collected earlier in the workflow to the person verifying the submission? And how do continue to collect smaller pieces of information in the form of tasks while displaying some pieces of the information already collected in the process?Thanks in advance for your input!

  11. Hi David,I have a questions.I have created a SPD workflow and would like to have a tasks view set up so users can only see the tasks that are assigned to them and also tasks that are assigned to their groups? Is there any way to create 1 view for that?

  12. Hi, Terry.By default, task lists should have “My Tasks” and “By My Groups” views. You can go into List Settings (for the task list) to change which of these views gets displayed by default, or you can create a new view depending on your needs.Regards,David

  13. Thank you so much for responding so quickly. I have a issues tracking task and for some reason the By My Groups does not show as a view? But If I just create a regular task list the By My Groups does show up but not under the Issues tracking? How can I create this view? Also, Is it possible to have the My tasks & My groups be in the same view so users can have one view with all of their task shown? I know the My tasks is set up in the filer section like this: Assigned to is equal to [ME]. Can the next filter be Assigned to is equal to [group] or something like that. I hope that makes sense?

  14. The “By My Groups” view just sorts by “Assigned To” and “Status” and groups by “Assigned To”. You can easily combine those settings with the filter setting of the “My Tasks” view.

  15. Hi againOK…so I must be doing something very wrong and maybe you can walk me through it. When I create an Issues Task list, it has 3 views (all issues/my issues/active issues) There is no By My group view. Can you tell me how to create the my issues & By My Group in one view? I know I click create view. Then click on Standard View, then name it, click on public view. I am assuming under the filter options I select Assigned to is equal to [ME] but the next filter I dont know what to add to get the By My Groups.

  16. Terry:I think we are talking about two different list types. The “Issue Tracking” list has “All Issues”, “Active Issues”, and “My Issues” views. The “Tasks” list has “All Tasks”, “Active Tasks”, “By Assigned To”, “By My Groups”, “Due Today”, and “My Tasks” views.Regards,David

  17. yes…I am talking about about Issues Tracking. I need to use that one because you cannot connect to outlook with the Issues Tracking list. When you connect to outlook, outlook brings in ALL tasks. Our Management want users to only see their own tasks. So that would be tasks that are in the My tasks and task that are assigned to their groups (distribution lists).

  18. Terry:The SharePoint “Tasks” list allows you to connect to Outlook, but will bring in all tasks, regardless of whether you change the default view or not. As you already pointed out, the SharePoint “Issue Tracking” list does not allow you to connect to Outlook. If you need more than that, it will require custom code…Regards,David

  19. Hi David,Just picking up around your post: # re: Creating Custom Workflows with SharePoint Designer 2007 Left by David Gerhardt at 10/2/2008 2:40 PMIt seems strange that you can select the ‘Modified By’ field in a list which is of data type ‘People or Group’, but if you create your own field which is also of type ‘People or Group’ it does not appear in the list of fields available to define workflow lookup.Is there a workaround beyond putting a static and hard-coded email address?Many thanks.

  20. Alex:If you define a ‘People or Group’ column, it will appear in the ‘Field’ list in the ‘Define Workflow Lookup’ dialog box.Regards,David

  21. Hi there David – I’m trying to select the person or group held within a column within a list. The ‘People or Group’ columns do appear in the Field list of the ‘Find List Item’ section, but surprising not in the ‘Lookup Details’ section just above it.Any idea why this may be?Thanks,Alex

  22. Hi, Alex.If your ‘People or Group’ column allows for multiple selections, then it will not show up as an option in the lookup details. However, it will show up if the column does not allow for multiple selections.I hope this helps…Regards,David

  23. David,I have successfully created workflows on my site using the “send email” action item. It appears I can no longer create a workflow that uses the email action item. Other workflow action items work fine, but adding a send email action spits back an error in SPD. Existing workflows that use the “send email action” item also work fine. If I try to modify an existing email action item, the workflow does not pass the “check workflow” test. Can you offer any help?Thank you!Christopher Dimasi

  24. Hi, Chris.I can’t say that I’ve seen that error before. You might want to check with your sys admin…Regards,David

  25. Hi David,Hope you could help me to solve a problem with a SPD workflow.I’m using two document libraries: -One of them contains any kind of documents (lets call it document library). -The other is used to create a “complaint report” each time a user complaints about any information that could be found in any of the documents stored in the first library (lets call it report library).Also, I’ve a custom list which stores the “complaint” process, user that makes the complaint, reference/link to the document which motivates the complaint, and a reference/link to the “complaint report”.I’ve created two workflows with Designer: – One of them should be started manually by the user that makes the complaint and creates a new item for the “complaint process” in the custom list, also create the complaint report in the second document library. – The other, is an approval workflow which would be applied to the report library. This one should be started manually too, once the complaint report has been completed. Furthermore, this approval workflow is supposed to update the list item created with the first workflow (the complaint process), with the result of this action (approved or declined).For this, in the first workflow, once I’ve created the new item in the list, I store a reference/link to this item in a field created in the report library for each report.The problem is that the item is not being updated once the report is approved/declined as it was expected, instead of that, I recieve an “error updating a list item”.Note: Is there a way to get a more specific error?Thanks in advance.

  26. Hi, David.You can check the ULS logs to get more detailed information. To find out where the ULS logs are located, in Central Administration, click the Operations tab and then click Diagnostic Logging in the Logging and Reporting section. In the Trace Log section, the Path box identifies the location of the logs.Hope this helps…Regards,David

  27. Hi again, Thanks for the hint, I was able to locate the error, but I can’t figure out what’s going on…This is what appears in the log file: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Workflow.SPWinOEWSSService.UpdateListItem(Guid id, Guid listId, Int32 itemId, Hashtable itemProperties) at Microsoft.SharePoint.WorkflowActions.ActivityHelper.DoCorrectUpdateMethod(WorkflowContext theContext, Int32 item, Guid listId, Hashtable properties, IListItemService hostInterface) at Microsoft.SharePoint.WorkflowActions.UpdateItemActivity.Execute(ActivityExecutionContext provider) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.Acti… I need to solve this problem, but I can’t find out the solution, any ideas?Thank you very much.

  28. Hi, David.You’re right…it’s hard to identify the specific error from the log. I would suspect that one of three things is causing the problem:1. The workflow logic is correct, but the document does not exist in the first library.2. The document does exist in the first library, but the workflow logic is not correct.3. The document exists and the workflow logic is correct, but the document is locked for editing.Regards,David

  29. Hi David,I have reviewed my workflows and those are the results: – I have checked again the workflow logic and it seems to be correct.- The item exists at the exact moment the workflow tries to edit it. I verified that the item is being created properly with the first workflow, the field that references the item contains the same ID, so the item is accessible through this reference too. – The item cannot be checked in/out, since it belongs to a custom list and the item is not a document.I’m feeling really confused with this… Hope you can give any other ideas. Thanks again.

  30. I would like to create an email workflow so that when an iten is added to a list or the list is updated an email is sent with all the list data in the email.Is this possible with just SharePoint Designer or is this a Visual Studio kind of thing. I am fairly good with SPD, but rather weak with VS.Thanks in advanceKeith

  31. Hi, Keith.You can use an SPD workflow to access all the data in the current list item. However, because SPD workflows do not have iterative capabilities, you cannot access data for all items in a list. For that, you would need to use Visual Studio.Regards,David

  32. Hi,I have an issue. I am using SharePoint Designer and i have a problem with “Pause for duration” activity. Whenever i pause my workflow for 1 min, it does not resume back in 1 min but takes near about 5 mins. Everytime it takes more minutes to resume back than mentioned in the activity. Why is this hsppening?Ginni

  33. David,Is there a way to use SPD to mimic the OOTB Approval Workflow, whereby I can get a custom SPD W/F built that will sequentially create the multiple approval tasks? We have a need to get two approvals, but from two different people depending the employee’s manager, but have those two people be tasked sequentially. Thanks for any suggestions,KevinHou

  34. Hi David,I have designed a workflow in SPD. It worked fine for 4 months but now it has started giving an issue. Whenever user try to edit the task in task list, then it shows error stating “Potentially excessive SPRequest Objects(9) currently unreleased.”. I searched a lot on this and i came to know that it is a memory leak problem as objects are not getting disposed off and we need to dispose them off explicitly. I have not used any coding then how to do this? It is also showing “Server out of memory error” as due to the above memory leak(Wasteful consumption of memory)error, no memory is there on the server.This problem generally come when we use code in website design and workflow design but i have not done any coding.I simply used SharePoint Designer.After somedays, error changed and now it has started showing “Object reference not set to an instance of object”. I have not done any change but now it shows this error. Yes stack trace is same in all the three errors.Please help me as i am not getting how to solve it. It is really making me crazy

Comments are closed.