Skip to content
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 @@ -199,7 +199,7 @@ public ProjectComponentProvisionStatus asProjectComponentProvisionStatus(String
.catalogItemRef(projectComponentInfo.getCatalogItemRef())
.status(projectComponentInfo.getStatus())
.componentUrl(projectComponentInfo.getComponentUrl())
.workflowJobId(Optional.ofNullable(workflowJob).map(JobDetail::getId).map(Object::toString).orElse("N/A"))
.workflowJobId(projectComponentInfo.getWorkflowJobId())
.errorTask(Optional.ofNullable(workflowJob).map(JobDetail::getArtifacts).map(artifacts -> artifacts.getOrDefault(AwxResultNames.RESULT_OUTPUT.getValue(), "N/A")).orElse("N/A"))
.errorMessage(Optional.ofNullable(workflowJob).map(JobDetail::getArtifacts).map(artifacts -> artifacts.getOrDefault(AwxResultNames.RESULT_CODE.getValue(), "N/A")).orElse("N/A"))
.parameters(parameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void testAsProjectComponentProvisionStatusWithValidData() {
assertEquals("comp-123", result.getComponentId());
assertEquals("PROVISIONED", result.getStatus());
assertEquals("TEST_PROJECT", result.getProjectKey());
assertEquals("42", result.getWorkflowJobId());
assertEquals("12345", result.getWorkflowJobId());
assertEquals("SUCCESS", result.getErrorMessage());
assertEquals("Component provisioned successfully", result.getErrorTask());
}
Expand All @@ -59,7 +59,7 @@ void testAsProjectComponentProvisionStatusWithNullJobDetailId() {
projectKey, projectComponentInfo, jobDetail);

// Assert
assertEquals("N/A", result.getWorkflowJobId());
assertEquals("12345", result.getWorkflowJobId());
}

@Test
Expand Down
Loading