Bertverbeek4PS / bc2adls

Exporting data from Dynamics 365 Business Central to Azure data lake storage or MS Fabric lakehouse
MIT License
49 stars 20 forks source link

Expand business central external business events #24

Closed Arthurvdv closed 1 year ago

Arthurvdv commented 1 year ago

Related to https://github.com/Bertverbeek4PS/bc2adls/issues/22.

Would like some feedback on these points.

Export ended codeunit 82561 "ADLSE Execute"

local procedure SetStateFinished(var ADLSETable: Record "ADLSE Table"; TableCaption: Text)
...
    if not ADLSECurrentSession.AreAnySessionsActive() then begin
        ADLSEExternalEvents.OnExportRunEnded(CurrentDateTime());

When executing a Export, I've noticed that the event fires more then one. It seems that the background sessions are ready earlier then the StartExport could create new ones. So on these lines of code I somehow should know that the StartExport method is still running, but both of them are running in a different session. I would like to prevent writing a status to a table to mitigate performance en possible lockings.

Environment It could be confusing to have two parameters with the name Environment. Both of them serve a different purpose, so I guess it would be an issue? image