docs: public List<Long> getProcessInstancesWaitingForEvent(String type) {
      	EntityManager entityManager = getEntityManager();
      	if (entityManager != null) {
  	        Query processInstancesForEvent = getEntityManager().createNamedQuery( "ProcessInstancesWaitingForEvent" );
  	        processInstancesForEvent.setParameter( "type",
  	                                               type );
  	        return (List<Long>) processInstancesForEvent.getResultList();
      	} else {
      		// entity manager can be null when fireActivationCreated is
      		// called on session unmarshalling
      		return new ArrayList<Long>();
      	}
      }