srprks
18th May 2021, 18:33
Hi All,

I have a requirement, where I need to merge or concatenate two different BODS.

For Example:

I have two Service Orders and I am publishing the Service Transactional data through Publish BOD session. So there would be n no. of BODs would generate for n no. of Service Orders. So I need to merge them to a single file and map to the required BOD format.

Thanks,

srprks
20th May 2021, 14:27
Hi,

Any suggestions or any input if someone has, please share!!

Thanks

OmeLuuk
25th October 2021, 15:51
Not sure where you "are" in this process, but are you talking about LN Studio??
I think I saw you can combine different BII's into one by "consuming", merging two BODs effectively into one.

Or talking from the Dataflow perspective? I am not sure if this can be done, since only a splitter is available not a "merger"...

OmeLuuk
6th April 2022, 00:08
A bit further now in our own way through the BOD/BDE world and found this interesting option: In a BOD Extension you can quite easy call a BDE, put its result in an XML and merge that XML into the BOD result...

| If there is no BDE show request yet? Create it!
if in.xml = 0 then
in.xml = xmlNewNode("ShowRequest") | showrequest
da.xml = xmlNewNode("DataArea", XML_ELEMENT, in.xml) | container
endif
if in.xml <> 0 then | Add: bpid from interface in request
req.xml = xmlNewNode("MyBDEname", XML_ELEMENT, da.xml)
ret = xmlRewriteDataElement(req.xml, "BDEidentifier", trim$(Identifier))
endif
if in.xml <> 0 then | we gathered a request
| Call the Show command, add result or error into pending response
ret = tlbct.disp_impl.invoke.bde.method("MyBDEname", "Show", in.xml,
out.xml, res.xml)
if ret = 0 then
if (out.xml <> 0 and xmlGetNumChilds(out.xml) <> 0) then
addXml(xmlFindFirst("BDEidentifier", out.xml, 0))
endif
else
if (res.xml <> 0 and xmlGetNumChilds(res.xml) <> 0) then
addXml(xmlFindFirst("Result", out.xml, 0))
addXml(xmlFindFirst("BDEidentifier", out.xml, 0))
endif
endif
endif

if in.xml <> 0 then
xmlDelete(in.xml)
in.xml = 0
endif
if out.xml <> 0 then
xmlDelete(out.xml)
out.xml = 0
endif
if res.xml <> 0 then
xmlDelete(res.xml)
res.xml = 0
endif


In this way we can add all kind of BDE call-results into a BOD