views:

42

answers:

2

I have a state machine workflow that responds to changes in a list item. The workflow also updates the list item; is there any way to avoid firing the OnWorkflowItem changed event when the changes were made by the workflow?

A: 

use the List item's .SystemUpdate() method instead of Update().

  • Oisin
x0n
This did not seem to work, the MSDN documentation on SystemUpdate (http://msdn.microsoft.com/en-us/library/ms461526.aspx) says: "When you implement the SystemUpdate method, events are triggered..." My OnWorkflowItemChanged event still fired when I used SystemUpdate.
Robin Clowers
A: 

So I found a workaround for this, but it's pretty ugly, hopefully someone has a better answer.

Rather than having one state do an update and then wait for the event, I split it out into two states. The first state updates the list item, catches that on change event, and transitions to the second state which waits for the a change from the user.

Robin Clowers