WCF工作流服务 - 如何添加工作流控制端点?

问题描述:

我在VS2012中创建了一个新的WCF工作流服务项目。WCF工作流服务 - 如何添加工作流控制端点?

最终,我需要的是能够从我的工作流程的实例A终止工作流程的实例B.

尽我所知,实现这一目标的唯一方法是通过Workflow Control Endpoint,但我无法弄清楚如何添加/访问我的项目。

根据我所见(例如here),为了添加控制端点,您只需在web.config中的<service>节点添加一个<endpoint>元素并使用相应的属性值。问题是..我的web.config中没有<service>元素。 “WCF工作流服务应用程序”项目模板不添加一个。下面是我的web.config。

所以我的问题很简单:从“WCF工作流服务应用程序”项目模板开始,我该如何添加工作流控制端点?

这些都为项目的默认启动设置: default launch settings

的web.config

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <appSettings> 
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /> 
    </appSettings> 
    <system.web> 
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" > 
    </compilation> 
    <httpRuntime targetFramework="4.5"/> 
    </system.web> 
    <system.serviceModel> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior> 
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <protocolMapping> 
     <add binding="basicHttpsBinding" scheme="https" /> 
    </protocolMapping> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 
    </system.serviceModel> 
    <system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 
</configuration> 

终于找到了一个解决方案。请参阅this post