title: Intercepting/Decorating Activities in Windows Workflow
body: <p>Does Windows Workflow Foundation offer a way to intercept or decorate activities for purposes such as logging? For example to create logs for every activity entry and exit point (ideally including the activity name) without modifying all the existing project code. </p>
  
  <p>For example, I have a workflow with a single activity that prints "Hello world". Without making modification to the XAML file I would like to capture the entry and exit of the activity. I would like to print "Entering Hello World Activity" before entering the activity and after the activity has printed "Hello World", I would like to print "Completed Hello World Activity".</p>
  
  <p>Does Windows Workflow offer a mechanism for hooking into entry and exit of an activity?</p>
  
  <hr>
  
  <p>@Richard210363 has already added to the comments that this feature is supported by Windows Workflow Foundation - please can the users who chose to close this question consider reversing their decision as the question clearly has a very specific answer using the framework in question?</p>