You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/09/30 07:20:20 UTC

[GitHub] [fineract] adamsaghy commented on a diff in pull request #2625: [FINERACT-1678] business step configuration fix

adamsaghy commented on code in PR #2625:
URL: https://github.com/apache/fineract/pull/2625#discussion_r984285596


##########
fineract-provider/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterServiceImpl.java:
##########
@@ -59,15 +60,22 @@ public JobBusinessStepConfigData getBusinessStepConfigByJobName(String jobName)
     public CommandProcessingResult updateStepConfigByJobName(JsonCommand command, String jobName)
             throws BusinessStepNotBelongsToJobException {
         List<BusinessStep> businessSteps = dataParser.parseUpdate(command);
-        List<BatchBusinessStep> batchBusinessSteps = batchBusinessStepRepository.findAllByJobName(jobName);
-        businessSteps.forEach(newBusinessStepConfig -> {
-            BatchBusinessStep batchBusinessStep = batchBusinessSteps.stream()
-                    .filter(oldBusinessStepConfig -> oldBusinessStepConfig.getStepName().equals(newBusinessStepConfig.getStepName()))
-                    .findFirst().orElseThrow(BusinessStepNotBelongsToJobException::new);
-            batchBusinessStep.setStepName(newBusinessStepConfig.getStepName());
-            batchBusinessStep.setStepOrder(newBusinessStepConfig.getOrder());
-            batchBusinessStepRepository.save(batchBusinessStep);
-        });
+        List<String> availableBusinessStepNames = getAvailableBusinessStepsByJobName(BusinessStepCategory.LOAN.name())

Review Comment:
   Please merge together the "availableBusinessStepNames" and "notValidBusinessStepNames" filter



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org