locked
Execution of OnActivityExecutionContextLoad RRS feed

  • Question

  • Hi,

    We created a custom “HandleExternalEventActivity” by extending the existing one. We have written some custom code into 'OnActivityExecutionContextLoad' which need to be executed each time when HandleExternalEventActivity is loaded back from persistence state. But 'OnActivityExecutionContextLoad' will be executed twice(during the creation of an ActivityExecutionContext as well as every time the ActivityExecutionContext is reincarnated when a workflow instance is loaded from persistent storage).   Is it possible to differentiate these two scenarios from 'OnActivityExecutionContextLoad' method. What we need is to execute our custom code only after our custom activity recreated from persistence. Please advice.

    Sreejith

    • Edited by SSreejith Thursday, November 26, 2009 6:43 AM Alignment issue
    Thursday, November 26, 2009 6:43 AM

Answers

  • Hi,Sreejith

    ->"What we need is to execute our custom code only after our custom activity recreated from persistence. Please advice."
    It is a WF3/3.5 by design mechanism. Do you get any problems when the method was executed twice?

    Regards

    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support
    Monday, November 30, 2009 8:17 AM
    Moderator