Questions tagged [mvel]

MVEL is a powerful expression language for Java-based applications.

MVEL is a powerful expression language for Java-based applications.

201 questions
0
votes
1 answer

How can i access the inner object values of an object in mvel?

Object obj=account; here account object contains books as inner object. So how can i access those values in mvel. I am new to MVEL. So can you please auggest me how to overcome the above issue.
Raja
  • 156
  • 2
  • 15
0
votes
1 answer

Java Based Expression Evaluator

I need an Expression Evaluator that can allow me to evaluate an expression such as follows: (ItemWeight + PackageWeight) * 2 So, given the following Input: ItemWeight = new Weight(2.0, LBS); PackageWeight = new Weight(0.2, LBS); Output would be:…
user544192
  • 695
  • 2
  • 10
  • 23
0
votes
1 answer

Drools 5.6 mvel null safe property navigation

I am trying to upgrade drools from version 5.1 to 5.6, in 5.1 we used mvel null safe property access as below, but after upgrading mvel property access operator (.?) no more recognised by drools. Is there any other way to achieve this in 5.6?…
Zahid M
  • 1,033
  • 10
  • 10
0
votes
2 answers

mvel equals operator doesn't work as expected with char operand

Is mvel equals operator doesn't work as expected with char operand or am I missing something? It throws NumberFormatException: For input string: "E" I would expect false in system output. Is there any 'configuration option' for MVEL that fits here?…
Mike
  • 20,010
  • 25
  • 97
  • 140
0
votes
1 answer

Nested mvel script update

I am using this expression to update a nested document: curl -XPOST 'localhost:9200/event/docs/cPd4cfqGTe2Hw9sq0qs_NQ/_update' -d '{ "script": "foreach (item : ctx._source.to) { item['read'] = true }" }' But it always says classcastexception…
Yun
  • 237
  • 1
  • 4
  • 15
0
votes
1 answer

System.setProperty("java.version", "1.6") not working Android 5

I was using this command on Android 4 and it was working without any problem: System.setProperty("java.version", "1.6"); but when I upgrade my Android to 5 I start getting this error: Ignoring attempt to set property "java.version" to value "1.6" I…
0
votes
2 answers

MVEL not working as desired for empty comparison

As per the documentation for MVEL in [http://mvel.codehaus.org/Value+Emptiness empty should evaluate to true if the below mentioned conditions are true. a string has a length greater than 0 but is comprised only of whitespace a boolean value is…
sud_shan
  • 195
  • 1
  • 11
0
votes
0 answers

Does threadlocal variable work with JBoss drools

I am using JBoss drools 5.5.0.final with mvel2 (2.1.3) dialect I am facing issue as thread local variable set before ksession.fireAllRules(), but the thread local variable seems to be unset within flow. Is using threadlocal variables in Drools/mvel…
Dhananjay
  • 3,903
  • 2
  • 29
  • 44
0
votes
1 answer

Evaluating an Expression using MVEL

I need to evaluate a expression in MVEL containing date. Basically, I need to add Certain number of days to a given date and get the value. When I am trying to evaluate the expression in MVEL, getting some exceptions. Here is my code:: package…
Venkatesh K
  • 133
  • 1
  • 1
  • 11
0
votes
1 answer

How to get drools input ArrayList variable

I'm new to WSO2 BRS Drools programming. I'm struggling to get an input as an ArrayList. I have defined a global ArrayList variable as below: global java.util.ArrayList mylist;
0
votes
0 answers

How to use sql Query inside MVEL Script?

Using my MVEL script I need query some db .So i need to write some mvel expression with sql query .is it possible to use sql query inside mvel script help me thanks in advance?
subinksoman
  • 426
  • 4
  • 20
0
votes
1 answer

Drools reference static field

I wish to make a reference to a static field present in a java class from within the when clause of a drool. I don't want to insert a fact representing this value, because the value is related to our system rather than our business logic.…
melchoir55
  • 6,842
  • 7
  • 60
  • 106
0
votes
1 answer

Issue with mvel2 - Elasticsearch

We are running Elasticsearch Bulk update (elasticsearch uses MVEL) And we are getting below error **** COMPILER BUG! REPORT THIS IMMEDIATELY AT http://jira.codehaus.org/browse/mvel2 Expression: int cIndex= 0; if(ctx._source.xId == 46461){ …
Kumar D
  • 1,308
  • 5
  • 19
  • 43
0
votes
1 answer

Should this drl compile?

I'm working on a project that runs Drools 5.5 for a promotion engine system. I'm having some trouble trying to understand the compilation step when i'm building the KnowledgeBase. This is the case: I have a drl that performs a collect (LHS) on a…
0
votes
0 answers

MVEL2 NoClassDefFoundError

I'm new to mvel but I try to use it inside a project and I face a NoClassDefFoundError: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl at…
Jerome
  • 61
  • 9