1
votes

I am working on a Sharepoint Server 2007 State machine Workflow. Until now I have a few states and a custom Association/InitiationForm which I created with InfoPath 2007. In Addition I have a few modification forms. I have a Problem with the removing of the modification link in the state-page of my workflow.

I have a state and in the initialize block of this state my EnableWorkflowModification Activity appears. So at the beginning of the state the modification is active. In the same state I have an OnWorkflowModification activity, which catches the event raised by the EnableWorkflowModification activity. After this state my modification is over and the link should disappear in the state-page. But this is not the case. Both activities have the same correlation token (modification) and the same owner (the owning state). Has anybody an idea why the link is not removed and how to remove the modification link?

Thank you in advance, Stefan!

2

2 Answers

1
votes

Have you checked the OnWorkflowModification event handler is actually firing? Try debugging or adding some eventlog traces to make sure it is. I've run into similar issues with OnWorkflowItemChanged event handler.

1
votes

Make sure you have the enableWorkflowModification and onWorkflowModified inside an eventHandlingScopeActivity, and set that as the OwnerActivityName for each.