use of org.onap.so.db.catalog.beans.Workflow in project so by onap.
the class InstanceManagement method getCustomWorkflowUri.
private RecipeLookupResult getCustomWorkflowUri(String workflowUuid) {
Workflow workflow = catalogDbClient.findWorkflowByArtifactUUID(workflowUuid);
if (workflow != null) {
String workflowName = workflow.getName();
String recipeUri = "/mso/async/services/" + workflowName;
return new RecipeLookupResult(recipeUri, 180);
}
return null;
}
use of org.onap.so.db.catalog.beans.Workflow in project so by onap.
the class InstanceManagement method setWorkflowNameAndOperationName.
protected InfraActiveRequests setWorkflowNameAndOperationName(InfraActiveRequests currentActiveReq, String workflowUuid) {
Workflow workflow = catalogDbClient.findWorkflowByArtifactUUID(workflowUuid);
if (workflow != null) {
currentActiveReq.setWorkflowName(workflow.getName());
currentActiveReq.setOperationName(workflow.getOperationName());
}
return currentActiveReq;
}
use of org.onap.so.db.catalog.beans.Workflow in project so by onap.
the class WorkflowRepositoryTest method findByArtifactUuid_ValidUuid_ExpectedOutput.
@Test
public void findByArtifactUuid_ValidUuid_ExpectedOutput() throws Exception {
Workflow workflow = workflowRepository.findByArtifactUUID("5b0c4322-643d-4c9f-b184-4516049e99b1");
assertEquals("artifactName", "testingWorkflow.bpmn", workflow.getArtifactName());
}
use of org.onap.so.db.catalog.beans.Workflow in project so by onap.
the class CatalogDbClientTest method testFindWorkflowByPnfModelUUID.
@Test
public final void testFindWorkflowByPnfModelUUID() {
String pnfResourceModelUUID = "f2d1f2b2-88bb-49da-b716-36ae420ccbff";
doReturn(new ArrayList()).when(catalogDbClient).getMultipleResources(any(), any());
List<Workflow> results = catalogDbClient.findWorkflowByPnfModelUUID(pnfResourceModelUUID);
verify(catalogDbClient).getMultipleResources(any(Client.class), eq(UriBuilder.fromUri("/findWorkflowByPnfModelUUID").queryParam(CatalogDbClient.PNF_RESOURCE_MODEL_UUID, pnfResourceModelUUID).build()));
}
Aggregations