本文介绍了NEXTVAL用于复合操作中的父/子插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用BizTalk 2009和Oracle,我将X12 834 EDI文档分解为一组关系表,其中包含父表和一组相关的子表。 每个X12事务映射到父表中的单个行。 我想使用Composite操作在单个事务中处理整个文件。 我遇到的问题是父表的PK应该由Oracle SEQUENCE对象生成。 我无法找到一种有效的方法来获取NEXTVAL操作的结果,以便在地图中使用。 团队成员建议我们可以编写一个从脚本functoid调用的.NET组件,以便检索NEXTVAL调用的结果。 虽然功能正常,但这需要我们为进行NEXTVAL呼叫所需的Oracle凭证创建一个单独的存储机制(与SendPort分开)。 我已经看到另一篇文章描述了一个隐藏存储过程背后的机制的实现,但这涉及通过SP发送XML文件,这对于大型EDI文件来说似乎非常不切实际。

因此我的问题...为父表生成PK值的首选方法是什么?参与具有一组子表的复合操作?

解决方案

With BizTalk 2009 and Oracle, I'm decomposing an X12 834 EDI document into a set of relational tables, with a Parent table and a set of related Child tables.  Each X12 transaction maps to a single row in the Parent table.  I'd like to use a Composite operation to process the entire file in a single transaction.  The problem I'm having is that the PK of the Parent table should be generated by an Oracle SEQUENCE object.  I cannot figure out an efficient way to get the result of the NEXTVAL operation for use in the map.  A team member has proposed that we could write a .NET component that is called from a Script functoid in order to retrieve the result of the NEXTVAL call.  Although functional, this involves having us create a separate storage mechanism (separate from the SendPort) for the Oracle credentials needed to make the NEXTVAL call.  I've seen another post describing an implementation that would hide this mechanism behind a stored procedure, but that involves sending an XML file via the SP, which seems highly impractical for large EDI files.

Thus my question...what's the preferred method for generating PK values for a Parent table that's to be involved in a Composite operation with a set of Child tables?

解决方案


这篇关于NEXTVAL用于复合操作中的父/子插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 05:30