class SpringRestJobsService extends RestJobsService {

    @Override
    public String scheduleProcessInstanceJob(ProcessInstanceJobDescription description) {
        String callback = getCallbackEndpoint(description);
        LOGGER.debug("Job to be scheduled {} with callback URL {}", description, callback);
        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();

        ResponseEntity<String> result = restTemplate.postForEntity(getJobsServiceUri(),
                                                                   job,
                                                                   String.class);
        if (result.getStatusCode().ordinal() == 200) {
            LOGGER.debug("Creating of the job {} done with status code {} ", job, result.getStatusCode());
        }
        return job.getId();
    }

    @Autowired public  SpringRestJobsService(
            @Value("${kogito.jobs-service.url}") String jobServiceUrl,
            @Value("${kogito.service.url}") String callbackEndpoint,
            @Autowired(required=false) RestTemplate restTemplate);
      SpringRestJobsService();

}