Host可以在编译时不知道书签的情况下动态处理书签. [英] Can Host application handle bookmarks dynamically without knowing about it at compile time.

查看:62
本文介绍了Host可以在编译时不知道书签的情况下动态处理书签.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图赶上WF 4.0功能时,我想寻求帮助以了解实现给定方案的可能性.

具有一个或多个Input自变量的工作流.来自工作流输入自变量的数据被分配给一个或多个活动输入自变量.这些输入参数在活动级别标记为强制或可选.除非所有强制性输入均可用,否则活动将无法完成执行,因此活动必须为各个缺少的强制性属性创建书签,并等待数据到达.
 
另一方面,宿主应用程序与工作流类型无关,并且直到运行时才知道书签.它必须侦听活动创建的动态书签,并基于UI上的提示信息来获取每个属性的相应数据.到目前为止,在我所看到的所有示例中,主机应用程序都在编译时了解书签,因此易于映射和传递数据.在这种情况下,我应该延迟传递缺少的必需属性信息,直到活动要求,因为输入值可能会根据临时工作流执行结果而有所不同.

While I am trying to catch up with WF 4.0 features I would like to seek help in understanding possibility in achieving the given scenario.

A workflow having one or more Input arguments. Data from the worklfow input arguments gets assigned to more or more activity input argument. These input arguments are marked mandatory or optional at activity level. Unless all mandatory inputs are available activity execution does not complete, therefore, activity must create bookmarks for the respective missing mandatory properties and wait for the data to arrive.
 
On the other hand, the host application is workflow type agnostic and does not know about bookmarks until runtime. It must listen to dynamic bookmarks created by activities and based on that prompt information on the UI to get the respective data for each property. So far in all the examples I have seen, the host application knows about the bookmark at compile time so is easy to map and pass the data. In this scenario, I should delay passing missing mandatory property information until the activity demands as the input value might vary based on the interim workflow execution result.

推荐答案

在书签侧看起来可能.您可以从工作流一侧创建任何您想要的名称的书签.另外,似乎还可以从工作流托管端获取活动的WorkflowApplication的所有打开的书签"的列表,或者通过侦听空闲"事件.

您不会得到书签本身提供了很多信息,而不是名称,但是您可以创建一种方法,通过使用Workflow Extensions将更多信息传递回主机(请参阅WorkflowApplication.Extensions等).

Tim

Looks possible on the bookmark side. You can create any bookmarks named as you wish from the workflow side. Also it seems possible to get a list of 'all open bookmarks' of an active WorkflowApplication from the workflow hosting side, or by listening to the 'Idle' event.

You don't get much information from the bookmarks themselves other than a name, but you could create a way to pass additional information back to the host by using Workflow Extensions (see WorkflowApplication.Extensions etc.).

Tim


这篇关于Host可以在编译时不知道书签的情况下动态处理书签.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆