Reputation: 41
I'm developing workflows on SharePoint 2010 using Visual Studio.
I need to catch event, when user cancel running workflow from UI. User clicks on "Terminate this workflow now" link and I should add some logs to history of current workflow instance.
I added cancellationHandlerActivity for my SequentialWorkflowActivity, but cancellationHandlerActivity is not executed.
In MSDN I find explanation for cancellationHandlerActivity (http://msdn.microsoft.com/en-us/library/aa349442(v=vs.85).aspx) - The CancellationHandlerActivity activity contains cleanup logic for a composite activity that is canceled before all the composite activity's child activities are finished executing.
So I thought, that cancellationHandlerActivity is what I need, but on practice - I'm wrong :(
Please, give me some advice, how i can solve my problem! I tried to find solution on the Internet, but couldn't :(
Upvotes: 0
Views: 512
Reputation: 41
I found solution!
You can create your custom WrkStatPage and add your custom action on cancel event. (More information about this way)
Also in Element.xml for your workflow add property
StatusUrl="_layouts/MyCustomWrkStat.aspx"
Upvotes: 1