- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我在使用 Workflow Foundation 中的自定义事件和设计器时遇到问题。为了这个问题,我创建了一个非常简单的事件,如下所示:
[Designer(typeof(TesteDesigner))]
public sealed class Teste : CodeActivity
{
// Define an activity input argument of type string
[RequiredArgument]
public InArgument<string> Text { get; set; }
// If your activity returns a value, derive from CodeActivity<TResult>
// and return the value from the Execute method.
protected override void Execute(CodeActivityContext context)
{
// Obtain the runtime value of the Text input argument
string text = context.GetValue(this.Text);
}
}
设计者如下:
<sap:ActivityDesigner x:Class="ActivityDesignerLibrary1.TesteDesigner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:Converters="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation">
<sap:ActivityDesigner.Resources>
<Converters:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter" />
</sap:ActivityDesigner.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="Valor: "
VerticalAlignment="Center" />
<sapv:ExpressionTextBox HintText="Valor"
Expression="{Binding Path=ModelItem.Text, Mode=TwoWay, Converter={StaticResource ArgumentToExpressionConverter}, ConverterParameter=In}"
ExpressionType="{x:Type System:String}"
OwnerActivity="{Binding Path=ModelItem}"
UseLocationExpression="True"
Grid.Column="1"
Margin="3,0,0,0" />
</Grid>
</sap:ActivityDesigner>
当我在 TextBox 中键入内容时,出现错误:左值表达式无效,但如果我在属性网格中键入值,TextBox 会更新。
有没有人见过这个?
谢谢。
最佳答案
从您的 XAML 中删除 UseLocationExpression 属性或将其设置为 False。您的其余代码似乎是正确的。
查看MSDN上的属性备注:
A location expression (or L-value expression) is a type of expression that evaluates to an identifier and can be placed on the left hand side of an assignment statement. When you are binding the ExpressionTextBox to an Out argument, you would set this property to True.
它仅在您要绑定(bind) OutArgument 时使用。
关于c# - Workflow Foundation - 在自定义设计器中分配 InArgument,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14653027/
这似乎比我最初猜测的更复杂。我有一个工作流程需要在代码中启动另一个工作流程。这是怎么做到的?我是否必须首先获取对当前工作流实例的 WorkflowRuntime 的引用? 最佳答案 我认为Invoke
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be
需要有关实现简单配额系统的最佳做法的指导 我想限制成员可以将自定义内容类型(称为 token )添加到他们的成员文件夹的次数(我还创建了一个自定义成员文件夹)。 用例(限制成员可添加的 token 数
我最近发布了一个有关在Web应用程序中运行Windows Workflow的问题。当然,这是一个技术性很强的问题,其中包含ManualWorkflowSchedulerService,HandleEx
今天,我接受了“Microsoft Workflow Foundation”的培训。 虽然我认为这个想法很巧妙,但我仍然将其视为概念证明,而不是现实生活中的解决方案。无需键入一行代码(或只键入其中的几
我在WF4上遇到了一个非常奇怪的问题:当我使用Switch Activity 并决定字符串变量的值时,WF以某种方式将WF的参数视为字符串,而不是变量的名称。因此,我得到了不正确的结果。复制步骤:-创
WWF 能否处理同时“主动”并行处理数十条记录的高吞吐量场景? 我们希望构建一个每小时处理几千条记录的工作流程。每条记录最多需要一分钟来处理,因为它会进行外部 Web 服务调用。 我们正在测试 Win
在我的项目中,我有一个在多个实体上运行以完成业务交易的工作流程。表示工作流逻辑的最佳位置是什么?目前我只是创建一个“XXXManager”,它负责与实体对象协作以完成业务交易。还有其他选择吗? 最佳答
我想编写一个工作流应用程序,将链接路由到文档。路由基于机器而不是用户,因为我不知道谁将在给定的岗位上。例如,我有一个表格。它最初是在位置 A 填写的。现在我希望它转到位置 B 并让他们填写其余部分。最
在我们的项目中,我们需要一个规则引擎组件,经过一段时间的研究,我发现.NET Workflow 也有它的规则引擎。 .NET 工作流规则引擎和其他引擎之间是否有任何完整的比较列表,例如NxBRE、Dr
我认为这可能是一个简单的问题,但我似乎无法弄清楚。 我有一个简单地发送邮件的工作流程。在邮件的内容中,我 有一个超链接可以返回到我们的 SAP CRM 系统。我将一些参数传递给这个超链接。 工作流程工
我正在试用 Workflow 4.0,希望编写自定义事件来启动外部可执行文件,等待该过程完成,然后恢复工作流中的后续步骤。 我发现以下示例显示(靠近页面底部)如何编写一个事件来等待文件到达特定目录:
我有一个工作流,它将观察某些数据库并在它注意到触发器时启动其他工作流。我只希望这个“观察者”工作流程的一个实例在任何时间点运行;否则,如果有两个或更多正在运行,他们都会注意到更改并启动相同的工作流程,
使用 Windows Workflow Foundation WF4,我有一个带有 System.Guid 的自定义事件名为 UniqueId 的属性. 我希望用户能够将我的事件拖到工作流上,并让它自
Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。 想改善这个问题吗?更新问题,以使为on-topic。 6
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
我正在尝试重新托管 WF4 工作流设计器。在“导入”选项卡中,我希望默认导入一些命名空间。它看起来像这样: Imported namespaces http://imageshack.us/m/850
how to work with 2010 workflows using powershell 上有一些指南.有人可以向我指出如何对 2013 年的工作流程做同样的事情吗?它们不再列在 $list.
在哪里可以找到 Nintex Workflow 网络服务的文档? 网络服务可以在http://myservername/MyNintexSite/_vti_bin/nintexworkflow/wor
我创建了一个 Activity (CodeActivity) 来检索我居住的温度。 我不想将该事件添加到工作流中并将其连接到一个 if 语句/事件,该语句/事件可以根据我的温度参数做不同的事情。 但我
我是一名优秀的程序员,十分优秀!