All Downloads are FREE. Search and download functionalities are using the official Maven repository.

class-templates.SessionRuleUnitTemplate Maven / Gradle / Ivy

package org.drools.project.model;

import org.kie.kogito.rules.KieRuntimeBuilder;
import org.kie.kogito.rules.impl.SessionMemory;
import org.drools.modelcompiler.SessionRuleUnitInstance;
import org.kie.kogito.rules.RuleUnit;

@javax.inject.Singleton
@javax.inject.Named("$SessionName$")
public class SessionRuleUnit implements RuleUnit {

    @javax.inject.Inject
    KieRuntimeBuilder runtimeBuilder;

    @Override
    public SessionRuleUnitInstance createInstance( SessionMemory memory ) {
        return new SessionRuleUnitInstance(this, memory, runtimeBuilder.newKieSession("$SessionName$"));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy