简体   繁体   中英

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.

<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. 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!!!)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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