State Finalization Activity
The StateFinalizationActivity is used in a StateActivity as a container for child activities that are executed when leaving the state activity. A StateActivity can have at most one StateFinalizationActivity. Unlike an EventDrivenActivity, which can also be a StateActivity child, the StateFinalizationActivity does not have to respond to events. It always executes when a StateActivity exits.
You have an ability to simply drag and drop StateFinalizationActivity within a State Activity of a Workflow as displayed below.