@Override
 public void updateDataInstance(
     final SDataInstance dataInstance, final EntityUpdateDescriptor descriptor)
     throws SDataInstanceException {
   NullCheckingUtil.checkArgsNotNull(dataInstance);
   final UpdateRecord updateRecord = UpdateRecord.buildSetFields(dataInstance, descriptor);
   final SUpdateEvent updateEvent = getUpdateEvent(dataInstance);
   try {
     recorder.recordUpdate(updateRecord, updateEvent);
   } catch (final SRecorderException e) {
     throw new SUpdateDataInstanceException(
         "Impossible to update data instance '" + dataInstance.getName() + "': " + e.getMessage(),
         e);
   }
 }
 @Override
 public void updateProcess(
     final SProcessInstance processInstance, final EntityUpdateDescriptor descriptor)
     throws SProcessInstanceModificationException {
   try {
     final UpdateRecord updateRecord = UpdateRecord.buildSetFields(processInstance, descriptor);
     SUpdateEvent updateEvent = null;
     if (eventService.hasHandlers(PROCESSINSTANCE, EventActionType.UPDATED)) {
       updateEvent =
           (SUpdateEvent)
               BuilderFactory.get(SEventBuilderFactory.class)
                   .createUpdateEvent(PROCESSINSTANCE)
                   .setObject(processInstance)
                   .done();
     }
     recorder.recordUpdate(updateRecord, updateEvent);
   } catch (final SRecorderException e) {
     throw new SProcessInstanceModificationException(e);
   }
 }
 private void updateProcessInstance(
     final SProcessInstance processInstance,
     final String message,
     final EntityUpdateDescriptor descriptor,
     final String eventType)
     throws SProcessInstanceModificationException {
   final UpdateRecord updateRecord = UpdateRecord.buildSetFields(processInstance, descriptor);
   SUpdateEvent updateEvent = null;
   if (eventService.hasHandlers(eventType, EventActionType.UPDATED)) {
     updateEvent =
         (SUpdateEvent)
             BuilderFactory.get(SEventBuilderFactory.class)
                 .createUpdateEvent(eventType)
                 .setObject(processInstance)
                 .done();
   }
   try {
     recorder.recordUpdate(updateRecord, updateEvent);
   } catch (final SRecorderException e) {
     throw new SProcessInstanceModificationException(e);
   }
 }