Skip to content

Commit

Permalink
[KIE-1492] Allow KieRuntimeBuilder to also create and provide Statele…
Browse files Browse the repository at this point in the history
…ssKieSession (#3681)

* [KIE-1492] Allow KieRuntimeBuilder to also create and provide StatelessKieSession

* wip
  • Loading branch information
mariofusco authored Sep 27, 2024
1 parent 7d7b406 commit a01e6ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.drools.core.time.TimerService;
import org.jbpm.workflow.instance.impl.CodegenNodeInstanceFactoryRegistry;
import org.kie.api.KieBase;
import org.kie.api.command.Command;
import org.kie.api.event.process.ProcessEventListener;
import org.kie.api.event.process.ProcessEventManager;
import org.kie.api.event.rule.AgendaEventListener;
Expand Down Expand Up @@ -124,6 +125,11 @@ public KieRuntime getKieRuntime() {
throw new UnsupportedOperationException();
}

@Override
public <T> T execute(Command<T> command) {
throw new UnsupportedOperationException();
}

@Override
public <T extends SessionClock> T getSessionClock() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ protected enum TYPE {
"import org.kie.api.KieBase;\n" +
"import org.kie.api.builder.model.KieBaseModel;\n" +
"import org.kie.api.runtime.KieSession;\n" +
"import org.kie.api.runtime.StatelessKieSession;\n" +
"import org.drools.modelcompiler.KieBaseBuilder;\n" +
"\n" +
"\n" +
Expand All @@ -120,6 +121,16 @@ protected enum TYPE {
" public KieSession newKieSession(String sessionName) {\n" +
" return null;\n" +
" }\n" +
"\n" +
" @Override\n" +
" public StatelessKieSession newStatelessKieSession() {\n" +
" return null;\n" +
" }\n" +
"\n" +
" @Override\n" +
" public StatelessKieSession newStatelessKieSession(String sessionName) {\n" +
" return null;\n" +
" }\n" +
"}";

static {
Expand Down

0 comments on commit a01e6ea

Please sign in to comment.