?
Solved

SharePoint Looping Workflow Throws Update Errors

Posted on 2014-09-03
7
Medium Priority
?
661 Views
Last Modified: 2014-09-16
I am working on a SharePoint 2010 application where I need to "trick" SharePoint into updating a bunch of child list items when the parent is updated. What I have works some of the time to update some of the items in the child list. Most of the time I get an error for the workflow that updates the child list items.

Here is the Error:
The workflow could not update the item, possibly because one or more columns for the item require a different type of information.

Open in new window


There are three lists and related columns:

Project - Name (single line of text)
Project Tasks -Project Name (lookup field connecting to project), Project Name 2 (single line of text)
WorkFlowControl - This is used to create the looping

Here is a description of the logic:

1.

When a Project Lead is assigned to that project a workflow fires to update the projects tasks with the project leader's name (updates a person field). It finds the first task that has the same Project Name 2 as the Project that was just updated. Once it sets the project lead it updates the Project Name 2 field by appending a number to the end of the Project Name. This is makes sure this item is not found and updated on the next loop.

2.

When the task is updated it triggers a workflow that creates an item in the workflowcontrol list that holds both the project name and project lead

3.

When an item is created in the workflow control list it triggers a workflow that updates the first matching item in the project task list that has the Project Name in the Project Name 2 field. When it finds one it sets the Project Lead and updates the Project Name in the Project Name 2 field.
The problem is the workflow that fires when an item is created in the workflow control list tends to error with the above error and sometimes the Task is updated with the project lead and other times it does nothing. I suspect the problem has to do with the fact that I am using the project name 2 value to find a list item and also updating that value to make sure it is not found on the next loop. Like I said it sometimes works (updates all tasks with project leads name) other times it only does a few. Which makes me think it is a timing thing but I don't know.
0
Comment
Question by:William Blake
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 9

Assisted Solution

by:macarrillo1
macarrillo1 earned 2000 total points
ID: 40304242
I had a similar problem with a workflow.  I was updating a list from two other list; one of them being a related list.  I got this part of the workflow to work by adding a 1 minute pause in the workflow to allow the related list key field to work. Now my looping works reliably, although slowly (5 minutes per list item).
0
 

Author Comment

by:William Blake
ID: 40304260
Thanks Macarrillo! I was thinking that I might need a pause, which causes yet another problem.  It seems the Pause for Duration action does not work for this site.  It pauses and never resumes.  It just sits there never to resume. Any thoughts on this?
0
 
LVL 9

Expert Comment

by:macarrillo1
ID: 40304323
Did you do a

...
then Pause for 0 days, 0 hours, 1 minute
then Update item in [Your List]
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 

Author Comment

by:William Blake
ID: 40304327
Yep.  It pauses and never resumes or completes the update.
0
 
LVL 9

Expert Comment

by:macarrillo1
ID: 40304446
Which list/workflow did you put the pause on.  Perhaps you can put the pause on one of the other lists.
0
 
LVL 9

Accepted Solution

by:
macarrillo1 earned 2000 total points
ID: 40310014
Workflows are very sensitive to their environment.  If you have access to Central Admin; Please confirm that your SharePoint is fully up to date. In Central Admin:

1.'Upgrade and Migration|Review Database status' All content database should have a status of 'No action required'

2.'Upgrade and Migration|Check Upgrade Status' Status of last upgrade should be 'Succeeded'
0
 

Author Closing Comment

by:William Blake
ID: 40325170
Sincere apologies for my absence.  I unfortunately do not have access to central admin and have created a work around to get around this need to loop over items.  The looping should work and so should the pause but in this case neither do.  I will accept two of your suggestions as they are likely the cause/way to resolve my issues.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question