Bug 827002

Summary: Designer: Validation does not control if process have just one start node
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Sona Mala <smala>
Component: BRM (Guvnor)Assignee: manstis
Status: ASSIGNED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1CC: jlocker, kverlaen, rzhang
Target Milestone: ER2   
Target Release: BRMS 5.3.1 GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
the exception from server.log
none
simple test process
none
Process with 2 start nodes
none
Build package
none
Run test scenario
none
BPMN2 - start node + signal start event
none
test process with multiple start nodes
none
Repository with process (timer start event) none

Description Sona Mala 2012-05-31 12:02:53 UTC
Created attachment 588056 [details]
the exception from server.log

Description of problem:
If I create process with two start nodes and press validation button I get information that validation is ok. In spite of validation's result I cannot save process. 

I get this Error dialog: "400 Sorry, a technical error occurred. Please contact a system administrator." 

When I know that problem is two start nodes in one process and delete one of them. I get this Error dialog: "Unable to save this asset, as it has been recently updated by [admin]" when I try to save correct process.

If I close this wrong process I cannot open it again. I will get same Error dialog ("400 Sorry, ...") when I try to open it.


Version-Release number of selected component (if applicable):
BRMS-5.3.0 ER8

How reproducible:
Every Time when I tried to save process with two start nodes

Steps to Reproduce:
1. create new process
2. create simple process (Start -> End)
3. add new Start node
4. validate
5. save, confirm dialog "Check in changes"
6. close
7. open it again
  
Actual results:

in step #4: Validation is ok
in step #5: "400 Sorry, a technical error occurred. Please contact a system administrator." and Exception in server.log (is attached).
in step #7: "400 Sorry, a technical error occurred. Please contact a system administrator." and guvnor does not open process.

Expected results:
in step #4: Show validation error (near the start node) something like "Two or more start nodes"

in step #5: Error "Unable to perform user action due to error(s).
Validate your process before saving, and view server logs to see error details."

in step #7: just open the latest correct version


Users should have some tools to inspect the process correctness. This tool shows any problems which can cause lost of process.

Why should user contacts administrator in this case?


Additional info:

Comment 1 Tihomir Surdilovic 2012-05-31 13:11:29 UTC
Sorry I am unable to reproduce this issue. A business process is allowed to have multiple start nodes as well as multiple end nodes. Validation should not fail on that. Also the added screenshot shows a process that I gathered from the bug description and that process saves without issues. Let me know what I'm missing here.

Comment 2 Tihomir Surdilovic 2012-05-31 13:12:30 UTC
Created attachment 588083 [details]
simple test process

simple test process

Comment 3 Sona Mala 2012-05-31 13:23:56 UTC
Screenshot looks good. I use standalone server 5.3.0 ER8, designer version is 2.2.0-DEV.

Comment 4 Sona Mala 2012-05-31 13:53:20 UTC
Created attachment 588095 [details]
Process with 2 start nodes

There is BPMN2 version of process to reproduce the issue. If I import this process, the problem occures.

Comment 5 Jiri Locker 2012-05-31 13:55:17 UTC
I was able to reproduce. I created a process as illustrated by attachment 588083 [details] and got the "technical error" message and exception in log. The process cannot be open anymore, it always fails with this error and what's more, the package cannot be built, which is very serious, I think.

Comment 6 Tihomir Surdilovic 2012-05-31 16:43:46 UTC
Jiri, we added a fix in Guvnor for this not to happen recently. I am worried that ER8 did not pick up that fix or is not using the latest Guvnor code from its 5.3.x branch. I am unable to reproduce :( Could you link me the URL to ER8 so I can try with that since using Guvnor from 5.3.x and Designer from its 2.2.x branch I am able to save the attached process.

Comment 9 Jiri Locker 2012-06-01 07:31:05 UTC
(In reply to comment #6)
> Jiri, we added a fix in Guvnor for this not to happen recently. I am worried
> that ER8 did not pick up that fix or is not using the latest Guvnor code
> from its 5.3.x branch.

That is possible.

> I am unable to reproduce :( Could you link me the URL
> to ER8 so I can try with that since using Guvnor from 5.3.x and Designer
> from its 2.2.x branch I am able to save the attached process.

Then we can hopefully expect the fix in ER9. Let's leave this MODIFIED.

Comment 10 Ryan Zhang 2012-06-13 09:32:48 UTC
This issue's fixes  have been picked by ER9. Please verify them on ER9.

Comment 11 Sona Mala 2012-06-14 11:01:48 UTC
Problem is not solved. 
 - I create same process like is showed by "simple test process". 
 - I can save and validate it without any problems. 
 - When I try to open it again I am not able to open it.
 - I get this message: "400 Sorry, a technical error occurred. Please contact a system administrator.". 
 - This exception occurs in server.log (and Event log):    
      java.lang.IllegalArgumentException: A RuleFlowProcess cannot have more than one start node!

Comment 12 Sona Mala 2012-06-14 12:11:51 UTC
By the way, I cannot run any test scenario. It allways ends with error: "Unable to parse xml : Exception class java.lang.IllegalArgumentException : A RuleFlowProcess cannot have more than one start node!"

I am not sure if I can archive/delete asset when I am not able to open it.
I found one workaround for deleting broken asset:
  - export repository
  - manualy delete the node of broken asset
  - import new repository

Comment 13 Prakash Aradhya 2012-06-14 15:49:12 UTC
Is there a chance that ER9 did not pick up the fix ?

Ryan, Julian can you please verify this ?

Comment 14 Ryan Zhang 2012-06-15 02:15:01 UTC
Not any I am aware of.

The Guvnor product branch url is:
 http://git.app.eng.bos.redhat.com/?p=droolsjbpm/guvnor.git;a=shortlog;h=refs/heads/5.3.x

Matched to upstream code:
ER8 used commit e19a643f091e8c3b56e1eb250adf83507df6068c on May 24 as latest one 

ER9 used commit a45581155c49bbf800d590f362fd98ea1ffe5333 on June 13 as latest one

Tihomir, can you remember the commit url to fix?

And kindly suggested that if there is any concerns that product might lost any bug fixes in upstream, please assign it to me or email me directly. So I can trace the question as soon as possible.

Comment 15 Ryan Zhang 2012-06-15 02:19:14 UTC
The designer product version is:
http://git.app.eng.bos.redhat.com/?p=droolsjbpm/process-designer.git;a=shortlog;h=refs/heads/2.2.x

You can see the version I am prepare for ER8 and ER9 version as well.

Comment 16 Sona Mala 2012-06-15 08:19:58 UTC
I have tested this bug through releases. I have found out that ER5 was ok and this bug did occurred in ER6.

Comment 17 Tihomir Surdilovic 2012-06-18 15:00:28 UTC
Here is the Guvnor fix for this in Guvnor:

master: https://github.com/droolsjbpm/guvnor/commit/f5207f9525b426a5ccdbd64c82a2cfe8b5145a64

5.4.x: https://github.com/droolsjbpm/guvnor/commit/bf725aaa0d51ea13bcda10e07c5fcdf27ce032ce

Can you please tell me what Guvnor branch you are building for production (I think it is 5.3.x) so i can cherry-pick this fix there too?

Thanks.

Comment 18 Tihomir Surdilovic 2012-06-18 15:05:12 UTC
I am on vacation now with limited internet (very slow) so it would be best if someone from the Guvnor team could cherry-pick this to the 5.3.x branch if that's the right one. I will try to send out an email and ask Geoffrey or Toni or Michael to see if they have the time to do this asap.

Comment 19 Tihomir Surdilovic 2012-06-18 15:14:50 UTC
Sent email to Guvnor team and Kris and Mark P. (Ryan you are included as well):

*****
https://bugzilla.redhat.com/show_bug.cgi?id=827002

Here is the fix for this bug in:

master: https://github.com/droolsjbpm/guvnor/commit/f5207f9525b426a5ccdbd64c82a2cfe8b5145a64

5.4.x: https://github.com/droolsjbpm/guvnor/commit/bf725aaa0d51ea13bcda10e07c5fcdf27ce032ce

It needs to go into the Guvnor 5.3.x branch for this blocker fix to be completed

I am on vacation still with very slow internet, could one of you guys PLEASE move this fix to 
the Guvnor 5.3.x branch and close out the BZ? I would _really_ appreciate this as it will take me 
forever to do this where I'm at now.
Not sure if it is possible to cherry-pick this straight into 5.3.x as there were some big package changes btw. 5.3 and 5.4 IIRC so might have to do it manually 
but its a simple change.

Thanks a lot !!!!!
Tihomir
*****

Hopefully someone will be able to help with this asap.

Comment 20 Geoffrey De Smet 2012-06-18 15:47:51 UTC
I 've manually backported that fix (cherry-picking failed) to 5.3.x (which is the BRMS 5.3 production branch), please verify it:
  https://github.com/droolsjbpm/guvnor/commit/5a725ceade5d0ecef45a104420085c109ec94236

Comment 21 Ryan Zhang 2012-06-21 02:20:18 UTC
Test this issue against CR build just finished.
This doesn't seem to be fixed. Anyway I would hand this over to QE to test again.

Comment 22 Ryan Zhang 2012-06-21 02:47:00 UTC
This issue should contain the fixes.
Please verify it on CR1.

Comment 23 Zuzana Krejčová 2012-06-21 11:04:30 UTC
I am still able to reproduce this with CR1, both with the provided process and with a new one (in a new repo, restarted server).

Comment 24 Prakash Aradhya 2012-06-21 13:46:40 UTC
It is frustrating that this is fixed long ago and we failed to pull into the build in last 3 attempts.
We have to have a serious look at how we build our product.  This one of the many issues we have in our productization process.

Anyways, this is not a show stopper issue at this stage.  Downgrading it and deferring it to post GA...

Comment 27 Tihomir Surdilovic 2012-08-26 19:51:59 UTC
Fix checked into the Guvnor 5.3.x branch.

Comment 28 Sona Mala 2012-09-12 11:44:13 UTC
Created attachment 612073 [details]
Build package

Comment 29 Sona Mala 2012-09-12 11:44:47 UTC
Created attachment 612074 [details]
Run test scenario

Comment 32 Tihomir Surdilovic 2012-09-17 15:06:01 UTC
Fixed in Guvnor 5.3.x production branch. Thanks for reporting!

Comment 33 Sona Mala 2012-10-16 12:51:49 UTC
Created attachment 628149 [details]
BPMN2 - start node + signal start event

Comment 34 Tihomir Surdilovic 2012-10-16 15:19:31 UTC
Here is the Jira that added support for multiple start events in jBPM:
JBPM-3586

If multiple start events are present, one of them can be the default Start events, others must have a "trigger", for example be a timer intermediate event with valid timer semantics.

Attached is a test process showing this off that builds fine within Guvnor.

Thanks.

Comment 35 Tihomir Surdilovic 2012-10-16 15:20:19 UTC
Created attachment 628226 [details]
test process with multiple start nodes

Comment 36 Sona Mala 2012-10-19 14:03:52 UTC
Created attachment 630041 [details]
Repository with process (timer start event)

I try process from Tiho, but I still reproduce a issue (can not build a package). I attach repository with this process.

Comment 39 Tihomir Surdilovic 2012-10-24 23:18:28 UTC
It looks as support for multiple start nodes is not in brms but in community only now. We could change validation accordingly for the product. 

>> ... just to allow saving a process that cannot be built. << I dont necessarily agree with this - users should be able to create process models that cannot be built/executed, they can still be valid models however. We do encourage both business users and developers to work together, so business users can create models and developers can (in eclipse even) finish the model to add execution properties. WDYT?

Comment 40 Jiri Locker 2012-10-25 10:27:27 UTC
(In reply to comment #39)
> It looks as support for multiple start nodes is not in brms but in community
> only now. We could change validation accordingly for the product. 

Yes, the multiple-start-nodes feature is currently not functional due to the compiler exception. However this feature has not been declared as unsupported and so the compiler bug should be fixed rather than modifying the validation.

Please see following attachment for the compiler exception and let me know if this needs to be reassigned to someone else or a new bugzilla should be created.

Comment 41 Jiri Locker 2012-10-25 10:30:49 UTC
The compiler exception has been previously submitted as attachment 588056 [details].