docs: public Long getProcessInstanceByCorrelationKey(CorrelationKey correlationKey) {
          Query processInstancesForEvent = getEntityManager().createNamedQuery( "GetProcessInstanceIdByCorrelation" );
          processInstancesForEvent.setParameter( "ckey", correlationKey.toExternalForm());
          
          try {
              return (Long) processInstancesForEvent.getSingleResult();
          } catch (NonUniqueResultException e) {
              return null;
          } catch (NoResultException e) {
              return null;
          }
      }