Activate on External Event

I know I can accomplish this with some host plumbing, but why doesn't 'HandleExternalEvent' support an activation property like WebServiceInput

I have a state machine workflow whose initial state waits for an external event to move it to the next state. Seems logical that I could make this activity 'activating' just like a WebServiceInput activity so that a workflow is automatically created when this external event comes in.

Is there a way to do this without host plumbing (not that I don't know to do it with the host, just seems like the same pattern as web service input)

Thoughts



Answer this question

Activate on External Event

  • quargel

    Actually you can do this, but the activity doesn't need to be activating. Because all external events come through the host you can create an instance of a new workflow when the event is received by the host. The first activity of the workflow can be handle external event and this can receive the event.

    This is not possible for the web service input activity because you are not writing the host, so we had to provide a mechanism for choosing whether a new instance was required.

    Hope this helps.

    Cheers,
    Paul



  • harry8227

    Ok, that makes sense. The activating property is really something that is flagged for the built-in IIS host, not so much a feature of the runtime.
  • Activate on External Event