Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a very simple SharePoint Designer workflow on a SharePoint list. All it does is fire when a new item is created, copying one column value into another.

The workflow generally does exactly what it should. The issue we're running into is that occasionally (and we haven't figured out any pattern to it) the workflow simply doesn't fire when a new item is created. It's not that it fails, it never fires. There's nothing in the workflow history for the item. I also don't see anything like an error in the timer job history for the workflow job. It just seems like the workflow simply doesn't fire.

Any idea what would cause occasional non-firing of such a simple workflow?

++++++++++++++++

If you're interested in the backstory, the goal of the workfow is to turn a Managed Metadata column into a text value. We want to display the Managed Metadata column value in an email sent from the workflow, but when you do this you always get the "messy" value, like 'Level1Term:Level2Term:Level3Term|ba7e2a4f-6602-47a8-aa81-bca54756a356'

The only solution I know for this is the one in the comment from Kristina P in Michal Pisarek's blog post Managed Metadata Column Limitations (which I find myself referring to too regularly).

Here's the meat of it:

You start with your managed metadata column (Column1Name)

  • Create a 2nd column (Column2Name) in the table of type string
  • On-create and On-modify workflows copy the value from Column1Name into the Column2Name. (sample: Level1Term:Level2Term:Level3Term|ba7e2a4f-6602-47a8-aa81-bca54756a356)
  • Create a 3rd calculation column (Column3Name) on the table
  • Calculation finds the pipe character and trims the value to clean text using find() and left() functions. Formula: =LEFT([Column2Name],FIND(“|”,[Column2Name])-1)
  • Email-out workflow uses Column3Name to send plain text without the hex string

I've done a blog post about this technique.

// UPDATE 2012-11-19 //

FYI - We've combed through the logs to no avail, but we're still testing. We think we've isolated it down to the first expected workflow firing per list after an IISRESET. Very odd.

share|improve this question
    
Have you tried if the workflow starts when the term was never used in the site collection and when you used one that already existed in the Site Collection. –  Stefan Bauer Nov 9 '12 at 16:55
    
This I may have an item where this is repeatable. Trying to figure that out, and if so, what is different about it. –  Marc D Anderson Nov 9 '12 at 17:32
    
The repeatability was a false lead. Might do something with script to populate the column rather than using a workflow. –  Marc D Anderson Nov 9 '12 at 22:25
add comment

3 Answers 3

Have you checked your SharePoint logs? Maybe something has been logged that could help you narrow down the cause.

The other thing to check, is the account that created the item. if its the system account, then SharePoint won't start the workflow automatically.

Cheers, Vadim

share|improve this answer
    
It's a regular user or Site Admin. No System Account. The fact that the workflow doesn't seem to fire at all makes me wonder if there would be anything useful in the logs. –  Marc D Anderson Nov 9 '12 at 16:47
    
SP will log messages like, not starting workflow because initiator is system account or recursive workflows are not allowed. Its worth checking. Maybe look for "workflow infrastructure" messages. –  Vadim Tabakman Nov 9 '12 at 17:59
    
Nothing truly useful in the logs on this, but I'm working now on the assumption that recursion in my workflow may be an issue. Since the workflow changes columns in the current item, it will cause itself to be fired again, which is apparently a no-no. The fact that the workflow works most of the time makes that a strange possibility, though. –  Marc D Anderson Nov 23 '12 at 15:25
add comment

see the blog post I did here on how to do it with event receivers http://www.sharepointfabian.com/blog/Lists/Posts/Post.aspx?ID=220

share|improve this answer
add comment

See this blog post how to extract it in SharePint 2013: http://www.fiechter.eu/blog/Lists/Posts/Post.aspx?ID=37&mobile=0

share|improve this answer
    
Please note that, per the FAQ you must disclose your affiliation in your answers. If your objective is to quietly drum up a bit of traffic for your blog, this is probably the wrong place for you. [mod] –  SPDoctor Jan 20 '13 at 17:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.