简体   繁体   English

使用WF服务确保可靠性

[英]Ensuring Reliability with WF services

I am new to WF services & just exploring it. 我是WF服务的新手,只是在探索它。

I need to trigger a workflow whenever an item is added to a table. 每当将项目添加到表中时,我都需要触发工作流。

I am seeing a lot of hype about WCF WF service & lets say i go with that option. 我看到了很多有关WCF WF服务的炒作,并且可以说我选择了该选项。 This will be the flow 这将是流

Insert item -> Call the WCF WF service 插入项目->调用WCF WF服务

Calling a service is not always reliable. 致电服务并不总是可靠的。 What if the connection is broken Or someone entered a wrong url in the client config. 如果连接断开或在客户端配置中输入了错误的URL,该怎么办?

In general what is the best practice when using WCF WF. 通常,使用WCF WF的最佳做法是什么。 How can i be assured that the Workflow is indeed triggered. 我如何确保工作流确实已触发。

Re: Someone entered a wrong url in the client config. 回复:有人在客户端配置中输入了错误的网址。 This is a general deployment/ops thing. 这是一般的部署/操作。 No matter what you choose. 无论您选择什么。 If it is configured wrong its not going to work. 如果配置错误,它将无法正常工作。

Re: What if the connection is broken. 回复:如果连接断开了怎么办。 This is also something that can occur but more something the architecture might need to cater for. 这也是可能发生的,但是架构可能需要满足更多的需求。 In general using some kind if persisted message to start the workflow will do the trick. 通常,使用某种持久消息来启动工作流将达到目的。 The easy and inbuilt WCF solution is to use, transaction, MSMQ as a transport. 简便而内置的WCF解决方案是使用,交易,MSMQ作为传输。 That way of the service is unreachable the message will be queued and transmitted later. 这种服务方式无法到达,消息将被排队并稍后发送。 Another option is to store the events in a database table and send them. 另一种选择是将事件存储在数据库表中并发送它们。 If you can send the message successfully then delete the message from the table. 如果您可以成功发送消息,则从表中删除消息。 Basically you are doing manually what MSMQ is doing automatically for you but there some benefits like being able to do request/response and not being depended on a part of Windows that is not installed by default, 基本上,您可以手动执行MSMQ为您自动执行的操作,但是有一些好处,例如能够执行请求/响应,并且不必依赖默认情况下未安装的Windows部分,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM