* @param jobExecution the job execution
* @param stepExecution the step execution
* @return the job execution type
*/
public static JobExecutionType convertJobExecutionType(JobExecution jobExecution, StepExecution stepExecution) {
JobExecutionType type = new JobExecutionType();
type.id = jobExecution.getId();
type.version = jobExecution.getVersion();
// TODO: ??? can it be null???
if (jobExecution.getJobInstance() != null) {