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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]