Given the following rules (contrived example):
rule "Monetary 1"
when
Currency(typeID
in
(CurrencyConst.DOLLAR, CurrencyConst.EURO, CurrencyConst.YEN))
then
insert(new Fact());
end
rule "Monetary 2"
when
Currency(typeID
in (CurrencyConst.RUBLES,
CurrencyConst.WON))
then
insert(new Fact());
end
Is it possible to map constant values into a DSL?
So the above rules could be partially rewritten as:
rule "Monetary 1"
when
Currency
is one of DOLLAR,
EURO, YEN
then
insert(new Fact());
end
rule "Monetary 2"
when
Currency
is one of RUBLES,
WON
then
insert(new Fact());
end