工作流基础:相同域下的自托管工作流

时间:2019-04-18 09:02:54

标签: c# .net workflow workflow-foundation-4

如何在一个Workflowhost中加载多个工作流(操作)?

这不起作用:

System.ServiceModel.Activities.WorkflowService wf = XamlServices.Load("service.xaml") as System.ServiceModel.Activities.WorkflowService;
WorkflowServiceHost workflowServiceHost = new WorkflowServiceHost(wf,new Uri("http://localhost:123/service"));
workflowServiceHost.Open();

wf = XamlServices.Load("service2.xaml") as System.ServiceModel.Activities.WorkflowService;
WorkflowServiceHost workflowServiceHost = new WorkflowServiceHost(wf,new Uri("http://localhost:123/service"));
workflowServiceHost.Open();

我只能得到一个例外,该URL已经被使用。我加载的xaml文件由Receive和SendReply操作组成。我想在同一个域下进行多项操作。

0 个答案:

没有答案