我有两个派生自 CodeActivity 的自定义活动(CodeActivity)类。一项活动被放置在 TFS 构建过程模板 (xaml) 上。此 CodeActivity 正在使用 WorkflowInvoker.Invoke 方法调用我的其他自定义 CodeActivity。当我调用第二个 CodeActivity 时,它是在不同的 CodeActivityContext 下调用的。这是为什么?因此,当我将消息写入第二个 CodeActivity 的上下文时,它不会显示在构建过程中。有没有办法在我的第一个CodeActivity的CodeActivityContext下调用第二个codeActivity?我的第二个 CodeActivity 还调用另一个自定义 CodeActivity。我想在同一个 CodeActivityContext 中调用所有这些。我怎样才能做到这一点?
有人可以帮我吗?
注意:我的所有 CodeActivity 均派生自 CodeActivity 的一个基类。
I have two custom activity(CodeActivity) classes that derived from CodeActivity. One activity is placed on the TFS build process template(xaml). This CodeActivity is calling my other custom CodeActivity using WorkflowInvoker.Invoke method. When I call the second CodeActivity, it's being called under different CodeActivityContext. Why is that? For that reason, when I write message into second CodeActivity's Context, its not shown in build process. Is there any way to call the second codeActivity under my first CodeActivity's CodeActivityContext? My Second CodeActivity also calls another custom CodeActivity. I want to call all of them in the same CodeActivityContext. How can I do that?
Can anybody help me please?
NOTE: All of my CodeActivity is derived from one base class of CodeActivity.
发布评论
评论(1)
是否可以从 NativeActivity 派生?然后,您可以使用 ScheduleAction 方法://msdn.microsoft.com/en-us/library/system.activities.nativeactivitycontext.aspx" rel="nofollow">NativeActivityContext。这就是我们为必须调用其他活动(放入此活动的子活动)的自定义活动所做的。
Isn't it possible to derive from NativeActivity? Then you can use the ScheduleAction method from the NativeActivityContext. That's what we did for our custom activities that had to invoke other activities (child activities that where dropped onto this activity).