Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1053726

Summary: When process cannot open (for whatever reason), designer should open an empty editor
Product: [Retired] JBoss BPMS Platform 6 Reporter: Kris Verlaenen <kverlaen>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Sona Mala <smala>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: kverlaen, rrajasek, smala
Target Milestone: DR3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:12:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
BPMN2 definition (6.0.1 CR1) none

Description Kris Verlaenen 2014-01-15 17:02:41 UTC
Description of problem:  When you create a task with incorrect data output mappings, this might prevent the process from being reloaded after saving.  Also, the process loading errors doesn't open an empty process either (so no way to delete the process either).

Version-Release number of selected component (if applicable): CR1

How reproducible:
Create a new process with start -> user task -> end
Add new data output "x"
Create a data output mapping from "x" mapped to "x" (note that mapping a data output to another data output doesn't really make sense, but it's allowed)
Save and reopen.

Actual results:
Exception shown on reloading

Note that even when an issue occurs on reload, after closing the popup an empty process designer should be shown, so the user can decide to recreate from scratch, or delete the file.  Now the "loading designer" popup stays active.

Comment 1 Kris Verlaenen 2014-01-15 17:04:43 UTC
Exception show is:

java.lang.Exception: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Unresolved reference 'x'. (inputStream://dummyUriWithValidSuffix.xml, 28, 45)
	at org.jbpm.designer.web.profile.impl.JbpmProfileImpl.getDefinitions(JbpmProfileImpl.java:318)
	at org.jbpm.designer.web.profile.impl.JbpmProfileImpl$2.parseModel(JbpmProfileImpl.java:245)
	at org.jbpm.designer.web.repository.impl.UUIDBasedJbpmRepository.load(UUIDBasedJbpmRepository.java:37)
	at org.jbpm.designer.web.server.UUIDBasedRepositoryServlet.doGet(UUIDBasedRepositoryServlet.java:116)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:408)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Unresolved reference 'x'. (inputStream://dummyUriWithValidSuffix.xml, 28, 45)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:191)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
	at org.jbpm.designer.web.profile.impl.JbpmProfileImpl.getDefinitions(JbpmProfileImpl.java:298)
	... 34 more
Caused by: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference 'x'. (inputStream://dummyUriWithValidSuffix.xml, 28, 45)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1154)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1228)
	at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
	... 37 more

Comment 2 Marek Baluch 2014-01-15 17:49:44 UTC
This is very similar to the issue where DataObject mappings where generated.

Comment 3 Kris Verlaenen 2014-02-11 02:04:52 UTC
Re-enabling data object post 6.0.1.GA
https://bugzilla.redhat.com/show_bug.cgi?id=1042524

Comment 4 Kris Verlaenen 2014-04-11 11:44:18 UTC
Updated this BZ to cover the case where, if for whatever reason the process cannot be opened, errors should be shown but designer should then open with an empty canvas, so that the process can still be deleted and/or overridden.

Comment 5 Tihomir Surdilovic 2014-04-21 13:53:30 UTC
Previous changes allow now for partially or completely wrong data assignments to still be opened (will be discarded). New changes now also allow for more serious errors in the bpmn2 to be handled as requested - the default process definition (start node only) will be displayed and errors will be shown to users via the UberFire error notification mechanism). 
Fix in designer master and 6.0.x branches

Comment 6 Sona Mala 2014-04-22 13:50:24 UTC
I saw the commit which was fixed this issue and I have one question. Does I understand correctly that the user will see just this alert? 

    "Unable to load process content due to errors. Displaying default process instead. Check logs for error details."


In that case, the regular user has not got access to server.log. This is a reason, why the error window shows a problem.

Comment 7 Kris Verlaenen 2014-04-23 16:06:06 UTC
This fix wasn't picked up yet with ER2.

Comment 8 Sona Mala 2014-06-04 14:12:37 UTC
I cannot reproduce this issue because the assignment 'x->x' is not allowed to save by Designer any more. Do you have a process which I can import to git repository and which contains this problem?

Comment 9 Sona Mala 2014-06-19 09:52:26 UTC
Created attachment 910315 [details]
BPMN2 definition (6.0.1 CR1)

Unfortunately, this process (Designer v6.0.1 CR1) which was created by following steps to reproduce cannot be opened by Designer v6.0.2 CR2. It throws NullPointerException. The same exception was thrown when I tried to import this process (using Designer v6.0.2 CR1).

Comment 10 Sona Mala 2014-06-19 09:59:44 UTC
There is an exception which was thrown:

11:56:27,797 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) java.lang.NullPointerException
11:56:27,798 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshallTask(Bpmn2JsonMarshaller.java:1820)
11:56:27,798 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshallFlowElement(Bpmn2JsonMarshaller.java:787)
11:56:27,798 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshallProcess(Bpmn2JsonMarshaller.java:396)
11:56:27,798 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshallDefinitions(Bpmn2JsonMarshaller.java:288)
11:56:27,798 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshall(Bpmn2JsonMarshaller.java:113)
11:56:27,799 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.web.profile.impl.JbpmProfileImpl$2.parseModel(JbpmProfileImpl.java:252)
11:56:27,799 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.web.repository.impl.UUIDBasedJbpmRepository.load(UUIDBasedJbpmRepository.java:37)
11:56:27,799 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.web.server.UUIDBasedRepositoryServlet.doGet(UUIDBasedRepositoryServlet.java:117)
11:56:27,800 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
11:56:27,800 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
11:56:27,800 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
11:56:27,800 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
11:56:27,801 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
11:56:27,801 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
11:56:27,801 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
11:56:27,801 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
11:56:27,801 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
11:56:27,801 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
11:56:27,802 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
11:56:27,802 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
11:56:27,802 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
11:56:27,802 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
11:56:27,802 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
11:56:27,803 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
11:56:27,803 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
11:56:27,803 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
11:56:27,803 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
11:56:27,803 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
11:56:27,807 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
11:56:27,807 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
11:56:27,808 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
11:56:27,808 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
11:56:27,808 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:408)
11:56:27,808 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
11:56:27,809 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
11:56:27,809 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
11:56:27,809 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
11:56:27,810 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
11:56:27,810 ERROR [stderr] (http-localhost/127.0.0.1:8080-2) 	at java.lang.Thread.run(Thread.java:744)

Comment 11 Sona Mala 2014-06-19 10:10:40 UTC
The exception which is mentioned in Comment #1 was caught and displayed as Ubefire alert. Unfortunately, I cannot read whole message to know what was happen.

The title of this issue and the expected behaviour are not implemented. The error window is still present (NPE) and Designer is not fully loaded.

This is a reason why I assign this issue for 6.0.2 CR1.

Comment 13 Sona Mala 2014-09-10 15:39:34 UTC
It seems that commit (19th Aug) was created after the tag for DR2 (8th Aug).

This issue is not fixed for 6.1.0 DR2.

Comment 14 Sona Mala 2014-09-24 13:00:43 UTC
Verified for 6.1.0 DR3.

Designer is opened and it contains just a Start node. The alert about problem was shown. The content of process is not changed in git repository. So user can correct the problems and push it to repository.

Unfortunately, the problem report is too short for debugging of process. Server.log does not contain the error.