i create the validation, where i want to validate the user's input with data master in database. There are a few object here, MstrProv
and Prov
. I put the knowledgebase separately from the main void. I also put the action on the FormProv.view
like that
private void txtProvActionPerformed(java.awt.event.ActionEvent evt)
{
Prov prov = new Prov();
String isian = txtProv.getText();
prov.setKodeprov(isian);
Eksekusi eksekusi = new Eksekusi(prov, txtProv);
}
Here's the code of validation
Provinsi.drl
rule "Kode Provinsi sudah ada di dalam Master"
ruleflow-group "test"
lock-on-active true
when
$a : Prov ($kodeprov : kodeprov) exists (MstrProv($idprov : id_prov) from $kodeprov)
then
JOptionPane.showMessageDialog(frame,"Kode sudah ada di dalam master");
end
It seems working but actually the dialog box that have been set won't display. Is there anything wrong? could you give me some solution for this? Thanks