Package org.activiti.rest.service.api.management

Examples of org.activiti.rest.service.api.management.JobResponse


    result.setUrl(formatUrl(serverRootUrl, RestUrls.URL_TABLE, name));
    return result;
  }
 
  public JobResponse createJobResponse(Job job, String serverRootUrl) {
    JobResponse response = new JobResponse();
    response.setId(job.getId());
    response.setDueDate(job.getDuedate());
    response.setExceptionMessage(job.getExceptionMessage());
    response.setExecutionId(job.getExecutionId());
    response.setProcessDefinitionId(job.getProcessDefinitionId());
    response.setProcessInstanceId(job.getProcessInstanceId());
    response.setRetries(job.getRetries());
    response.setTenantId(job.getTenantId());
   
    response.setUrl(formatUrl(serverRootUrl, RestUrls.URL_JOB, job.getId()));
   
    if (job.getProcessDefinitionId() != null) {
      response.setProcessDefinitionUrl(formatUrl(serverRootUrl, RestUrls.URL_PROCESS_DEFINITION, job.getProcessDefinitionId()));
    }
   
    if (job.getProcessInstanceId() != null) {
      response.setProcessInstanceUrl(formatUrl(serverRootUrl, RestUrls.URL_PROCESS_INSTANCE, job.getProcessInstanceId()));
    }
   
    if (job.getExecutionId() != null) {
      response.setExecutionUrl(formatUrl(serverRootUrl, RestUrls.URL_EXECUTION, job.getExecutionId()));
    }
   
    return response;
  }
View Full Code Here

TOP

Related Classes of org.activiti.rest.service.api.management.JobResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.