-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KIE-1492] Allow KieRuntimeBuilder to also create and provide StatelessKieSession #6103
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ | |
import org.kie.api.runtime.process.WorkItemHandler; | ||
import org.kie.api.runtime.rule.FactHandle; | ||
|
||
import static java.util.Arrays.asList; | ||
|
||
/** | ||
* KieCommands is a factory for Commands that can be used by classes that implement CommandExecutor. Typically more than one Command | ||
* will want to be executed, where is where the BatchExecution comes in, which takes a List of commands, think of it as CompositeCommand. | ||
|
@@ -115,6 +117,10 @@ Command newQuery(String identifier, | |
String name, | ||
Object[] arguments); | ||
|
||
default BatchExecutionCommand newBatchExecution(Command... commands) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. HI @mariofusco There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not strictly related to this fix, it's just a convenience method that I added to create batch commands in a single line that I used in my test. |
||
return newBatchExecution( asList(commands) ); | ||
} | ||
|
||
BatchExecutionCommand newBatchExecution(List< ? extends Command> commands); | ||
|
||
BatchExecutionCommand newBatchExecution(List< ? extends Command> commands, String lookup); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I'm using the new
RuntimeSession
interface to test bothKieSession
andStatelessKieSession
with the same method.