class SDNCAssignTasks extends AbstractSDNCTask {

    public void assignServiceInstance(BuildingBlockExecution execution) {
        try {
            GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
            RequestContext requestContext = gBBInput.getRequestContext();
            ServiceInstance serviceInstance =
                    extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
            Customer customer = gBBInput.getCustomer();
            GenericResourceApiServiceOperationInformation req =
                    sdncSIResources.assignServiceInstance(serviceInstance, customer, requestContext);
            SDNCRequest sdncRequest = new SDNCRequest();
            sdncRequest.setSDNCPayload(req);
            sdncRequest.setTopology(SDNCTopology.SERVICE);
            execution.setVariable(SDNC_REQUEST, sdncRequest);
        } catch (Exception ex) {
            logger.error("Exception occurred", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}