BizTalk 映射在转换开始时不调用脚本 functoid 使用的帮助程序类的默认构造函数

发布于 2024-12-22 04:50:28 字数 309 浏览 2 评论 0原文

我在地图中使用脚本 functoid。我使用可序列化类的外部程序集帮助器方法配置了脚本 functoid。我注意到,当第一次执行映射时,然后调用外部程序集中定义的可序列化辅助类构造函数,并且我正在初始化。类成员的默认值并按预期​​工作。

在下一次/第二次运行中,类构造函数不会被映射调用,并且类成员会保留上次执行映射期间设置的值。我在编排中使用地图,但我的编排不是单一的。因此,每次第一次执行我的地图后,辅助类总是向脚本 functoid 返回相同的值。

请帮助我如何强制 biztalk 在每次地图执行期间创建地图助手类的新实例???

I'm using script functoids in my map. I configured script functoids using external assembly helper method of serializable class. I noticed that when map executes first time then calls Serializable helper class constructor defined in external assembly and I'm init. default value of class members and works as expected.

In next/second run, class constructor does not get called by map and class members persist value set during last execution of map. I'm using map inside orchestration and my orchestration is not singelton. So, helper class always returning same value to script functoid every time after first execution of my map.

Please help me how to force biztalk to create new instances of map helper class during every map execution???

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

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

发布评论

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

评论(2

压抑⊿情绪 2024-12-29 04:50:28

BizTalk 运行时缓存给定映射类型的扩展对象实例。对于每个使用它的主机实例,构造函数只会被调用一次。

但是,您可以为地图助手创建一个工厂类。从脚本 functoid 调用此工厂类,并将输出链接到内联 C# functoid,该内联 C# functoid 将对象存储在映射的实例字段中。您可以在需要调用帮助器上的方法的其他脚本 functoid 中引用该字段。

The BizTalk runtime caches the extension object instances for a given map type. The constructor will only be called once for each host instance that's using it.

You can, however, create a factory class for your map helper. Call this factory class from a scripting functoid and link the output to an inline C# functoid that stores the object in an instance field in the map. You can the reference that field in other scripting functoids that need to call methods on your helper.

山川志 2024-12-29 04:50:28

请参阅有关 Biztalk 外部程序集的帖子调用。您不能拥有静态类 - 辅助方法必须是静态的,但您需要每次在静态方法中执行初始化。这样做是为了补水/脱水期间的状态管理。

See this post regarding Biztalk external assembly calls. You cannot have a static class - the helper method must be static, but you need to perform your initializations each time in the static method. This is done for state management during rehydration/dehydration.

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