Changes to Flows?

Has something changed with Flows contained within a page? We have a Project that has been using DataTables for over a year, and after the recent update our Flows are not running correctly. There has never been a problem with this previously. With the DataTables we call a Server Action for the data, then on Success it triggers a Flow (to initiate the DataTable) for the DataTable table data. Now we are seeing a delay every five or so page loads which results in an issue whereby ‘No data available in table’ is displayed above the results of the table, which is populated, but is not triggering the Flow correctly, thus DataTables does not function correctly… When we revert to a backup of the Project it works correctly. We just can not pinpoint the issue. It seems the Flow is delayed for some reason? This is intermittent, there are no errors in the console displayed either. Like I say everything works in the backup Project, which was created prior to the most recent update…

Adding a Wait time of 1000 to the Flow execution prior to initiating the DataTable JavaScript seems to have alleviated the issue until it can be diagnosed. Is not a solution as was not a problem before the update of Core Files in 4.8.1 (stable channel). Just wanted to update as may help with debugging the problem?

What does the DataTable JavaScript do, does it depend on some data from App Connect?

All explained here @patrick

We had never experienced any issues up until the most recent release of Wappler, and the upload of new files to the Project host.

So you need to call that function when the data was updated, from which event do you call it?

We call a Server Connect query to populate the data for the table and then on Success we call a Flow to fire the DataTable Javascript function. So there was always a brief delay, milliseconds, then the DataTables functionality would apply to the table. Now (without the delay we added yesterday) every now and again the function is called, it appears, before the data has been loaded, almost as if the Flow is running before the data load for the query has completed. Thus we get the DataTable notice within the table row that ‘No data available in table’. I know there were significant speed improvements in the recent update but its almost as if it is too fast for the Flow…?

It is far from urgent in my case @patrick. Also I’m using a library outside of Wapplers responsibility of course (the same version of DataTables in place before the update as after the update). But for others calling more complex functions they too may have to edit their Flows to include a small delay as they may also fail intermittently?

Instead of using the success event put it on the updated event from the repeater of the table, the updated event is triggered after the DOM has been updated. It seems to me that the datatable script is run to fast, before the DOM was updated. With the new App Connect update the repeater does the DOM update with a small delay so that first all data is being updated and to reduce the number of DOM operations for improved performance.

2 Likes

Thank you will try that @patrick. Much appreciated! I learn something new every day here.