Class KieBaseCompilerImpl

java.lang.Object
ch.tocco.nice2.optional.drools.impl.KieBaseCompilerImpl
All Implemented Interfaces:
KieBaseCompiler

@Component public class KieBaseCompilerImpl extends Object implements KieBaseCompiler
  • Constructor Details

    • KieBaseCompilerImpl

      public KieBaseCompilerImpl(org.slf4j.Logger log, RunEnvironmentService runEnvironmentService)
  • Method Details

    • setSubjects

      @Autowired(required=false) public void setSubjects(List<Subject> subjects)
    • setSubjectExtensions

      @Autowired(required=false) public void setSubjectExtensions(List<Subject.SystemRuleExtension> rules)
    • compile

      public org.kie.api.KieBase compile(String subjectName, Iterable<RuleSource> sources) throws CompileException
      Description copied from interface: KieBaseCompiler
      Compile a package for the specified subject from the given knowledge sources. It uses all system rules and the specified custom rules to build the knowledge base.
      Specified by:
      compile in interface KieBaseCompiler
      Parameters:
      subjectName - The subject.
      sources - The knowledge sources.
      Returns:
      A knowledge base.
      Throws:
      CompileException - If an compile error occurs.