# given the version, add the programme if it does not exist
rule "insertion of programme given a version"
ruleflow-group "source-defaults"
when
$v: ProgrammeVersion()
$p: Programme() from $v.getProgramme()
not
Programme(this == $p)
then
insert ($p);
update ($v); <-- Added Line
LoggerFactory.getLogger("factinsertion.drl").info("Entered:
insertion of programme given version");
end