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

MVEL Expression with multiple conditions

I am trying to get an MVEL expression to work but am having probelms. I am tyring to determine if date defined as a property falls between two other dates. props['ExistingStartDate'] >= props['current_period_start_date'] &&…
LC_123
  • 63
  • 3
  • 9
0
votes
1 answer

JSF el - integrate with mvel

is it possible to use MVEL (http://mvel.codehaus.org/Home) with JSF? I cannot find a class that is an "ExpressionFactory" in the code? MVEL seems to use the static MVEL class, so I don't know what to write in my web.xml for the…
KOT
  • 1,986
  • 3
  • 21
  • 35
0
votes
1 answer

hooks during parsing of an expression

I have a requirement to parse and evaluate user defined expressions. The expressions are of the form "foo > 50 && bar < 60 && !(moo > 50))" During parsing, there is a need to monitor value for foo > 50, bar < 60 and !(moo > 50) and generate events…
kvhdude
  • 1
  • 1
  • 1
0
votes
1 answer

elastica scoring based on regular expression using mvel

I am new to elastic search and here is my scenario I am trying to solve. I have a search input box that supports autosuggestion logic. The results are fetched from an elastic index which uses ngram filter. What I want to improve is to introduce a…
elviento
  • 13
  • 3
0
votes
1 answer

How to access / update property of nested fields with MVEL in Elasticsearch

I want to append some data to a document in Elasticsearch and set a timestamp using MVEL. this is what I am currently trying. But it does not work. {"error":"ElasticSearchIllegalArgumentException[failed to execute script]; nested:…
Jabb
  • 3,414
  • 8
  • 35
  • 58
0
votes
1 answer

Import this class in MVEL and assign values to its property and access its method

I have a math class in a package mypackage. Now I want to import this class in MVEL and assign values to its property and access its method. I have written the following code but its giving error as Exception in thread "main" [Error: unknown class…
user2764578
  • 61
  • 3
  • 10
0
votes
1 answer

Which expression to get the elasticsearch client in mvel script

I try to access to an instance of "org.elasticsearch.client.Client" in a mvel script into elasticsearch. I try to call directly "client", and i have this error : [Error: unresolvable property or identifier: client] Apparently is not the good way…
YLR
  • 1,503
  • 4
  • 21
  • 28
0
votes
1 answer

Mvel with many expressions

I thought of using Mvel to evaluate dynamic expressions. These expressions are customer specific. For some of the customers they may be in hundreds. To evaluate these it is increasing the time based on the number of expressions. Is there any way I…
0
votes
1 answer

Mvel how to set value

I need to set value of an attribute if MVel expression is true. Can any one please help me, how to do that. Example code as below: LineItem lineItem = new LineItem(); Address address = new Address(); …
0
votes
1 answer

MVEL 'in' operator not working for collections in java

I'm trying to use MVEL 'in' operator in my code to evaluate an expression List countriesAvailable = new ArrayList(); countriesAvailable.add("Australia"); countriesAvailable.add("France"); List countriesVisited = new…
user401445
  • 1,014
  • 1
  • 16
  • 41
0
votes
1 answer

mvel @includeNamed throws NPE using CompiledTemplate

I'm using mvel for the first time. Using @includeNamed works fine when simply running TemplateRuntime.eval. But if I attempt to use a CompiledTemplate, it's throwing a NPE. Am I doing something wrong? Or is this a bug? I'm using mvel…
nogridbag
  • 3,521
  • 4
  • 38
  • 51
0
votes
1 answer

Elasticsearch Numeric Id Generation

I am using elasticsearch to insert documents from different client applications. I have different clients doing inserting so I can't just locally stash the next id... I need to lookup the next expected id in elasticsearch. I am using an ID…
Ryan R.
  • 2,478
  • 5
  • 27
  • 48
0
votes
1 answer

error occured where using ParserContext.addImport in mvel

Below is the pseudo code public void testImportInContext() { ParserContext ctx = new ParserContext(); ctx.addImport("List", List.class); ctx.addImport("ArrayList", ArrayList.class); MVEL.eval("List test = null;User u =null",…
0
votes
1 answer

Operators precedence in Drools rule

Hi I want to know how the following rule gets interpreted in Drools rule "test" when condiction A or condiction B condiction C then something end Is it (A or B) and C A or (B and C) becomes two rules: a). A and C b). B and…
user1589188
  • 5,316
  • 17
  • 67
  • 130
0
votes
1 answer

Evaluate rules against a multimap using MVEL

Just wondering how can I evaluate rules against a multimap using MVEL. I.e: rule-> "foo" == "200" Possible values of foo in the context [100, 200, 300]. I don't know which are going to be the possible values so I can't include them as part of the…
cnunezre
  • 1
  • 3
1 2 3
13
14