Red Hat Bugzilla – Bug 1002054
If simulation engine failed then regular user does not know why
Last modified: 2014-08-06 16:07:16 EDT
Created attachment 791350 [details]
Description of problem:
All informations about failures of simulation engine are shown in server.log but not as alerts or validation issues.
Version-Release number of selected component (if applicable):
BPMS 6.0.0 ER1
Steps to Reproduce:
1. Import the attached process
2. Run Simulation for 10 instancies and interval 2 minutes
3. Validate process
4. Fix validation issues:
-> Add script to "Decission" task: myVar = new Random().nextInt(10);
-> Add conditions to gateway's flows: myVar < 5; myVar > 4;
6. Run Simulation for 10 process instancies and interval 2 minutes
Step 2. - Simulation return result, diagrams are available.
Step 5. - Validation is ok.
Step 6. - Alert "Simulation engine did not return results.";
Process Compilation error : org.drools.compiler.lang.descr.ProcessDescr@73ebf723
org/jbpm/Process_org_jbpm_simTest1069076629.java (8:346) : Random cannot be resolved to a type
org/jbpm/Process_org_jbpm_simTest1069076629.java (14:586) : Syntax error on token ">", invalid AssignmentOperator
org/jbpm/Process_org_jbpm_simTest1069076629.java (20:808) : Syntax error on token "<", invalid AssignmentOperator
An user which has not access to server.log has no idea about problems!!!!
There are two options:
- validation shows, that scripts are invalid
- propagate errors from server.log to alerts:
-> Task "Decission", property "Script": Random cannot be resolved to a type
-> Sequence flow "", property "Condition Expression": Syntax error on token ">", invalid AssignmentOperator
-> Sequence flow "", property "Condition Expression": Syntax error on token "<", invalid AssignmentOperator
I know that input for Script's properties are invalid, but point is that users should know why simulation engine failed.
An appropriate warning should be shown if the process is not valid yet.
This has to be fixed for GA. Show valid message. Places where appropriate message cannot be shown, bring up a error message redirecting users to refer to logs or administrator.
Internal Whiteboard: Beta Blocker → Blocker
Not critical for Beta, but need to address for GA
Some time ago, simulation was equipped with its own validator instead of using the one provided by runtime engine that requires quite few execution details which are required to run the process but they are not required for simulation. Thus simulation validator is much less restrictive as it mainly relies on simulation properties. Although since modeling in designer triggers regular build there might be errors stored in Problems Panel but simulation is independent of these.
Moreover error handling has been improved to display error message to the user using the flyover notifications, in addition it is now marked as red notification indicating an error and might be kept visible by moving mouse over it.
I am not able to find situation when the simulation fails. (for ER5)
There was only one situation when Simulation Engine fails and it returns NPE so the alert is "Simulation engine did not return results: No Content". I assume that Simulation Engine propagates exception message. The problem is that it still says nothing in particular issues. We will solve it separately, so I will create a new bugzilla issue.
The other problem is that invalid processes (marked by designer's validation) are able to run and Simulation Engine returns unexpected results. I will create a new bugzilla issue.