class VertxJobsService extends RestJobsService {

    @Override
    public String scheduleProcessInstanceJob(ProcessInstanceJobDescription description) {
        String callback = getCallbackEndpoint(description);
        LOGGER.debug("Job to be scheduled {} with callback URL {}", description, callback);
        final Job job = JobBuilder.builder()
                .id(description.id())
                .expirationTime(description.expirationTime().get())
                .repeatInterval(description.expirationTime().repeatInterval())
                .repeatLimit(description.expirationTime().repeatLimit())
                .priority(0)
                .callbackEndpoint(callback)
                .processId(description.processId())
                .processInstanceId(description.processInstanceId())
                .rootProcessId(description.rootProcessId())
                .rootProcessInstanceId(description.rootProcessInstanceId())
                .build();

        client.post(JOBS_PATH).sendJson(job, res -> {
            
            if (res.succeeded() && res.result().statusCode() == 200) {
                LOGGER.debug("Creating of the job {} done with status code {} ", job, res.result().statusCode());
            } else {
                LOGGER.error("Scheduling of job {} failed with response code {}", job, res.result().statusCode(), res.cause());
            }
        });
        
        return job.getId();
    }

    @Inject public  VertxJobsService(@ConfigProperty(name = "kogito.jobs-service.url") String jobServiceUrl,
                            @ConfigProperty(name = "kogito.service.url") String callbackEndpoint,
                            Vertx vertx,
                            Instance<WebClient> providedWebClient);
      VertxJobsService();

}