Created
December 27, 2010 17:20
-
-
Save tsurdilo/756311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.jboss.seam.drools.test.kbase; | |
import javax.enterprise.context.ApplicationScoped; | |
import javax.enterprise.inject.Produces; | |
import org.jboss.seam.drools.config.Drools; | |
import org.jboss.seam.drools.config.DroolsConfig; | |
import org.jboss.seam.drools.config.DroolsProperty; | |
import org.jboss.seam.drools.config.RuleResource; | |
public class KBaseTestRuleResources | |
{ | |
@Drools("creditRules") | |
@Produces | |
@ApplicationScoped | |
@Credit | |
public DroolsConfig produceCreditRules() | |
{ | |
return new DroolsConfig().addResource(new RuleResource("classpath:kbasetest.drl", "DRL", "forkbasetest")) | |
.addKBuilderConfig("kbuilderconfig.properties") | |
.addKBaseConfig("kbaseconfig.properties"); | |
} | |
@Drools("debitRules") | |
@Produces | |
@ApplicationScoped | |
@Debit | |
public DroolsConfig configureDebitRules() | |
{ | |
return new DroolsConfig().addResource(new RuleResource("classpath:kbasetest.xls", "DTABLE", "XLS", "Tables_2")) | |
.addKBuilderProperty(new DroolsProperty("drools.dialect.default", "java")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment