如何在工作流程 4 中将参数从一个活动传递到另一个活动

发布于 2024-08-30 20:51:18 字数 343 浏览 1 评论 0原文

我创建了一个活动 (CodeActivity),用于检索我居住地的温度。
我不想将该活动添加到工作流程中并将其连接到可以根据我的温度参数执行不同操作的 if 语句/活动。
但我似乎无法找到如何从我的温度活动中获得争论。

这是我的第一个 Windows Workflow 4 项目,所以也许我的攻击方式是错误的。
我有:

public OutArgument<decimal> Degrees { get; set; }  

但是我如何访问它?我找到了如何在运行活动时获取数据的教程(只有一个),但不是作为工作流程的一部分。
希望我的问题有意义。

I have created an Activity (CodeActivity) that retrieves the temperature where I live.
I wan't to add that activity to a workflow and connect it to an if statement/activity that can based on my temperature outargument do different things.
But I can't seem to find how to access the outargument from my temperature-activity.

This is my first Windows Workflow 4 project so perhaps I'm attacking this in the wrong way.
I have:

public OutArgument<decimal> Degrees { get; set; }  

But how do I access it? I have found tutorials how to get the data when running the activity (only one) but not as part of a workflow.
Hope my question makes sence.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原来分手还会想你 2024-09-06 20:51:18

将变量添加到工作流程并将 OutArgument 从 CodeActivity 绑定到该变量。接下来,您可以在 If 活动中使用该变量。

Add à Variable to the worflow and bind the OutArgument from your CodeActivity to the variable. Next you can use the variable in the If activity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文