diff --git a/api/kogito-api/src/main/java/org/kie/kogito/usertask/UserTaskAssignmentStrategy.java b/api/kogito-api/src/main/java/org/kie/kogito/usertask/UserTaskAssignmentStrategy.java index 985a5d25572..47086286508 100644 --- a/api/kogito-api/src/main/java/org/kie/kogito/usertask/UserTaskAssignmentStrategy.java +++ b/api/kogito-api/src/main/java/org/kie/kogito/usertask/UserTaskAssignmentStrategy.java @@ -30,6 +30,6 @@ default String getName() { return getClass().getName(); } - Optional computeAssigment(UserTaskInstance userTaskInstance, IdentityProvider identityProvider); + Optional computeAssignment(UserTaskInstance userTaskInstance, IdentityProvider identityProvider); } diff --git a/api/kogito-api/src/main/java/org/kie/kogito/usertask/model/Reassignment.java b/api/kogito-api/src/main/java/org/kie/kogito/usertask/model/Reassignment.java index 89bda5921fc..dc1c6e90b48 100644 --- a/api/kogito-api/src/main/java/org/kie/kogito/usertask/model/Reassignment.java +++ b/api/kogito-api/src/main/java/org/kie/kogito/usertask/model/Reassignment.java @@ -52,7 +52,7 @@ public Set getPotentialGroups() { @Override public String toString() { - return "Reassigment [potentialUsers=" + potentialUsers + ", potentialGroups=" + potentialGroups + "]"; + return "Reassignment [potentialUsers=" + potentialUsers + ", potentialGroups=" + potentialGroups + "]"; } @Override diff --git a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/AbstractUserTask.java b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/AbstractUserTask.java index 8fb214c0b17..1f103115291 100644 --- a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/AbstractUserTask.java +++ b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/AbstractUserTask.java @@ -46,7 +46,7 @@ public abstract class AbstractUserTask implements UserTask { private Set excludedUsers; private Collection> startDeadlines; private Collection> endDeadlines; - private Collection> startReassigments; + private Collection> startReassignments; private Collection> endReassignments; public AbstractUserTask(String id, String name) { @@ -60,7 +60,7 @@ public AbstractUserTask(String id, String name) { this.excludedUsers = new HashSet<>(); this.startDeadlines = new HashSet<>(); this.endDeadlines = new HashSet<>(); - this.startReassigments = new HashSet<>(); + this.startReassignments = new HashSet<>(); this.endReassignments = new HashSet<>(); } @@ -223,11 +223,11 @@ public void setNotCompletedDeadlines(String notStarted) { @Override public Collection> getNotStartedReassignments() { - return startReassigments; + return startReassignments; } public void setNotStartedReassignments(String reassignments) { - this.startReassigments = DeadlineHelper.parseReassignments(reassignments); + this.startReassignments = DeadlineHelper.parseReassignments(reassignments); } @Override @@ -235,7 +235,7 @@ public Collection> getNotCompletedReassignments() { return endReassignments; } - public void setNotCompletedReassigments(String reassignments) { + public void setNotCompletedReassignments(String reassignments) { this.endReassignments = DeadlineHelper.parseReassignments(reassignments); } diff --git a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/BasicUserTaskAssignmentStrategy.java b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/BasicUserTaskAssignmentStrategy.java index 076a62c313e..2d6fddcdffc 100644 --- a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/BasicUserTaskAssignmentStrategy.java +++ b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/BasicUserTaskAssignmentStrategy.java @@ -34,7 +34,7 @@ public String getName() { } @Override - public Optional computeAssigment(UserTaskInstance userTaskInstance, IdentityProvider identityProvider) { + public Optional computeAssignment(UserTaskInstance userTaskInstance, IdentityProvider identityProvider) { Set users = new HashSet<>(userTaskInstance.getPotentialUsers()); users.removeAll(userTaskInstance.getExcludedUsers()); if (users.size() == 1) { diff --git a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/DefaultUserTaskInstance.java b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/DefaultUserTaskInstance.java index 15e2477fc1e..26cfb631a8b 100644 --- a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/DefaultUserTaskInstance.java +++ b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/DefaultUserTaskInstance.java @@ -105,7 +105,7 @@ public class DefaultUserTaskInstance implements UserTaskInstance { private Collection> notStartedReassignments; - private Collection> notCompletedReassigments; + private Collection> notCompletedReassignments; private Map notStartedDeadlinesTimers; @@ -643,11 +643,11 @@ public void setNotStartedReassignments(Collection> no @Override public Collection> getNotCompletedReassignments() { - return notCompletedReassigments; + return notCompletedReassignments; } - public void setNotCompletedReassignments(Collection> notCompletedReassigments) { - this.notCompletedReassigments = notCompletedReassigments; + public void setNotCompletedReassignments(Collection> notCompletedReassignments) { + this.notCompletedReassignments = notCompletedReassignments; } public void setJobsService(JobsService jobsService) { diff --git a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/lifecycle/DefaultUserTaskLifeCycle.java b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/lifecycle/DefaultUserTaskLifeCycle.java index 5b871d2a8f6..986de80780b 100644 --- a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/lifecycle/DefaultUserTaskLifeCycle.java +++ b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/lifecycle/DefaultUserTaskLifeCycle.java @@ -216,7 +216,7 @@ public Optional fail(UserTaskInstance userTaskInstance, private String assignStrategy(UserTaskInstance userTaskInstance, IdentityProvider identityProvider) { UserTaskAssignmentStrategy assignmentStrategy = userTaskInstance.getUserTask().getAssignmentStrategy(); - return assignmentStrategy.computeAssigment(userTaskInstance, identityProvider).orElse(null); + return assignmentStrategy.computeAssignment(userTaskInstance, identityProvider).orElse(null); } private void checkPermission(UserTaskInstance userTaskInstance, IdentityProvider identityProvider) { diff --git a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/model/DeadlineHelper.java b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/model/DeadlineHelper.java index 3e0793830b6..e492bfcc737 100644 --- a/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/model/DeadlineHelper.java +++ b/jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/model/DeadlineHelper.java @@ -93,7 +93,7 @@ public static Collection> parseReassignments(Object t if (text instanceof String textString && textString.isBlank()) { return Collections.emptyList(); } - return parseDeadlines(text, DeadlineHelper::parseReassigment, DeadlineHelper::getReassignmentSchedule); + return parseDeadlines(text, DeadlineHelper::parseReassignment, DeadlineHelper::getReassignmentSchedule); } public static Collection> parseDeadlines(Object text) { @@ -221,7 +221,7 @@ private static Map asMap(String text) { return result; } - private static Reassignment parseReassigment(String text) { + private static Reassignment parseReassignment(String text) { Map map = asMap(text); return new Reassignment(parseSet(map.get("users")), parseSet(map.get("groups"))); } diff --git a/jbpm/jbpm-usertask/src/test/java/org/kie/kogito/usertask/impl/model/DeadlineHelperTest.java b/jbpm/jbpm-usertask/src/test/java/org/kie/kogito/usertask/impl/model/DeadlineHelperTest.java index 2c022d7672d..2f83ce37530 100644 --- a/jbpm/jbpm-usertask/src/test/java/org/kie/kogito/usertask/impl/model/DeadlineHelperTest.java +++ b/jbpm/jbpm-usertask/src/test/java/org/kie/kogito/usertask/impl/model/DeadlineHelperTest.java @@ -239,10 +239,10 @@ public void testMultipleNotification() { @Test public void testReassignment() { - Collection> reassigments = DeadlineHelper.parseReassignments( + Collection> reassignments = DeadlineHelper.parseReassignments( "[users:Pepe,Pepa|groups:Admin,Managers]@[1m]"); - assertThat(reassigments).hasSize(1); - DeadlineInfo reassignment = reassigments.iterator().next(); + assertThat(reassignments).hasSize(1); + DeadlineInfo reassignment = reassignments.iterator().next(); assertThat(reassignment.getNotification().getPotentialUsers()).containsExactlyInAnyOrder("Pepe", "Pepa"); assertThat(reassignment.getNotification().getPotentialGroups()).containsExactlyInAnyOrder("Admin", "Managers"); assertThat(reassignment.getScheduleInfo().iterator().next().getDuration()).isEqualTo(Duration.ofMinutes(1)); diff --git a/kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/usertask/UserTaskCodegen.java b/kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/usertask/UserTaskCodegen.java index 9f4e1abb8d0..83a6c998f36 100644 --- a/kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/usertask/UserTaskCodegen.java +++ b/kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/usertask/UserTaskCodegen.java @@ -227,7 +227,7 @@ public List generateUserTask() { block.addStatement(new MethodCallExpr(new ThisExpr(), "setNotStartedDeadLines", NodeList.nodeList(toDeadlineExpression(info.getParameter("NotStartedNotify"))))); block.addStatement(new MethodCallExpr(new ThisExpr(), "setNotCompletedDeadlines", NodeList.nodeList(toDeadlineExpression(info.getParameter("NotCompletedNotify"))))); block.addStatement(new MethodCallExpr(new ThisExpr(), "setNotStartedReassignments", NodeList.nodeList(toDeadlineExpression(info.getParameter("NotStartedReassign"))))); - block.addStatement(new MethodCallExpr(new ThisExpr(), "setNotCompletedReassigments", NodeList.nodeList(toDeadlineExpression(info.getParameter("NotCompletedReassign"))))); + block.addStatement(new MethodCallExpr(new ThisExpr(), "setNotCompletedReassignments", NodeList.nodeList(toDeadlineExpression(info.getParameter("NotCompletedReassign"))))); generatedFiles.add(new GeneratedFile(GeneratedFileType.SOURCE, UserTaskCodegenHelper.path(info).resolve(className + ".java"), unit.toString())); } @@ -240,7 +240,7 @@ private Expression toDeadlineExpression(Object parameter) { DeadlineHelper.parseDeadlines(stringParam); return toStringExpression(stringParam); } catch (Exception e) { - LOG.debug("to deadline calculation failure. {} it is not a proper expression"); + LOG.debug("to deadline calculation failure. {} it is not a proper expression", stringParam); } } return new CastExpr(StaticJavaParser.parseType(String.class.getName()), new NullLiteralExpr());