private void addApplicationJobStatusData(String jobId, ApplicationJobStatus status, Date updatedTime, GFacJobDataResource dataResource) throws RegistryException {
if (RegistrySettings.isApplicationJobStatusHistoryEnabled()){
if (dataResource==null){
dataResource = jpa.getWorker().getGFacJob(jobId);
}
GFacJobStatusResource s = (GFacJobStatusResource)dataResource.create(ResourceType.GFAC_JOB_STATUS);
s.setStatus(status.toString());
s.setStatusUpdateTime(new Timestamp(updatedTime.getTime()));
s.save();
}
}