[英]C# Workflow code activity result
Hello I am very new worklows. 您好,我是很新的worklows。 I am attempting to build a proof of concept workflow that will process all files in a specified directory.
我正在尝试构建一个概念证明工作流,该工作流将处理指定目录中的所有文件。 I have added a foreach loop and then a codeactivity (ValidateXml), the code activity validates the xml and returns bool, it inherits the CodeActivity class.
我添加了一个foreach循环,然后添加了一个代码活动(ValidateXml),该代码活动将验证xml并返回bool,它继承了CodeActivity类。
Now i you take a look at the picture, I would like to use the result of the codeactivity in the WriteLine activity. 现在,我看一下图片,我想在WriteLine活动中使用代码活动的结果。
Please help me in how to do that. 请帮助我。
Thank you! 谢谢!
Add a bool
variable, say bValid
in Sequence Activity. 添加一个
bool
变量,在Sequence Activity中说bValid
。 In the properties dialog of ValidateXml
, assign Result to the bValid
. 在
ValidateXml
的属性对话框中,将Result分配给bValid
。 bValid
will contain the return value of ValidateXml
activity. bValid
将包含ValidateXml
活动的返回值。
It's quite easy what you wanto to do. 您想要做的事情很容易。 See in the screenshot below:
请参见下面的屏幕截图:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.