Search in sources :

Example 1 with MissingImplementationException

use of org.drools.compiler.builder.impl.errors.MissingImplementationException in project drools by kiegroup.

the class KnowledgeBuilderImpl method templateToPackageDescr.

PackageDescr templateToPackageDescr(Resource resource) throws DroolsParserException, IOException {
    GuidedRuleTemplateProvider guidedRuleTemplateProvider = GuidedRuleTemplateFactory.getGuidedRuleTemplateProvider();
    if (guidedRuleTemplateProvider == null) {
        throw new MissingImplementationException(resource, "drools-workbench-models-guided-template");
    }
    ResourceConversionResult conversionResult = guidedRuleTemplateProvider.loadFromInputStream(resource.getInputStream());
    return conversionResultToPackageDescr(resource, conversionResult);
}
Also used : MissingImplementationException(org.drools.compiler.builder.impl.errors.MissingImplementationException) ResourceConversionResult(org.drools.drl.extensions.ResourceConversionResult) GuidedRuleTemplateProvider(org.drools.drl.extensions.GuidedRuleTemplateProvider)

Aggregations

MissingImplementationException (org.drools.compiler.builder.impl.errors.MissingImplementationException)1 GuidedRuleTemplateProvider (org.drools.drl.extensions.GuidedRuleTemplateProvider)1 ResourceConversionResult (org.drools.drl.extensions.ResourceConversionResult)1