class RegisterForPnfReadyEvent implements JavaDelegate {

    @Override
    public void execute(DelegateExecution execution) {
        try {
            String pnfName = getPnfName(execution);
            fillExecution(execution, pnfName);
            RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
            dmaapClient.registerForUpdate(pnfName, () -> runtimeService.createMessageCorrelation("WorkflowMessage")
                    .processInstanceId(execution.getProcessInstanceId()).correlateWithResult());
        } catch (BBObjectNotFoundException e) {
            LOGGER.error(ERROR_MESSAGE_PNF_NOT_FOUND);
            exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, ERROR_MESSAGE_PNF_NOT_FOUND);
        }
    }

    @Autowired public  RegisterForPnfReadyEvent(DmaapClient dmaapClient, ExtractPojosForBB extractPojosForBB,
            ExceptionBuilder exceptionBuilder,
            @Value("${aai.pnfEntryNotificationTimeout}") String pnfEntryNotificationTimeout);

}