Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed deploy #58

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
public class BpmnBankConfigService {
@Inject
protected BpmnBankConfigRepository bankConfigRepository;

@Inject
BpmnConfigMapper bpmnConfigMapper;

Expand All @@ -45,7 +44,6 @@ public Uni<Optional<BpmnBankConfig>> findByConfigurationsAndFunction(String acqu
if (x.size() > 1) {
throw new AtmLayerException("Multiple BPMN found for a single configuration.", Response.Status.INTERNAL_SERVER_ERROR, AppErrorCodeEnum.ATMLM_500);
}

return Uni.createFrom().item(x.isEmpty() ? Optional.empty() : Optional.ofNullable(x.get(0)));
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,11 @@ public Uni<WorkflowResource> setDeployInfo(UUID uuid, DeployResponseDto response
DeployedBPMNProcessDefinitionDto deployedProcessInfo = optionalDeployedProcessDefinition.get();
workflowResource.setDefinitionVersionCamunda(deployedProcessInfo.getVersion());
workflowResource.setDeploymentId(deployedProcessInfo.getDeploymentId());
workflowResource.setCamundaDefinitionId(deployedProcessInfo.getId());
workflowResource.setDeployedFileName(deployedProcessInfo.getName());
workflowResource.setDescription(deployedProcessInfo.getDescription());
workflowResource.setResource(deployedProcessInfo.getResource());
workflowResource.setStatus(StatusEnum.DEPLOYED);
}
if (response.getDeployedDecisionDefinitions() != null) {
} else if (response.getDeployedDecisionDefinitions() != null) {
Map<String, DeployedDMNDecisionDefinitionDto> deployedDecisionDefinitions = response.getDeployedDecisionDefinitions();
Optional<DeployedDMNDecisionDefinitionDto> optionalDeployedDecisionDefinition = deployedDecisionDefinitions.values()
.stream().findFirst();
Expand All @@ -222,15 +220,14 @@ public Uni<WorkflowResource> setDeployInfo(UUID uuid, DeployResponseDto response
DeployedDMNDecisionDefinitionDto deployedDecisionDefinition = optionalDeployedDecisionDefinition.get();
workflowResource.setDefinitionVersionCamunda(deployedDecisionDefinition.getVersion());
workflowResource.setDeploymentId(deployedDecisionDefinition.getDeploymentId());
workflowResource.setCamundaDefinitionId(deployedDecisionDefinition.getId());
workflowResource.setDeployedFileName(deployedDecisionDefinition.getName());
workflowResource.setResource(deployedDecisionDefinition.getResource());
workflowResource.setStatus(StatusEnum.DEPLOYED);
} else {
workflowResource.setCamundaDefinitionId(response.getId());
workflowResource.setDeployedFileName(response.getName());
workflowResource.setStatus(StatusEnum.DEPLOYED);
}
workflowResource.setCamundaDefinitionId(response.getId());
return this.workflowResourceRepository.persist(workflowResource);
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,8 @@ void setDeployInfoEmptyProcessDefinitions() {
void setDeployInfoEmptyDecisionDefinitions() {
UUID expectedId = UUID.randomUUID();
WorkflowResource expectedWorkflowResource = new WorkflowResource();
Map<String, DeployedBPMNProcessDefinitionDto> deployedProcessDefinitions = new HashMap<>();
deployedProcessDefinitions.put("key", new DeployedBPMNProcessDefinitionDto());
Map<String, DeployedDMNDecisionDefinitionDto> deployedDecisionDefinitions = new HashMap<>();
DeployResponseDto deployResponseDto = new DeployResponseDto();
deployResponseDto.setDeployedProcessDefinitions(deployedProcessDefinitions);
deployResponseDto.setDeployedDecisionDefinitions(deployedDecisionDefinitions);
when(workflowResourceRepository.findById(any(UUID.class))).thenReturn(Uni.createFrom().item(expectedWorkflowResource));
workflowResourceService.setDeployInfo(expectedId, deployResponseDto)
Expand Down
Loading