Bug 1002054 - If simulation engine failed then regular user does not know why
If simulation engine failed then regular user does not know why
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Designer (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity medium
: ER5
: 6.0.0
Assigned To: Maciej Swiderski
Sona Mala
:
Depends On:
Blocks: bpms6_ux/brms6_ux
  Show dependency treegraph
 
Reported: 2013-08-28 07:55 EDT by Sona Mala
Modified: 2014-08-06 16:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:07:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
BPMN2 definition (18.23 KB, application/xml)
2013-08-28 07:55 EDT, Sona Mala
no flags Details

  None (edit)
Description Sona Mala 2013-08-28 07:55:48 EDT
Created attachment 791350 [details]
BPMN2 definition

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

How reproducible:


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;
5. Validate
6. Run Simulation for 10 process instancies and interval 2 minutes
  

Actual results:
---------------
Step 2. - Simulation return result, diagrams are available.
Step 5. - Validation is ok.
Step 6. - Alert "Simulation engine did not return results."; 

Server.log:
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!!!!


Expected results:
-----------------
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


Additional info:
I know that input for Script's properties are invalid, but point is that users should know why simulation engine failed.
Comment 1 Kris Verlaenen 2013-09-16 11:29:28 EDT
An appropriate warning should be shown if the process is not valid yet.
Comment 2 Prakash Aradhya 2013-09-16 17:55:49 EDT
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
Comment 6 Maciej Swiderski 2013-10-15 02:32:40 EDT
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.

jbpm-designer
master
https://github.com/droolsjbpm/jbpm-designer/commit/7aca544236890cf0f0c48a5f8f28a35776f9149c

6.0.x
https://github.com/droolsjbpm/jbpm-designer/commit/794e0acbf9e599c7bdcb0c3536997ccece735c6b
Comment 7 Sona Mala 2013-12-18 03:43:03 EST
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.

Note You need to log in before you can comment on or make changes to this bug.