Added code examples...
Sample1:
import namespace1.MyObject;
rule "r"
when
namespace2.MyObject( value == 3 )
MyObject( attr1 == "foo" ) //Here, got a parsing error stating "attr1" is not a field because it looks it up from namespace2.MyObject
then
// ...
end
Sample2:
import namespace1.MyObject;
declare MyLocalType
val: namespace2.MyObject
end
rule "r1"
when
MyObject( attr1 == "foo" ) //Here, got a parsing error stating "attr1" is not a field because it looks it up from namespace2.MyObject
then
MyLocalType $mlt = new MyLocalType();
$mlt.setVal( new namespace2.MyObject() );
insert( $mlt );
end
Sample3 (continues Sample2 as the following is in the same DRL file):
rule "r2"
when
MyObject()
//Here: there is no name conflict but, at execution time, the rule is not activated;
//fully qualifying the fact type solved the issue (meaning activation seems to wait for namespace2.MyObject to fire the rule...)
then
// ...
end