声明性配置(如 InRule)中的 Windows 工作流和 sql 脚本

发布于 2024-08-27 21:24:45 字数 384 浏览 5 评论 0原文

我们一直在使用 InRule 来满足我们的规则需求,但我们发现它不能很好地扩展,因此正在研究 Windows 工作流程。在 InRule 中,我们几乎可以配置任何任务,例如我们的 sql 脚本和存储过程,其中所有部分都是单独的规则配置文件,我想知道 Windows 工作流程中是否有类似的功能,我可以在其中调用声明性任务并向它传递一堆参数 – 该任务应该包含我将执行的 sql 脚本,我们应该能够在运行时更改脚本,而无需重新编译为 WF 代码。这在 Windows 工作流程中是否可能 – 我如何在工作流程中完成此操作。另外对于工作流中的sql执行,它如何获取连接字符串。它应该从调用程序传递吗?通过 Dictionary 对象将其作为输入参数从调用应用程序传递是最好的方法吗?还是工作流代码可以看到我的调用程序 app.config 并获取连接字符串?

We have been using InRule for our Rule needs we have found that it does not scale well and so are investigating the Windows Work Flow. Within InRule we could configure pretty much have any task for example our sql scripts and stored procedures where all part of a separate rule config file, I am wondering if there is a similar functionality within windows work flow where I could just call a declarative task and pass it a bunch of parameters – This task should contain the sql script I would be executing , we should be able to change the script at runtime without recompilation to the WF code. Is this possible in Windows Work flow – How can I accomplish this within work flow. Additionally for sql execution within Work Flow, how does it get the connection string. Should it be passed from the calling program – is passing it as input parameter from the Calling app via the Dictionary object the best way or can the work flow code have visibility to my calling program app.config and get the connection string ?

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

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

发布评论

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

评论(1

阳光下慵懒的猫 2024-09-03 21:24:45

是的,这可以通过多种方式实现。您可以运行附加到工作流中操作的 .net 代码,也可以从 SQL 数据库保存和加载规则。

我会使用 web.config 文件来设置连接信息,但前提是您将工作流程配置为在 Web 服务主机或类似主机内运行。

我会考虑使用一个或多个代码操作来调用 sql 数据库上的存储过程。然后您可以随时自定义这些过程,而无需重新编译。如果需要,您甚至可以启用 CLR。

如果您正在寻找规则引擎,那么这篇文章应该会有所帮助。

http://richardsbraindump.blogspot.com/ 2007/08/如何使用-windows-workflow-rules.html

Yes this is possible in a number of ways. You can either run .net code attached to an action in the workflow, or you can save and load rules from a sql database.

I would use the web.config file for setting connection information, but only if you configure the workflow to run inside a web service host or similar.

I would consider using one or more code actions that call stored procedures on the sql database. You can then customise these procedures at any time without recompilation. You can even enable the CLR if you need to.

If you are looking for a rules engine, then this post should help.

http://richardsbraindump.blogspot.com/2007/08/how-to-use-windows-workflow-rules.html

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