class EtsiVnfDeleteTask {

    public void invokeVnfmAdapter(final BuildingBlockExecution execution) {
        try {
            LOGGER.debug("Executing invokeVnfmAdapter  ...");
            final GenericVnf vnf = extractPojosForBB.extractByKey(execution, GENERIC_VNF_ID);

            final Optional<DeleteVnfResponse> response = vnfmAdapterServiceProvider.invokeDeleteRequest(vnf.getVnfId());

            if (!response.isPresent()) {
                final String errorMessage = "Unexpected error while processing delete request";
                LOGGER.error(errorMessage);
                exceptionUtil.buildAndThrowWorkflowException(execution, 1211, errorMessage);
            }

            final DeleteVnfResponse vnfResponse = response.get();

            LOGGER.debug("Vnf delete response: {}", vnfResponse);
            execution.setVariable(Constants.DELETE_VNF_RESPONSE_PARAM_NAME, vnfResponse);

            LOGGER.debug("Finished executing invokeVnfmAdapter ...");
        } catch (final Exception exception) {
            LOGGER.error("Unable to invoke delete request", exception);
            exceptionUtil.buildAndThrowWorkflowException(execution, 1212, exception);
        }
    }

    @Autowired public  EtsiVnfDeleteTask(final ExceptionBuilder exceptionUtil, final ExtractPojosForBB extractPojosForBB,
            final VnfmAdapterServiceProvider vnfmAdapterServiceProvider);

}