Bug 839657 - BRM / Guvnor Does not allow you to open an incomplete BPMN2 process that was not validate before saving
BRM / Guvnor Does not allow you to open an incomplete BPMN2 process that was ...
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.3.0.GA
Unspecified Mac OS
high Severity urgent
: ---
: ---
Assigned To: Tihomir Surdilovic
Sona Mala
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-12 09:53 EDT by Johnathan Ingram
Modified: 2016-01-03 22:51 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, JBoss Enterprise BRMS verified business processes on save operations. This prevented users from saving process models that were incomplete. The issues has been resolved by adding support for saving partial process models. Users are now able to save incomplete process models.
Story Points: ---
Clone Of:
Environment:
Last Closed:
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)
Testcase - an incomplete process with a gateway. (3.06 KB, application/x-gzip)
2012-07-13 04:48 EDT, Syed M Shaaf
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPM-3670 Major Resolved jBPM WebDesigner (BRMS) should allow opening of invalid BPMN2 files (or disallow saving them). 2017-03-27 02:36 EDT

  None (edit)
Description Johnathan Ingram 2012-07-12 09:53:05 EDT
Description of problem:

When using web interface to define BPMN2 processes, if you do not validate the process and save the interface cannot open the rule again


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

How reproducible:
Can reproduce

Steps to Reproduce:
1. Create incomplete business process.
2. Save and Close the process.
3. Try and open the process (An error will occur)
  
Actual results:
404 Error

Expected results:
Should open the process so that you can correct the incomplete process and save again.

Additional info:

See stack trace, but specifically
at org.drools.guvnor.server.RepositoryAssetService.handlePackageItem(RepositoryAssetService.java:130)



15:46:07,029 ERROR [RepositoryServiceServlet] Service method 'public abstract org.drools.guvnor.client.rpc.RuleAsset org.drools.guvnor.client.rpc.AssetService.loadRuleAsset(java.lang.String) throws com.google.gwt.user.client.rpc.SerializationException' threw an unexpected exception: java.lang.IllegalArgumentException: Unknown gateway direction: Unspecified
java.lang.IllegalArgumentException: Unknown gateway direction: Unspecified
	at org.jbpm.bpmn2.xml.ExclusiveGatewayHandler.createNode(ExclusiveGatewayHandler.java:39)
	at org.jbpm.bpmn2.xml.AbstractNodeHandler.start(AbstractNodeHandler.java:73)
	at org.drools.xml.ExtensibleXmlParser.startElement(ExtensibleXmlParser.java:385)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:296)
	at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:175)
	at org.jbpm.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:46)
	at org.drools.guvnor.server.contenthandler.BPMN2ProcessHandler.readProcess(BPMN2ProcessHandler.java:92)
	at org.drools.guvnor.server.contenthandler.BPMN2ProcessHandler.retrieveAssetContent(BPMN2ProcessHandler.java:64)
	at org.drools.guvnor.server.RepositoryAssetService.handlePackageItem(RepositoryAssetService.java:130)
	at org.drools.guvnor.server.RepositoryAssetService.loadRuleAsset(RepositoryAssetService.java:116)
	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:601)
	at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
	at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
	at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
	at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
	at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
	at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
	at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
	at org.drools.guvnor.server.RepositoryAssetService_$$_javassist_seam_9.loadRuleAsset(RepositoryAssetService_$$_javassist_seam_9.java)
	at org.drools.guvnor.server.RepositoryServiceServlet.loadRuleAsset(RepositoryServiceServlet.java:462)
	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:601)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
	at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
	at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
	at java.lang.Thread.run(Thread.java:722)
Comment 1 Syed M Shaaf 2012-07-13 04:48:15 EDT
Created attachment 598015 [details]
Testcase - an incomplete process with a gateway.

I am able to reproduce this in my environment. 
1. Created an incomplete process. 
2. Save the process.

Save returns an error. although the process is saved. However opening the process again is not possible.
Comment 2 Rafael Chies 2012-07-31 14:50:11 EDT
A  similar bug happened with me.
In my case, I did a mistake linking two differents tasks nodes to the same End Event. After, even removing those two links, the error continues when saving the process. Also, I left the guided process view, and when I try to open the process again, I get the stack trace [1], the process don't open, and no feedback is showed to final user:

[1] java.lang.IllegalArgumentException: This type of node cannot have more than one incoming connection!
	at org.jbpm.workflow.core.node.EndNode.validateAddIncomingConnection(EndNode.java:55)
	at org.jbpm.workflow.core.impl.NodeImpl.addIncomingConnection(NodeImpl.java:97)
	at org.jbpm.workflow.core.impl.ConnectionImpl.connect(ConnectionImpl.java:75)
	at org.jbpm.workflow.core.impl.ConnectionImpl.<init>(ConnectionImpl.java:70)
	at org.jbpm.bpmn2.xml.ProcessHandler.linkConnections(ProcessHandler.java:283)
	at org.jbpm.bpmn2.xml.ProcessHandler.end(ProcessHandler.java:135)
	at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:417)
Comment 3 Tihomir Surdilovic 2012-07-31 15:12:09 EDT
In order to fix these issues you have to upgrade Guvnor to 5.4.x or 5.5.x. This issue was already logged before the release of BRMS 5.3 however it was decided not to include the fix. 
Guvnor upgrade or a patch to BRMS 5.3 are your options in order to be able to save incomplete BPM2 or BPMN2 that contains "errors".

Hope this helps.
Comment 4 Rafael Chies 2012-07-31 15:25:54 EDT
Hi tsurdilo,

Thanks for your attention. As I am working in an enterprise environment (BRMS subscription, not Guvor community), I can't upgrade Guvnor, but the BRMS 5.3 patch would be great. Taking a look at Customer Portal I figured out that there is only one pacth (BRMS 5.3.0 one off patch for BZ834730), and, in a first contact, I see that this patch isn't related with the bug we are discussing here, is it ?

Thanks again.
Comment 5 Tihomir Surdilovic 2012-07-31 19:20:34 EDT
It's not related. Product patches are AFAIK driven by our support group and not engineering, and I am not sure that this is a patch request Bugzilla so it should not be assigned to me directly. 
If a patch is required I assume we would handle it the usual ways via the support portal and then support would raise a patch BZ for it.

Thanks.
Comment 6 Rafael Chies 2012-08-01 08:53:28 EDT
You are totaly right !!
I've just created a support case.
Thanks !
Comment 8 Tihomir Surdilovic 2012-08-26 15:54:58 EDT
Fix checked into Guvnor 5.3.x branch for BRMS 5.3.1
Comment 9 Sona Mala 2012-09-19 07:51:04 EDT
Verified for BRMS 5.3.1 ER1, designer 2.3.1-DEV

Steps of verification:
 - create new process
 - import attached process (one of them is invalid)
 - Save and Close
 - open process
 - delete Sequence Flow or End Node...I guess that now the process is incomplied
 - Save and Close
 - open process

Behaviour is correct.

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