1
votes

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?

3

3 Answers

0
votes

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

0
votes

Yup i agree the problem is that event is not at all firing. I have noticed that if you reset IIS it works for the first time but after that there is no update.

0
votes

It looks like the only way to make the events fire is to use the Lists Web Service.