0

我在 Workflow Services 上看到的大多数示例都将活动置于 Receive 和 SendReply 活动之间。但是,如果活动需要很长时间才能完成服务超时。我可以增加超时时间或将活动放在 SendReply 之后。是否有关于在哪里开展这些活动的最佳做法?

4

1 回答 1

3

无需保留接收和发送回复之间的所有活动。您的活动将在完成 SendReply 活动后执行。对于日志运行进程,发送回复可以发送与服务启动或任何异常相关的客户端消息。工作流程将在发送回复完成后执行。

你可以按照这个方法..

1. Put receive activity  as first activity on the workflow.
2. Apply validation on Data contract used as argument.
3. Put a code activity that can set WorkflowinstanceID  in out parameter that can return as response from send reply. This is can
be used to control Workflow.
4. Add another send reply by right click on Receive activity, return response if any validation faults occur.
5. Put rest of activity below of send reply configure service behavior for any unhandled exception.
于 2012-07-04T06:14:46.510 回答