BizTalk 映射、嵌套元素集合、需要帮助
我有一个包含订单详细信息的架构。 在该架构中,我有一个行项目集合,其中包含订单中每个项目的详细信息。 架构类似于以下结构。
Order
SaleItems
SaleItem
OrderID
Price
Quantity
etc.
我有一个要求,如果 SaleItem 中的数量大于 1,则应创建另一个订单项,并在订单项之间划分价格,例如:
Order
SaleItems
SaleItem
OrderID 1234
Price 99
Quantity 3
应该导致在输出中创建以下内容:
Order
SaleItems
SaleItem
OrderID 1234
Price 33
Quantity 1
SaleItem
OrderID 1234
Price 33
Quantity 1
SaleItem
OrderID 1234
Price 33
Quantity 1
可以是Biztalk 大师建议实现这一目标的最佳方法是什么? 我不知道是否最好在具有某些功能的地图中执行此操作,如果是,则在地图中放入什么内容,或者在具有某些自定义的编排中执行 IF Quantity > > 。 1 逻辑。 也许我在这里错过了一些非常简单的东西,但我们将不胜感激地收到任何帮助。
理查德
I have a schema that contains the details for an order. Within the schema, I have a collection of line items containing details of each item within the order. Schema is similar to the following structure.
Order
SaleItems
SaleItem
OrderID
Price
Quantity
etc.
I have a requirement that if the Quantity within SaleItem is more than 1, that another line item should be created and the price be divided between the line items, so for example:
Order
SaleItems
SaleItem
OrderID 1234
Price 99
Quantity 3
Should result in the following being created in the output:
Order
SaleItems
SaleItem
OrderID 1234
Price 33
Quantity 1
SaleItem
OrderID 1234
Price 33
Quantity 1
SaleItem
OrderID 1234
Price 33
Quantity 1
Could any of you Biztalk guru's advise one the best way to accomplish this? I don't know if it would be best to do it in a map with some of the functiods and if so what to put in the map, or in an orchestration with some custom to do the IF Quantity > 1 logic. Maybe I'm missing something very simple here, but any help would be gratefully recieved.
Richard
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将该转换编写为自定义 XSLT,然后让 Biztalk 使用它来执行转换。
You can write that transformation as a custom XSLT and then get Biztalk to use that to do the transformation.
您没有提到使用此映射的场景,如果您需要在编排内进行此转换,那么最简单、最快的解决方案将是使用带有序列化消息的 .NET 帮助器类。 这样你就可以做你提到的如果数量>的事情。 1...逻辑类型。 我确信您也能够在地图中实现这一目标,但需要使用 BizTalk 映射器或进行一些自定义 XSLT 开发。 如果您计划在港口使用地图,您可能需要选择后面的路线。
华泰
You didn't mention the scenario where this map will be utilized, if in case you need this conversion inside an orchestration, then the easiest and quickest solution will be to utilize the .NET helper classes with serialized messages. In that way you can do, what you have mentioned if qty > 1...type of logic. I'm sure you'll be able to achive this in the map as well, will require some fidling with BizTalk mapper or some custom XSLT development. You may need to choose the later route if you are planning to utilize the map in your ports.
HTH