Showing posts with label SPD Workflow. Show all posts
Showing posts with label SPD Workflow. Show all posts

Tuesday, April 9, 2013

FAILED ON START (retrying) Workflow resolution might be easier than you think

When you click on FAILED ON START (retrying), it gives you a page which says "Error updating list item" and the outcome column gives "Unknown Error"

I noticed that the workflow (built using SPD 2007) wasn’t able to create a task for a SharePoint User and hence was failing with this error.

Looking into the SharePoint Logs (Workflow Infrastructure category) this is what I got:

Error in commiting pending workflow batch items: Microsoft.SharePoint.SPException: Invalid look-up value  A look-up field contains invalid data. Please check the value and try again. ---> System.Runtime.InteropServices.COMException 

  • I first check if this user had access to SharePoint Site. Positive.
  • I then checked if the User had a valid SharePoint User Profile. Positive.

However when I tried to create a new user profile for this user, it wasn't able to find as shown below.


Just for the sake of testing I tried to use another valid user account (account_b) to assign the task to him (via the workflow). This user had access on the SharePoint site and also had a valid SharePoint User Profile. In addition to that, when I inserted (account_b) user into the Account Name above, it resolved to an Active Directory account successfully.

And to my surprise, the workflow ran successfully and was able to create the task. Now the workflow state is "In Progress"

Though this resolved the issue something still boggling my mind.

  1. This user alalik (as in the above image) was already available in SharePoint User Profile and also had access to the SharePoint Site.
  2. When I manually created the task for this user alalik (as in the above image), SharePoint successfully created it.
Why then did it not create the task via the SPD workflow?

Questions still prevails, but thankfully resolution was permanent. I would appreciate if someone can answer this in the comments below and I hope this helps many out there.

Monday, January 14, 2013

How to fix: "Unable to display this Web Part" when you want to initiate a workflow manually

Issue

This was a recent encounter (error message below) while starting a Workflow manually in MOSS (SharePoint 2007).

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.

For your better understanding, let me first explain you where I was at, and where I was heading. I wanted to start a workflow manually on a Document Library. [That wasn't tough :)]

I navigated to the:

  • Document Library >
  • Library Item >
  • Edit Menu >
  • Click on Workflows.
  • Under Start a New Workflow section, I clicked on the Workflow and was eye to eye with the error.

Analysis

As the error was instructing me to use SharePoint Designer, so I opened. And since this was a web part that was failing, I thought if I could remove the web part from the page and add it again. This was my source of greater understanding.

But since this was related to Workflows, I opened the particular workflow that was failing and noticed an .aspx page in the bundle (as below). This ASPX page represents the page that we use to manually run the workflow.

Resolution

I backed up this .aspx page, merely by changing its name. I then opened the Workflow (.xoml file) and published it. This action created a new ASPX page for me.

Now when I clicked on Start a New Workflow, the page appeared fine and I was able to run the workflow.

Sunday, December 9, 2012

SPD Workflow error: Path needs to point to valid member

I had created a workflow and its always interesting to make few changes to it, or is it? It is not so welcoming though, but when you have a client instruction, you welcome it with a smile.

So here I was updating/editing the workflow. After updating it when I clicked Finish (this will associates the workflow to a SharePoint List), I received an error as below.

I haven't found any reference on the web or workaround for this issue.

(0, 0) Activity 'ID9355' validation failed: Path '_x005f_String135' used to specify member for 'ROOT' is invalid. Path needs to point to valid member.
(0, 0) Activity 'ID9325' validation failed: Path '_x005f_String136' used to specify member for 'ROOT' is invalid. Path needs to point to valid member.

I realized I had backed up the workflow before making any changes to it. So I opened the copy in Notepad (.xoml file) and was trying to trace the String '_x005f_String135' and '_x005f_String136' as in the above error.

I found that this string was referenced couple of times in the document. I then started comparing both the workflows (the one I was editing and the backed up copy).

Found that a statement like below were missing in the copy I was editing:

<ns0:WorkflowDataField Name="_x005f_String135" Type="System.String" />
<ns0:WorkflowDataField Name="_x005f_String136" Type="System.String" />

I believe this to be a declaration of strings used in the workflow which apparently went missing when I was updating the workflow. I have no idea why did this happen.

So I copied this part from the backup and pasted in the file I was editing. I then saved the .xoml file, opened the workflow and clicked Finish (to associate with SharePoint List.)

It worked!

Lesson Learnt, or rather an Affirmation to myself - Continue backing up often.