private void archiveProcessInstance(final SProcessInstance processInstance)
     throws SProcessInstanceModificationException {
   final SAProcessInstance saProcessInstance =
       BuilderFactory.get(SAProcessInstanceBuilderFactory.class)
           .createNewInstance(processInstance)
           .done();
   final ArchiveInsertRecord insertRecord = new ArchiveInsertRecord(saProcessInstance);
   try {
     archiveService.recordInsert(System.currentTimeMillis(), insertRecord);
   } catch (final SRecorderException e) {
     throw new SProcessInstanceModificationException(e);
   } catch (final SDefinitiveArchiveNotFound e) {
     if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.ERROR)) {
       logger.log(
           this.getClass(),
           TechnicalLogSeverity.ERROR,
           "The process instance was not archived. Id:" + processInstance.getId(),
           e);
     }
   }
 }