Red Hat Bugzilla – Bug 1003460
Misleading notification about successfull forms generation when generating forms in designer
Last modified: 2015-12-07 06:53:42 EST
Created attachment 792718 [details]
Form generation problem - steps to reproduce
Description of problem:
When generating process and task forms in designer (using 'Generate all forms') the notification "Successfully generated all process and task form templates" appears few seconds after user clicks the button. However the incremental building of starts after that and this can cause problems when user (unaware that incremental build of forms is in progress) leaves the designer to do something else - or logs out.
The problem is more pronounced in cases of processes with more human tasks. For such processes the form generation / incremental building can take minutes, during which there is high probability, that user will go on to do something else.
Please observe the problems that arise in the video of sample workflow (process definition used in the video is also attached). In the sample process attached there is 20 Human Tasks, to highlight the issue. I'm sure, that in business practice the processes with 10 or more human tasks will NOT be uncommon, so this problem is definitely going to arise in practice.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Open designer and import process definition attached.
2. In the menu click the form icon and select item 'Generate all forms'
3. notification 'Successfully generated all process and task form templates.' is displayed
4. Now in the server console you can see, that incremental building of individual task forms starts and takes more than a minute. If during this time the user logs out and tries to log back in various exceptions start to appear in the server log / console.
Notification 'Successfully generated ...' might lead user to believe, that generation process has finished and might lead to user go on with other tasks.
1) At minimum there should be some notification like 'Please wait while generation of process and task forms is in progress'
2) Better yet would be notifications like
'Generating forms: successfully generated form 1 / 20'
'Generating forms: successfully generated form 2 / 20'
3) The application shouldn't break if user goes and does something else (like in the video). For example - in our case we log out and when we log back in, select Authoring > Project authoring, we only see top menus and project explorer doesn't even open, when form generation is in progress.
Created attachment 792719 [details]
Sample BPMN2 process definition to reproduce the problem
I'm not sure the message is really confusing, as the message says the forms were generated, which is also what happened. You are correct that there is another background process also compiling / building any changes, but this is a background task, it is not part of the form generation directly. Afaik, the user should be free to continue with other tasks.
I guess we could consider having messages related to this background tasks (at some point in the future), and they shouldn't block the user operations (like logging out and in shouldn't break anything).
If user actions don't cause any changes to the background tasks, I don't think we need to have messages for them. It sounds like the problem here is that the user taking other action in the system was in fact impacting the background task. Once that is fixed, I would suggest no further messaging about background activity.
Internal Whiteboard: Beta Blocker → Blocker
Not critical for Beta, but need to address for GA
Michael, it seems that the building task (in this case after generating forms) is blocking other UI activity. Is this something you can take a look at?
When any file is added to a project and saved to VFS (as is, I believe, the case with forms) a request to perform an incremental build is submitted; which occurs in the background on a separate thread. Incremental Builds *only* add new/modified/deleted resources to an internal KieBuilder. Incremental Builds *do not* create a new KJAR in the Guvnor Maven Repostitory.
There are a number of things that needs to be understood:-
1) IDK whether the "Successfully generated all process and task form templates" notification is raised when the forms are actually generated or whether Form Builder saves the definition files to VFS and then performs a background generation process?
2) How/where are the generated forms retrieved? If they are loaded from VFS directly then, provided Form Builder has indeed generated the appropriate files, incremental builds should have no impact. If forms are loaded from a KJAR then the forms will not be available in the KJAR until the Project has been "Built and Deployed". IDK whether this is handled by another process withing jBPM somewhere?
Kris, I think we might need to have a hangout with the relevant parties (Designer, Form Builder and me) to understand how the interactions are handled.
Since this is not a blocker, postponing it to 6.0.1.
This issue is no longer relevant for 6.2.0. Even with the 20-human-tasks process the form generation is sufficiently fast (1-2 seconds) which is a big improvement since the times of 6.0 when this issue was reported.