Renegade
30th August 2023, 09:52
It's 10.8 LN Cloud. Developed a Custom BOD based on a custom 'tx' table; and triggering BOD.Publish from table extension script every time there is Add, Change or Delete. Sync BODs are not getting generated. Upon debugging, I get "source for component 'tcextbodapi' could not be found"; otcextbodapi declared though.

Has anyone faced this before?

OmeLuuk
30th August 2023, 11:24
... Sync BODs are not getting generated.... I wonder, do you have an ION flow active? Otherwise fake subscription by adding a record in tlesb300... Upon debugging, I get "source for component 'tcextbodapi' could not be found";...Yup. You are not allowed into the kitchen of Infor: do not have the sourcecode of this component otcextbodapi declared though.which is the compiled version.

Renegade
30th August 2023, 15:09
tlesb300 is populated already, as i see. And i have an active data flow. Problem happens even before the BOD is triggered.
Actually because the standard BOD for tcmcs048 does not include all fields, and that the BOD has no User Area, I mirrored this table to a tx table and build a BOD just to sync out when there is change/Add/delete.

And as far as I know, this is the script sitting in table extensions that invokes the BOD publishing, also listed as Public Interface documentation

r = BOD.Publish(
"Txmon048BOD", |i.noun,
"txmon048", |i.bod.table,
mode=DAL_NEW?"Add":"Change", |i.action.code,
0, |i.bod.entity.type,
"", |i.bod.entity.code,
txmon048.cpcp,
"StageOrPublish",
l.exception.message,
l.exception.id,
txmon048.cpcp
)
And BOD.Publish is implemented in otcextbodapi so it has to be declared. Error pops when cursor hits line with DAL_NEW

Any help appreciated. Is it possible to extend a standard BOD to include 'User Area'? That would be a good idea if possible. Thanks

OmeLuuk
31st August 2023, 11:09
Ah, now we are talking...
tlesb300 is populated already, as i see. That is good, I assume you mean that there is (also) a record for your BOD, caused by:And i have an active data flow. Problem happens even before the BOD is triggered.
Now it is to see what your problem exactly is.
1) No source code: as indicated before, that is not an error but a feature. The debugger states you cannot find the source so stepping into the BOD.Publish define/function is not possible. So we put that aside.
2) Actually because the standard BOD for tcmcs048 does not include all fields, and that the BOD has no User Area,Now let's move into this statement. Which component do you take for "The standard BOD for tcmcs048"? I only found a BDE CostComponent(_v2) [tcmcs070/tcmcs071] on my system... No mentioning of tcmcs048 in the "Infor LN - June 2023, Inbound BOD Mapping and Descriptions"...
Did you try to "Extend" the BDE CostComponent_v2? Or the .found.by.you. standard BOD for this table?I mirrored this table to a tx table and build a BOD just to sync out when there is change/Add/delete. To me this indicates that you want to go the extra mile to get this done. So why not take another direction? Like I worked out here before: (and you have seen that before) (http://www.baanboard.com/baanboard/showpost.php?p=221659&postcount=14) In that way you can create your own BOD on the standard table interfacing all needed fields. And yes, I am aware that such interface needs modelling to get the complete set of data as used in LN (due to normalization) to make it a nice complete set in LNAnd as far as I know, this is the script sitting in table extensions that invokes the BOD publishing, also listed as Public Interface documentation

r = BOD.Publish(
"Txmon048BOD", |i.noun,
"txmon048", |i.bod.table,
mode=DAL_NEW?"Add":"Change", |i.action.code,
0, |i.bod.entity.type,
"", |i.bod.entity.code,
txmon048.cpcp,
"StageOrPublish",
l.exception.message,
l.exception.id,
txmon048.cpcp
)Looks quite similar to what I posted here. (http://www.baanboard.com/baanboard/showpost.php?p=220156&postcount=1194])
And BOD.Publish is implemented in otcextbodapi so it has to be declared. Error pops when cursor hits line with DAL_NEWMaybe you should try the construction I used in the forementioned post (see the After.Save code part) (http://www.baanboard.com/baanboard/showpost.php?p=220156&postcount=11)

Any help appreciated. Is it possible to extend a standard BOD to include 'User Area'? That would be a good idea if possible. ThanksSure too, you can add calculated fields for both input and output, but you must take care of the mapping to LN fields by update queries or DLL function calls yourself (this should not surprise you)

Renegade
31st August 2023, 12:49
Many thanks!
Yesterday night, i found that tcbod0299m000 has to be used for BOD Publish in my case and it seems it is no longer a practice to invoke BOD from DAL extension of table. Not yet done as am working with xsd/xml still. Then i can try publishing using tcbod0299m000.

Cost component is part of 'CodeDefinition'. You'll notice that it only has cpcp and dsca and not the rest. Also, no UserArea.

I will definitely look into referred threads...it's better and cleaner to extend an existing BOD. feel good.. thanks!

OmeLuuk
31st August 2023, 13:08
In the standard BOD add the component CodeDefinitionBOD, add the hook "Add Calculated Fields" and "Process Inbound User Area"

You can use AddXML or AddValue to add Calculated Fields and call DLLs (declared in the Declaration section) or functions (in the Functions section) to process the incoming data.

OmeLuuk
31st August 2023, 13:32
I found that tcbod0299m000 has to be used for BOD Publish in my case and it seems it is no longer a practice to invoke BOD from DAL extension of table.Can you be more specific about this? Where did you get that information? And why?

Because we use bod.publish (as LN Public Interface) a lot (and do not have tcbod0299m000), or we do use functions like tcint.dlltcbod.publish.item.master.common.replace().

Note that we have some custom BODs but most important interfacing we do with BOD extension of standard BODs for which (as the name suggests) "Publish Custom BOD Data" [tcbod0299m000] would not apply...

OmeLuuk
31st August 2023, 14:48
Because we use bod.publish (as LN Public Interface) a lot (and do not have tcbod0299m000), or we do use functions like tcint.dlltcbod.publish.item.master.common.replace().I saw a movie on this session (on introduction in 2020) and now I see it is nice to have in case of troubleshooting, but not intended for daily use.

It is intended to be able to fire (data load) your home made BODs all in one action, but not on change of data for each current changed record, as can be done in a DAL extension with BOD.Publish().

Renegade
5th September 2023, 03:18
The reason I might have to use tcbod0299m000 is because all my active components are in tx package - tables, generated dlls, BOD;

I am unable to separate the component within CodeDefinition BOD that publishes cost component. Tried randomly but getIdentifiers is never getting hit in debugger. So, unable to find. If you can, please let me know. The same would be needed even if I were to extend a BOD with a new component. Maybe I should ask Infor? The BOD being published lacks UserArea. Are you sure we can still use addXML or aDDValue to add nodes and values and get BOD stretched?

I will have to refer your other threads-

OmeLuuk
6th September 2023, 10:54
The reason I might have to use tcbod0299m000 is because all my active components are in tx package - tables, generated dlls, BOD;I think I have to disagree, but not sureI am unable to separate the component within CodeDefinition BOD that publishes cost component. Tried randomly but getIdentifiers is never getting hit in debugger.In the CodeDefinition BOD add Calculated Fields section and use something likerbl = getTableIdentifiers.ItemMasterCommonBOD(input.xml)
l.item = getIdentifierValueFromIdentifierStructure(input.xml,"tcibd001","item")
So, unable to find. If you can, please let me know. The same would be needed even if I were to extend a BOD with a new component. Maybe I should ask Infor? The BOD being published lacks UserArea.I am pretty sure that is added with the CalculatedFields hook Are you sure we can still use addXML or aDDValue to add nodes and values and get BOD stretched?I am pretty sure indeed.I will have to refer your other threads-Would be nice.

Renegade
6th September 2023, 11:15
I have used gettableidentifiers before.

on BOD extension of CodeDefinition i have the below line

long header.xml, ret
ret = getTableIdentifiers.CodeDefinitionBOD(header.xml)

But when debugged, the line never gets hit.

OmeLuuk
6th September 2023, 11:33
...on BOD extension of CodeDefinition i have the below linelong header.xml, ret
ret = getTableIdentifiers.CodeDefinitionBOD(header.xml)Where exactly? Like so?
But when debugged, the line never gets hit.How do you debug? What is the BOD trigger? You use BW and tlbct3232m000?

Renegade
6th September 2023, 12:42
i did a bw trace and found below line:

tcbod.dll0001.publish.bod(i.noun="CodeDefinitionGeneralBOD",i.bod.root.table="tcmcs048",i.action.code="Add",i.bod.entity.type=0,i.bod.entity.code="",i.document.id="105",i.batch.bod=0,i.batch.id="",i.batch.sequence=0,i.batch.size=0,i.processing.action="StageOrPublish",[VarArg string]="105 ") (in object otcboddll0001)

CodeDefinitionGeneralBOD is the one! And now the debugger of extension got hit. dont know why not before and why noww!

And it turned out it indeed has UserArea. Humbling experience. Nevertheless, I see there are other requirements. Like LN only has BOD to publish Fiscal Period but not Reporting or Tax Period. I'll have to try to add Component to an existing BOD instead of going 'tx' way.

Renegade
6th September 2023, 14:02
tlbct3232m000, in my perception, is only for testing incoming BOD and not Sync BODs. is that so?

OmeLuuk
6th September 2023, 17:53
i did a bw trace and found below line:

tcbod.dll0001.publish.bod(i.noun="CodeDefinitionGeneralBOD",i.bod.root.table="tcmcs048",i.action.code="Add",i.bod.entity.type=0,i.bod.entity.code="",i.document.id="105",i.batch.bod=0,i.batch.id="",i.batch.sequence=0,i.batch.size=0,i.processing.action="StageOrPublish",[VarArg string]="105 ") (in object otcboddll0001)

CodeDefinitionGeneralBOD is the one! And now the debugger of extension got hit. dont know why not before and why noww!

And it turned out it indeed has UserArea. Humbling experience. Nevertheless, I see there are other requirements. Like LN only has BOD to publish Fiscal Period but not Reporting or Tax Period. I'll have to try to add Component to an existing BOD instead of going 'tx' way.Extending the existing BOD is done in TX as well. So "save" over updates until Infor starts to default a next version BOD (the _vX part)...
But great that you made some progress.

OmeLuuk
6th September 2023, 17:56
tlbct3232m000, in my perception, is only for testing incoming BOD and not Sync BODs. is that so?I quess not. I use it to debug BDE calls as well, but when talking about a BOD, I think you may be right. We did not yet manage to create a route for BODs flowing into our system... we use BDE (c4ws) to receive calls.

Renegade
7th September 2023, 11:22
LnMessage only publishes Fiscal Period and not Reporting or Tax Period. Possible to add a BOD Component? Does it involve generating libraries or everything done in Extensions.
Thanks

OmeLuuk
7th September 2023, 13:32
LnMessage only publishes Fiscal Period and not Reporting or Tax Period.I would advice: ask Infor Support. There are documents on BODs, information content etc.Possible to add a BOD Component?You can always extend an existing BOD component. Adding new BOD should also be possible. I have done that in LN Studio.Does it involve generating libraries or everything done in Extensions.Creating new ones, from the Integration Perspective are generated in LN Studio. In the Extension Modeler they are also generated on top of the (standard) DLLs (which are left untouched, like in the normal events, extra hooks are added and called in the extension)
ThanksYou are welcome.

Renegade
7th September 2023, 14:24
I have started PeriodStatusBOD in Studio. It's a Sync. Refer attached. Mapped to tfgld007 in 'Interface Implementation'; Is hook necessary? When I generate libraries, it will try to do it in tf package now, which will not work. How to get around? I am reading Studio integration guide.

Regular 4GL support does not seem to know this field of work. Partner support wants to convert this to consulting opportunity for themselves. Reason why I am trying my best, myself!

OmeLuuk
7th September 2023, 15:22
So you are on your own. Been there done that. But mine is on prem.
With Is hook necessaryyou mean a trigger to send out the BOD on change of record? Not sure about that. I think you may need a table extension in tx to address your BOD in tf.