简体   繁体   中英

Avoid firing OnWorkflowItem changed for changes made by the workflow

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?

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

  • Oisin

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM