工作流中的内联代码? [英] Inline code in a workflow?
问题描述
嗨.是否可以在工作流程中编写内联代码?例如.我想在工作流程中添加脚本形状,并为该形状编写一些代码.我能找到的最接近的形状是调用我的C#方法的形状.
Hi. Is it possible to write inline code in my workflow? E.g. I'd like to drop a scripting shape in to the workflow and write some code in to that shape. The closest I could find to this was a shape that calls my C# method.
BizTalk支持在工作流中编写内联代码的功能.我希望在.Net 4工作流程中找到它.我错过了什么吗?
The ability to write inline code in a workflow is supported in BizTalk. I was hoping to find it in .Net 4 workflow. Have I missed something?
谢谢!
推荐答案
您好,McGeeky,
Hi McGeeky,
是的,有可能;)
要调用一个简单的方法,您可以使用"InvokeMethod"活动.
To call a simple methode you could use the "InvokeMethod" activity.
要在工作流设计器中调用代码编辑,更好的方法是对自定义活动进行编码.此活动具有一个InArgument,可让您通过设计器输入代码.在execute方法中,您只需调用use上下文来安排参数 (实际上:您的自定义代码是在工作流程定义中设计的.)
To call a code edit in workflow designer, the better way is to code a custom activity. This activity sould have a InArgument to allow you to put in you code via designer. In the execute methode you'll only have to call use context to schedule your argument (in fact : your custom code designed in workflow definition).
这篇关于工作流中的内联代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!