简体   繁体   English

验证业务流程中的消息或接收端口

[英]Validating messages in an orchestration, or receive port

I've been working under the assumption that a message entering an orchestration was validated against the messages schema, only to realize recently that this is not the case. 我一直在假设针对业务流程输入的消息已针对消息模式进行了验证,只是最近才意识到事实并非如此。 There doesn't appear to be a validate shape, so I'm wondering if there is a clean reusable pattern out there to implement this? 似乎没有一个有效的形状,所以我想知道是否有一个干净的可重用模式来实现这一目标?

You can validate the messages on an XMLReceive pipeline, but unfortunately this requires specifying the DocumentSpecNames which can detract from the flexibility of the receive. 您可以在XMLReceive管道上验证消息,但是不幸的是,这需要指定DocumentSpecNames,这可能会降低接收的灵活性。

A workaround is to use a custom " ValidatingXmlPipeline " and add the XMLValidator pipeline component to it. 一种解决方法是使用自定义“ ValidatingXmlPipeline ”并将XMLValidator管道组件添加到其中。

As per your original question, there is a config setting in btsntsvc.config under Debugging called ValidateSchemas when message variables are assigned. 按照您的原始问题,分配消息变量后, btsntsvc.config “调试”下有一个名为ValidateSchemas配置设置 I can't say I've used this as it will probably impact performance. 我不能说我已经使用了它,因为它可能会影响性能。

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

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