Bug 1134711 - Using JBDS process designer, user can set boundary error event without validation error, but the process will throw Exception at runtime
Summary: Using JBDS process designer, user can set boundary error event without valida...
Status: VERIFIED
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Eclipse Tooling
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Kris Verlaenen
QA Contact: Jozef Marko
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-28 07:24 UTC by Hisao Furuichi
Modified: 2018-12-06 17:53 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)
resources for this ticket (337.39 KB, application/octet-stream)
2014-08-28 07:59 UTC, Hisao Furuichi
no flags Details
processes, source code and output (5.47 KB, application/zip)
2015-01-30 11:48 UTC, Jozef Marko
no flags Details

Description Hisao Furuichi 2014-08-28 07:24:41 UTC
Description of problem:
Using JBDS process designer, user can set a boundary error event without validation error. However when user starts the process, following ERROR is thrown:

===
java.lang.IllegalArgumentException: Cannot add asset: unable to parse xml : Exception class java.lang.NullPointerException : null,
	at org.jbpm.runtime.manager.impl.SimpleRuntimeEnvironment.addAsset(SimpleRuntimeEnvironment.java:111)
	at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:281)
	at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:56)
	at org.jbpm.test.JbpmJUnitBaseTestCase.createRuntimeManager(JbpmJUnitBaseTestCase.java:308)
	at org.jbpm.test.JbpmJUnitBaseTestCase.createRuntimeManager(JbpmJUnitBaseTestCase.java:235)
	at org.jbpm.test.JbpmJUnitBaseTestCase.createRuntimeManager(JbpmJUnitBaseTestCase.java:217)
	at com.sample.ProcessTest.testProcess(ProcessTest.java:17)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
===

The business process is attached as jbds_bad.bpmn. Also please take a look at attached screenshot, evidence1.png.
The root cause of the Exception was "Target" should be defined for boundary error event. If user set it, business process is executed without any error. I attached modified one as jbds_good.bpmn, and screenshot as evidence2.png.

This is quite hard for user to realize it. If none of process variable is defined, select bar named "Target" is blank.  So user thinks they don't have to set it. In addition to it, process validation doesn't alert it.

One of Red Hat customer suggests following choice to avoid this trouble:
1: If "Target" is not selected by user, designer will automatically define and set variable
2: Process validation will alert that "Target" is not selected
3: Run time error will explain that "Target" is not set. ("Cannot add asset: unable to parse xml : Exception class java.lang.NullPointerException" is hard to realize the root cause)
4: As "Error" table has, add clickable "plus button" next with "Target". So user can realize that it is necessary to define it. Also usability will be improved

Version-Release number of selected component (if applicable):
- JBoss Developer Studio 7.1.1
- jbdevstudio-integration-stack-updatesite-7.0.2.GA
- JBoss BPM Suite 6.0.2

Steps to Reproduce:
1. Define business process like attached files(jbds_bad.bpmn, evidence1.png)
2. Start process

Actual results:
NullPointerException will be thrown

Expected results:
Request one of those fix:
1: If "Target" is not selected by user, designer will automatically define and set variable
2: Process validation will alert that "Target" is not selected
3: Run time error will explain that "Target" is not set. ("Cannot add asset: unable to parse xml : Exception class java.lang.NullPointerException" is hard to realize the root cause)
4: As "Error" table has, add clickable "plus button" next with "Target". So user can realize that it is necessary to define it. Also usability will be improved

Additional info:
Web designer has different user interface. Although I only set "error ref", it works fine. I attached the business process as web_good.bpmn.

Comment 1 Hisao Furuichi 2014-08-28 07:59:35 UTC
Created attachment 931756 [details]
resources for this ticket

Comment 2 Marek Baluch 2014-10-07 08:29:37 UTC
This is fixed in communit BPMN2 Modeler - Diagram Editor 1.1.1.201409261846

Comment 3 Marek Baluch 2015-01-08 11:39:05 UTC
Note: In community the problem was solved by implementing option 2/

Comment 4 Marek Baluch 2015-01-08 11:44:47 UTC
Retested with JBDSIS-8.0.0.Beta2a and JBDS -8.0.1.GA and validation does not work.

Comment 5 Marek Baluch 2015-01-12 10:44:05 UTC
I played a bit more with this issue and it seems that it works on an older project which I have created while testing the fix on a community version.

If I create a new project with 8.0.0.Beta2a and copy the process definition (jbds_bad.bpmn) into the project then validation will not catch the error.

Comment 6 Robert (Bob) Brodt 2015-01-27 17:29:37 UTC
Paul, can you please let me know which version of the editor was used to build JBDS 8.0.0? Looks like these changes didn't make it in there...

Comment 7 Paul Leacu 2015-01-27 18:28:09 UTC
JBDSIS 8.0.0 has not gone GA yet.  It's currently scheduled to go out with Data Virtualization in February.  When it does though BPMN2 Modeler will be available through Early Access only (since it's not .Final and JDV is the only features being officially released).  QE should verify that the fix is there by testing this p2 site:

http://www.qa.jboss.com/binaries/RHDS/updates/development/luna/integration-stack/aggregate/8.0.0.CR1/earlyaccess/

Comment 8 Robert (Bob) Brodt 2015-01-27 18:40:04 UTC
Thanks Paul! I'll put this on the QE queue then ;)

Comment 9 Jozef Marko 2015-01-30 11:47:32 UTC
It is still reproducible on jbds-8.0.2.GA_jbdsis-8.0.0.CR1.earlyaccess. Both bpmn2 processes from the attachment was validated without error and both processes was started without exception with given output.

Comment 10 Jozef Marko 2015-01-30 11:48:33 UTC
Created attachment 985948 [details]
processes, source code and output

Comment 11 Robert (Bob) Brodt 2015-02-06 22:25:38 UTC
Sorry folks, my bad...
There's a User Preference toggle called "Perform Core BPMN 2.0 validation" which enables/disables the core validation. The problem reported here happens to be caught by one of those core validation constraints. To change this setting, select Window->Preferences from main menu, then select the BPMN2->jBPM Runtime page.

I'll change the default value for this to TRUE to prevent future problems.
Please retest with these builds:

Kepler: http://download.eclipse.org/bpmn2-modeler/updates/kepler/1.0.4/
        build# 1.0.4.201502062220
Luna: http://download.eclipse.org/bpmn2-modeler/updates/luna/1.1.2/
      build# 1.1.2.201502062220

Comment 12 Jozef Marko 2015-02-13 11:12:51 UTC
Verified on:
jbds-8.0.2.GA_jbdsis-8.0.0.CR2

With turned on BPMN2 core validation, there appears error about missing target for file 'BoundaryErrorWithoutTarget.bpmn2' from my attachment.


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