Skip to main content

Hi,

In a windows gui we cannot have a subflow (some API calls which can take a few seconds) in a manually started processflow, so we have made a systemflow starting this subflow based on a queue table.

From the client, we have a task starting a processflow that inserts a record in the queue table, and then system flow will execute. During the execution, I want to disable the task-button and when the systemflow is finished I want to refresh the table so the user sees the new information.

In the queue we have a processed bit, so it’s possible the processflow progress. When the processed bit is set, we can finish the processflow. Using waitfor delay seems to freeze the whole application.

Is it possible to pause or temporarily loop a processflow, without freezing the app?

 

 

Hello @Tejo van de Bor,

I think you can get pretty close to your desired situation with the following steps:

  • Don't use waitfor delay in the process flow, as this will indeed freeze the application. The process flow should simply finish after inserting the record in the queue table. In fact, you might not even need a process flow at all, but that depends on what else this process flow does right now.
  • Use the Change detection feature to automatically refresh the table when the table data has changed.
  • You can use a context procedure to disable the task, but this would require the task to refresh the subject as well, even though the system flow will not have finished yet. Furthermore, this will only disable the task for that user in that GUI. If someone else already had the subject opened in their GUI, they would still be able to run the task. I think it would be smart to have the task itself check if it is allowed to run again (perhaps based on the parameter values) and if not, send an informative message to the user. This way, you could even omit the subject refresh and context procedure entirely, but perhaps a combination of both would lead to the most user friendly result.

I hope this helps.


Thanks @Vincent Doppenberg , I added the change detection and this works for now. For the button I added a check in the task if an earlier request already has been sent. Maybe an extra field with some in-between-status information so the user sees something happing when clicking the button :-)