Skip to content

March 12, 2007

Missing Content Types and Workflows

If you’ve been working with workflows for a while you’ve seen the “Failed on Start” and “Error Occurred” statuses that happen if you mismatch the assembly information or leak an exception back to the workflow foundation, respectively.  However, I found a new behavior.  If you create a workflow that requires a content type through a feature and that feature doesn’t deploy the content type correctly then you won’t see anything when you start the workflow.

When I say anything, I mean it.  You won’t see a status column for the workflow added.  You won’t see a workflow history.  You won’t be able to tell that SharePoint took the command.  However, if you explore the ULS logs you’ll see an error indicating that the content type for the workflow is missing.

When you’re developing it might be helpful to keep the ULS logs handy.


On STSADM and Operation Completed Successfully

STSADM has a comforting message that is presented whenever a command is executed successfully.  That comforting message is simply “Operation Completed Successfully.”  It’s a welcome site particularly if you’ve been struggling to get an XML file just right or if it’s the end of a long day.  However, just because you received an “Operation Completed Successfully” message back from STSADM doesn’t mean the command really completed successfully.

Occasionally, you may run into a situation like I did where I received STSADM’s reassurance that everything was fine but it wasn’t.  I was creating a content type and I had accidentally inserted a space at the end of the content type name.  It was a silly little editing error, but it cost me a whole lot of time.  I didn’t realize that the space was there until a workflow that needed it blew up. That, of course, lead to a debugging session, which lead to isolating the missing content type, which lead to reinstalling the feature, and then several minutes of confusion as I compared the web browser demonstrating that the content type was missing with the response from STSADM indicating “Operation Completed Successfully”

A quick trip into the ULS log or a detailed look at the XML either one will solve the problem – however, for that moment I was confused.

So the moral of this story is … check the ULS log if you want to know what really happened.

Recent Posts

Public Speaking