adi2380
adi2380

Reputation: 29

How to access the String object inserted as fact in drools

I am inserting String as a fact in the drool's rule engine. How can I use it in the rules.

String fact = "collegeName";
ksession.insert(fact);

Please help.

Upvotes: 0

Views: 1240

Answers (1)

Esteban Aliverti
Esteban Aliverti

Reputation: 6322

Do you mean something like this?

rule "TEST"
when
    $s: String (this == "collegeName")
then
    //Do something
end

The interesting thing is why are you inserting things that you don't know how to handle :P

Hope it helps,

Upvotes: 2

Related Questions