简体   繁体   English

工作流中的InArgument到OutArgument转换导致错误

[英]The InArgument to OutArgument Conversion in Workflow causing error

In the following workflow i am trying to add the contents of IList Value1 and Value2 to Value3 as shown below. 在下面的工作流程中,我尝试将IList Value1和Value2的内容添加到Value3,如下所示。

<Variable x:TypeArguments="scg:IList(mtvc:Mytype)" Name="Value3" />
<Variable x:TypeArguments="scg:IList(mtvc:Mytype)" Name="Value1" />
<Variable x:TypeArguments="scg:IList(mtvc:Mytype)" Name="Value2" />
<Assign sap2010:WorkflowViewState.IdRef="Assign_10">
<Assign.To>
<OutArgument x:TypeArguments="scg:IEnumerable(mtvc:Mytype)">[Value3]</OutArgument></Assign.To><Assign.Value>
<InArgument x:TypeArguments="scg:IEnumerable(mtvc:Mytype)"> [Value1.Concat(Value2)]</InArgument></Assign.Value></Assign>

But i am getting an error as given below 但是我收到如下错误

     Invalid L-value expression.:Reference expressions cannot end with  Conversion. The provided expression's type must exactly match the type T of VisualBasicReference<T> or LambdaReference<T>.

I have faced similar issues. 我也遇到过类似的问题。 After continuous trial and error, the issue resolved for me. 经过不断的反复试验,问题为我解决了。 But I couldn't find the route cause of the issue yet. 但是我还没有找到问题的路由原因。

If you have created a variable by right clicking on the field and selecting "Create new", some times this error occurs. 如果通过右键单击该字段并选择“新建”来创建变量,则有时会发生此错误。 I haven't found a specific solution for this. 我还没有找到具体的解决方案。 But the below trial and error method helped me to resolve the issue. 但是下面的反复试验方法帮助我解决了该问题。 - Select the input dialog where you are assigning the value to the variable. -选择将值分配给变量的输入对话框。 - In properties window, clear the variable name from 'Result' property. -在属性窗口中,从“结果”属性中清除变量名称。 - Remove focus from the Result property - Again click on Result property value field and type first few letters of the variable name. -从Result属性中移出焦点-再次单击Result属性值字段,然后输入变量名称的前几个字母。 Wait for the auto list to display the variable. 等待自动列表显示变量。 Select the variable. 选择变量。 在此处输入图片说明 - or click on "..." next to the Result Property value field. -或单击“结果属性”值字段旁边的“ ...”。 In the expression editor, type first few letters of the variable name and wait for the auto list to display the variable. 在表达式编辑器中,键入变量名称的前几个字母,然后等待自动列表显示变量。 Select the variable. 选择变量。

Run the application. 运行应用程序。 If it doesn't work, repeat replacing variable name in all the places wherever the field is being referred. 如果不起作用,请在引用该字段的所有位置重复替换变量名。

Also sometimes, if you close and reopen your project also the error will be resolved. 同样有时,如果您关闭并重新打开项目,该错误也会得到解决。 (But that's strange and I don't know why that happens!!!) (但这很奇怪,我不知道为什么会发生!!!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM