fjtirado commented on code in PR #3965:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3965#discussion_r2184746715
##########
jbpm/jbpm-flow/src/main/java/org/kie/kogito/process/impl/AbstractProcessInstance.java:
##########
@@ -851,13 +851,23 @@ public Throwable errorCause() {
@Override
public void retrigger() {
executeInWorkflowProcessInstanceWrite(pi -> {
+ NodeInstance nodeInstanceInError =
pi.getNodeInstance(nodeInstanceIdInError, true);
NodeInstanceImpl ni = (NodeInstanceImpl)
pi.getByNodeDefinitionId(nodeInError, pi.getNodeContainer());
+
clearError(pi);
+
getProcessRuntime().getProcessEventSupport().fireProcessRetriggered(pi,
pi.getKnowledgeRuntime());
org.kie.api.runtime.process.NodeInstanceContainer
nodeInstanceContainer = ni.getNodeInstanceContainer();
if (nodeInstanceContainer instanceof NodeInstance) {
((NodeInstance)
nodeInstanceContainer).internalSetTriggerTime(new Date());
}
+
+ if (Objects.nonNull(nodeInstanceInError) &&
Objects.isNull(nodeInstanceInError.getLeaveTime()) &&
Objects.isNull(nodeInstanceInError.getCancelType())) {
Review Comment:
```suggestion
if (nodeInstanceInError != null &&
nodeInstanceInError.getLeaveTime() == null &&
nodeInstanceInError.getCancelType() == null)
```
This is shorter and fastter. Objects.nonNull and Object.null are intended to
be used as method reference for methods that accepts a predicate, not in
regular java code
--
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]