diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-08-04 18:46:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-04 18:46:19 +0000 |
commit | 67fcd08422c7c3e277bdf203152e4d6eb6325307 (patch) | |
tree | 409f2eb463fbc622082784e2a7d15e5a04b37291 /ms/blueprintsprocessor/modules | |
parent | 3a805cf06273194a25117daf068dc5198f6ce711 (diff) | |
parent | 5a6330bc964c738ac8014f7cbf77b31806ee10f3 (diff) |
Merge "Remove service annotation for ImperativeBluePrintWorkflowService" into frankfurt
Diffstat (limited to 'ms/blueprintsprocessor/modules')
2 files changed, 4 insertions, 12 deletions
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt index 06100f1fc..2aa408527 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt @@ -31,17 +31,14 @@ import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflow import org.onap.ccsdk.cds.controllerblueprints.core.logger import org.onap.ccsdk.cds.controllerblueprints.core.service.AbstractBluePrintWorkFlowService import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService -import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintWorkFlowService import org.onap.ccsdk.cds.controllerblueprints.core.service.NodeExecuteMessage import org.onap.ccsdk.cds.controllerblueprints.core.service.NodeSkipMessage import org.onap.ccsdk.cds.controllerblueprints.core.service.WorkflowExecuteMessage -import org.springframework.beans.factory.config.ConfigurableBeanFactory -import org.springframework.context.annotation.Scope import org.springframework.stereotype.Service @Service("imperativeWorkflowExecutionService") class ImperativeWorkflowExecutionService( - private val imperativeBluePrintWorkflowService: BluePrintWorkFlowService<ExecutionServiceInput, ExecutionServiceOutput> + private val nodeTemplateExecutionService: NodeTemplateExecutionService ) : BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> { @@ -57,15 +54,11 @@ class ImperativeWorkflowExecutionService( val graph = bluePrintContext.workflowByName(workflowName).asGraph() - return imperativeBluePrintWorkflowService.executeWorkflow( - graph, bluePrintRuntimeService, - executionServiceInput - ) + return ImperativeBluePrintWorkflowService(nodeTemplateExecutionService) + .executeWorkflow(graph, bluePrintRuntimeService, executionServiceInput) } } -@Service -@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionService: NodeTemplateExecutionService) : AbstractBluePrintWorkFlowService<ExecutionServiceInput, ExecutionServiceOutput>() { diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt index 415f11d58..ae723d164 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt @@ -118,8 +118,7 @@ class ImperativeWorkflowExecutionServiceTest { ExecutionServiceInput::class.java )!! - val bluePrintWorkFlowService = ImperativeBluePrintWorkflowService(NodeTemplateExecutionService()) - val imperativeWorkflowExecutionService = ImperativeWorkflowExecutionService(bluePrintWorkFlowService) + val imperativeWorkflowExecutionService = ImperativeWorkflowExecutionService(NodeTemplateExecutionService()) val output = imperativeWorkflowExecutionService .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf()) assertNotNull(output, "failed to get imperative workflow output") |