Simply I have two parallel while loops. Both use the same condition. First loop contain just onWorkflowItemChanged and second one contain code block after logToHistoryListActivity and then delayActivity.
When I deploy and run workflow everything seems work fine but when I change code at first time is used the new code (let's say I just comment part which write something to the list) but every other loop is different and and old code is executed (even I comment that part).
This problem takes me while to solve, but solution is very easy.
Everything what you need to do is reset time service. Here are commands to do that:
SharePoint 2007: net stop SPTimerV3 / net start SPTimerV3
SharePoint 2003: net stop SPTimer / net start SPTimer
SharePoint 2010: net stop SPTimerV4 net start SPTimerV4
The reason why old error is executed is that DelayActivity hibernates workflow and sets a new timer job. But when I changed the code the old time job was executed. That is reason why you should reset time service and "delete" old timer jobs to prevent them occurring again.
Hope this helps somebody ;)
No comments:
Post a Comment