fjtirado commented on code in PR #3412:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3412#discussion_r1499465207
##########
api/kogito-api/src/main/java/org/kie/kogito/process/ProcessInstances.java:
##########
@@ -29,6 +29,10 @@ default Optional<ProcessInstance<T>> findById(String id) {
Optional<ProcessInstance<T>> findById(String id, ProcessInstanceReadMode
mode);
+ default Optional<ProcessInstance<T>> findByBusinessKey(String id) {
+ return stream().filter(pi -> id.equals(pi.businessKey())).findAny();
Review Comment:
Slow default implementation (linear search)
See https://github.com/apache/incubator-kie-kogito-runtimes/issues/3413
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]