Microflow timer

0
I'm using the microflow timer widget to implement a progress dialog which reports the amount of a task (Java action) has been completed so far as it proceeds. It works like this: When the user asks to perform a long task, a ProgressMonitor is created and populated with information about the task. A ProgressDetail form is presented showing this ProgressMonitor object. On the ProgressDetail form there is a Microflow Timer which is set to go off once per second. There is also a Start button which starts the long process by calling its microflow (we can't start the long process first and then display the ProgressDetail view because then it doesn't appear until after the long process completes). The long process Java action updates the ProgressMonitor object with progress (status and number of items complete). When a timer event fires, it calls a microflow ProgressMonitor_refresh which in turn calls a Java action which works out the percentage done, the time taken so far and forecast time to completion, and so on; and then it calls addRefreshClass and returns, and the microflow refreshes the ProgressMonitor object in the client. Issues: The user can click on the X on the ProgressDetail form and close it. In this case we don't want to start another long process but we do want to reopen the ProgressDetail form for the existing long process, which is (probably) still going on. So, if the user then tries to start the long process again the system checks to see whether there's already a ProgressMonitor object available; and if so it displays it in a ProgressDetail form, instead of starting a new process. The form appears, but it then turns out that, when the user closed the ProgressDetail form, the timer events stopped happening; and showing another ProgressDetail form does not seem to restart them. So the new form never updates. The timer also seems to stop if the long process updates ProgressMonitor through microflow actvities, although it seems fine if it updates them through the set...() methods provided by the object proxy in a Java action. Finally, when the firm is first shown and the long process starts, there seems to be a delay of some seconds (variable) before the timer events actually start. Any help with these issues welcome!
asked
1 answers
0

Issue 2 is probably related to concurrency. Note that an object which is changed, but not committed (which happen when a microflow finishes), cannot be seen by another microflow (that is, its new values). I think issue 1 is one is related to the same concurrency problem.

Issue 3 is to project specific to implement in a generic widget i think

answered