Reputation: 139
I need to pass a parameter from request to the DRL file. I need to call a method of java class that takes a parameter but I am not able to access the parameter in DRL.
Can you provide a way to achieve this?
Upvotes: 0
Views: 455
Reputation: 27322
From which request? a HTTP request? the loaded dataset?
Before you call Solver.solve(planningProblem)
, do something like planningProblem.getParametrization().setFoo("bar")
. In the DRL, you can then do something like this:
when
Parametrization($foo : foo) // Parametrization is a singleton
...
MyEntity(methodOnMyEntity($foo) == true)
then
...
See the source code of the Examination example.
Upvotes: 1