与此问题相关。
我有一个 xamlx 工作流服务,在运行时从数据库加载其定义的一部分(使用 ActivityXamlServices.Load)。原因是我需要版本控制,请参阅相关问题。我将使用 WCF 路由将调用定向到正确的服务。
我动态加载的部分包含 接收活动。但是,只要工作流未启动,此活动就是“不可见的”,因为我从数据库加载的工作流部分仅在工作流启动时加载。因此,从外部看,工作流程中似乎没有 Receive
活动。
除了无法为工作流服务生成合同之外,我也无法调用该服务。我的第一次尝试是在工作流服务上使用正确的合约进行肥皂调用。但是,在这种情况下,运行时不会自动激活我的工作流程。所以问题是,如何启动 IIS 内托管的工作流?
Related to this question.
I have a xamlx workflow service that loads part of its definition from a database when it runs (using ActivityXamlServices.Load). Reason for this is that I need versioning, see the related question. I'll use WCF routing to direct calls to the right service.
The part that I load dynamically contains a Receive activity. However, this activity is 'invisible' as long as the workflow doesn't start because the part of the workflow I load from the database is only loaded when the workflow starts. So from the outside it appears as if there is no Receive
activity in the workflow.
Apart from not being able to generate a contract for the workflow service, I can't call the service either. My first attempt was to do a soap call with the right contract on the workflow service. However, the runtime doesn't automagically activate my workflow in that case. So the question is, how do I start a workflow that is hosted inside IIS?
发布评论
评论(2)
IIS 7.5 有一个相对较新的模块,称为“应用程序预热”。这是一个可配置的工具,允许 IIS 以不同程度的可配置性启动您的应用程序。我建议查看这两个链接:
http://www.iis.net/download/ApplicationWarmUp
http://learn. iis.net/page.aspx/688/using-the-iis-application-warm-up-module/
There is a relatively new module for IIS 7.5 called Application Warmup. This is a configurable tool that allows IIS to start up your application w/ varying degree's of configurablity. I suggest checking out these two links:
http://www.iis.net/download/ApplicationWarmUp
http://learn.iis.net/page.aspx/688/using-the-iis-application-warm-up-module/
Windows Server AppFabric 包含一个可以提供帮助的自动启动功能。
查看 如何为 AppFabric 自动启动创建 WF4 WorkflowServiceHostFactory
我还有一个示例,演示如何使用虚拟路径提供程序从数据库加载 XAMLX,网址为
Windows Workflow Foundation (WF4) - 工作流服务存储库示例
Windows Server AppFabric includes an Auto Start feature that will help.
Check out How to create a WF4 WorkflowServiceHostFactory for AppFabric Auto-Start
I also have a sample that shows how to load XAMLX from a database with a Virtual Path Provider at
Windows Workflow Foundation (WF4) - Workflow Service Repository Example