class SDNCAssignTasks extends AbstractSDNCTask {

    public void assignNetwork(BuildingBlockExecution execution) {
        try {
            GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
            L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID);
            ServiceInstance serviceInstance =
                    extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
            Customer customer = gBBInput.getCustomer();
            RequestContext requestContext = gBBInput.getRequestContext();
            CloudRegion cloudRegion = gBBInput.getCloudRegion();
            GenericResourceApiNetworkOperationInformation req = sdncNetworkResources.assignNetwork(l3network,
                    serviceInstance, customer, requestContext, cloudRegion);
            SDNCRequest sdncRequest = new SDNCRequest();
            sdncRequest.setSDNCPayload(req);
            sdncRequest.setTopology(SDNCTopology.NETWORK);
            execution.setVariable(SDNC_REQUEST, sdncRequest);
        } catch (Exception ex) {
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}