Thank you for your quick answer. getFactHandle is the method I needed.
Concerning the second question, I'm using Drools 5.1.1 and yes, I imported AlarmFact. Below you can find the relevant lines of the drl file, in which the 'real name' of AlarmFact is MDSVHechoAlarma:
#created on: 14-mar-2011
package es.simcasva.alarmas.rules
#list any import classes here.
//......
import es.simcasva.alarmas.src.MDSVHechoAlarma;
#declare any global variables here
query "existe Alarma" (MDSVHechoAlarma referencia)
$alarma : MDSVHechoAlarma( iIdAlarma == referencia.iIdAlarma,
strAgrup1 == referencia.strAgrup1,
strAgrup2 == referencia.strAgrup2,
strAgrup3 == referencia.strAgrup3,
strAgrup4 == referencia.strAgrup4,
strAgrup5 == referencia.strAgrup5,
strAgrup6 == referencia.strAgrup6,
strAgrup7 == referencia.strAgrup7,
strAgrup8 == referencia.strAgrup8,
strAgrup9 == referencia.strAgrup9,
strAgrup10 == referencia.strAgrup10
)
end
The reported errors are:
Description Resource Path Location Type
BuildError: Not possible to directly access the property 'iIdAlarma' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup1' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup10' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup2' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup3' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup4' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup5' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup6' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup7' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup8' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Not possible to directly access the property 'strAgrup9' of declaration 'referencia' since it is not a pattern AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.iIdAlarma ]' for field 'iIdAlarma' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 185 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup1 ]' for field 'strAgrup1' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 186 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup10 ]' for field 'strAgrup10' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 195 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup2 ]' for field 'strAgrup2' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 187 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup3 ]' for field 'strAgrup3' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 188 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup4 ]' for field 'strAgrup4' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 189 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup5 ]' for field 'strAgrup5' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 190 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup6 ]' for field 'strAgrup6' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 191 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup7 ]' for field 'strAgrup7' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 192 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup8 ]' for field 'strAgrup8' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 193 Drools Error
BuildError: Unable to create restriction '[QualifiedIndentifierRestr: == referencia.strAgrup9 ]' for field 'strAgrup9' in the rule 'existe Alarma' AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules line 194 Drools Error
Thank you very much for your time, Wolfgang.
Manuel Ortiz.