Closed WilcoHendriksen closed 5 months ago
Sorry for the delay @WilcoHendriksen I have a look into this when all the events are done.
@WilcoHendriksen I have looked into this. But You cannot create a unique runID or something and put it in the run table or session table. This because the sessions are runned in a new session and you cannot pass the runId to it. Also not with a singleinstance codeunit. Or you have to store it in the isolated storage. But I think that isn't a good practice.
What you can do to query the run table if everything is exported every minute. Or (I added this in a seperate branche) you can query the currentsessions API if that table is empty then everything is exported. You can do it with the do until loop in Power Automate.
In the "ADLSE Execution".StartExport method the
OnAllExportIsFinished
is added, I think this event is triggered too fast, because the sessionmanager starts background sessions. So they are all "scheduled" but not finished. Maybe its better to call it OnAllExportAreScheduled?I like the idea to have an event when everything is finished. Maybe we could add a RunID in the "ADLSE Run" table, so we can check every x seconds if the scheduled sessions per RunID have been exported successful.