Задайте вопросЗадайте вопрос
 

ВопросWorkflowServiceHost, multiple services and the WorkflowRuntime

  • 20 февраля 2008 г. 13:52Dr Adrian Colquhoun Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

     

     

    Hi,

     

    I am hosting the workflow runtime in a windows form application to run a number of "standard" WF workflows. I now want to add a number of WorkflowServices. I intend to create a WorkflowServiceHost to host my services.

     

    I noticed a post from Tom Lake that each WorkflowServiceHost can only host a single workflow service (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2233752&SiteID=1).

     

    Also, I observe that it is posible to get a reference to the runtime being used by the service host by writing code like:

     

    WorkflowRuntimeBehavior workflowRuntimeBehaviour = host.Description.Behaviors.Find<WorkflowRuntimeBehavior>();

    WorkflowRuntime rt = workflowRuntimeBehaviour.WorkflowRuntime;

     

    My question is - how many runtimes must I have? Can my standard workflows and each hosted service all share the same undelying runtime or do I need to spin up and configure a seperate runtime in each case?

     

    Also, could anyone point me at a good code sample for programatically hosting multiple services.

     

    Thanks

     

    Adrian

     

Все ответы