R – Workflow stops responding when list item is updated programmatically

sharepoint-2007workflow

I have a workflow running on an item in a list. The workflow has an OnWorkflowItemChanged activity sitting within a While activity. I know that the workflow enters the While loop, and if I update the item through the UI, it fires the OnWorkflowItemChanged activity. However, if I update the item programmatically (through a console application), it not only does NOT fire the OnWorkflowItemChanged activity, but it stops responding to updates through the UI as well.

Has anyone seen this before? Is there a way to update the list item programmatically and have the workflow both respond to the event and continue responding to future events?

edit: It works fine if I use the Lists web service to update the item. Why does it mess up if I use the object model?

Best Answer

I know when updating a list item through the object model in an event receiver you can call SPEventReceiverBase.DisableEventFiring(), etc. SPEventReceiverBase.DisableEventFiring() Have you tried that, or is there a workflow equivalent?

Here's a hack to disable event firing on updates that aren't triggered from inside an event receiver: link text

Related Topic