Article Details
Id:21524
Product:finPOWER Connect
Type:FIX
Version:4.01.01
Opened:05/06/2024
Closed:12/06/2024
Released:24/06/2024
Job: J033647

Background Processes; Process could incorrectly fail after 10 minutes if the HTML Widget remained open

The following error was presented to Users running a Background Process if:

  • There was at least 10 minutes between Status Messages, and,
  • The initiating HTML Widget was left on the Progress page (where the Status Messages are displayed)

Status was not updated for 600 seconds indicating that this Background Process has most likely been aborted.

There were a couple of major issues with this.

Status Messages were ignored in the 600 seconds check

The system in place to measure if 10 minutes had passed relied on the entry date / time of the Status Messages. The entry date was not being written, so this error would always be hit for processes which took longer than 10 minutes to run, and if the HTML Widget was left on the Progress page.

600 seconds (10 minutes) was not long enough

Take Account Processes for example - for databases which process more than 1,000 Accounts during Account Processes, each Account is not displayed as a Status Messages for efficiency reasons. It was conceivable that each section would take longer than 10 minutes, which would incorrectly trigger this error.

Therefore, the following behaviors have changed / fixed:

  1. The entry date of Status Messages are now correctly stored.
  2. The 10 minute limit has been increased to 1 hour.
  3. finCloudConnectProcessStatus.KeepAlive() has been exposed to Scripting.
    1. This allows developers writing custom HTML Widgets which run as Background Processes to manually call the KeepAlive() function, which prevents this error from triggering if Status Messages are not desired. Note: The KeepAlive() function is already called from the internal functions to add Status Messages.

Please note:

  • This error was only ever produced if the HTML Widget was left open on screen. If the HTML Widget was closed, it would not be triggered, even if the Process continued processing in the background.
  • Even after the Background Process was flagged as failed for this reason, it would continue to run in the background and potentially succeed - but the User would never know this as nothing would be flagged or emailed to suggest the process did actually finish successfully.