Bug 1049662

Summary: Firing a MVEL rule, whose salience is java.lang.Long.MAX_VALUE, in Guvnor
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Hisao Furuichi <hfuruich>
Component: BRM (Guvnor)Assignee: Toni Rikkola <trikkola>
Status: CLOSED NOTABUG QA Contact: Lukáš Petrovický <lpetrovi>
Severity: medium Docs Contact:
Priority: medium    
Version: BRMS 5.3.1CC: brms-jira, etirelli
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-17 16:17:22 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
exported repository which contains reproducer none

Description Hisao Furuichi 2014-01-08 00:49:20 UTC
Created attachment 846879 [details]
exported repository which contains reproducer

Description of problem:
Problem to fire a MVEL rule, whose salience is 9223372036854775807, in Guvnor. The value 9223372036854775807 is java.lang.Long.MAX_VALUE. If I run a test program in JBDS, I can run without any Exception.

Version-Release number of selected component (if applicable):
BRMS 5.3.1 with Rollup Patch#3

Steps to Reproduce:
1: import attached repository into guvnor
2: run a Test Scenarios named "salience"

Actual results:
java.lang.NullPointerException is thrown

Expected results:
Run a test without Exception

Additional info:
If I change a dialect of the rule from "mvel" to "java", I can run the test without any Exception.

Comment 2 Mario Fusco 2014-01-15 15:07:47 UTC
Salience is an int value so assigning to it a long one is not legal.

Comment 3 Hisao Furuichi 2014-01-17 05:09:37 UTC
Hi, Mario.
I understand that long value is not allowed to use. Now I want to request a either way to avoid a run time error.

- When building a package in Guvnor, throw Exception for the salience value
- Validation for rule points out a warning about the limitation for the salience value

Could you consider this option please? If I need to open another ticket, please let me know.

Comment 4 Edson Tirelli 2014-01-17 16:17:22 UTC
Hisao, I think the best way to improve this is to validate the value in the UI. Lets do that for the next version: 6.0. Can you please open/clone this ticket for 6.0?

I am closing this one.