[rules-users] Use of function in Drools Test Scenario

Abbo ab.bonnement at gmail.com
Sun Jan 23 07:08:24 EST 2011


Hi,
I am a newbie on Drools, don't mind me asking stupid questions :)

W've started using Drools, first in a Proof-Of-Concept mode for a large
scale project in which we have developers and analysts using Drools. As an
analyst I defined the Rules and Test Scenarios in Guvnor. The developer has
added some functions too in the Repository in the same package as my Rules
and Test Scenarios are. So far so good. However, I encounter problems when
using the functions in my Test Scenario. I receive a:

[Error: no such method or function: timeStringToLong] [Near : {... new
java.util.Date(), "17:00" ....}] ^ [Line: 1, Column: 0]

The first part of the Test Scenario looks like:
GIVEN	
    insert [Segment] [$seg]
    arrivalTime: =timeStringToLong(new java.util.Date(), "17:00")

If I use eval() around the function call or prefix it with the package name
it does not help.
So all this leads to the questions:
- is it possible to use function calls in Test Scenarios?
- what is the format to call functions?
- is there somewhere documentation about input values, formats, etc.
- do I have the fully qualify the Date parameter?

Thanks very much!
Abbo

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Use-of-function-in-Drools-Test-Scenario-tp2313164p2313164.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list