code: private void publishEvent(WSJobInstance objectToPublish, String eventToPublishTo, String correlationId) {
          if (eventsPublisher != null) {
              eventsPublisher.publishJobInstanceEvent(objectToPublish, eventToPublishTo, correlationId);
          }
      }
docs: Publish jms topic if batch jms event is available
  
  @param objectToPublish WSJobInstance
  @param eventToPublish