Using the StateFinalizationActivity Activity
The StateFinalizationActivity activity is used in a StateActivity activity as a container for child activities that are executed when leaving the state activity. A StateActivity activity can have at most one StateFinalizationActivity activity. Unlike an EventDrivenActivity, which can also be a StateActivity child, the StateFinalizationActivity activity does not have to respond to events. It always executes when a StateActivity activity exits.
For more information, see the StateFinalizationActivity class in the System.Workflow.Activities namespace in the Windows Workflow Foundation Class Library reference.