code: private void publishEvent(WSJobInstance objectToPublish, String eventToPublish) {
  
          if (getBatchEventsPublisher() != null) {
              getBatchEventsPublisher().publishJobInstanceEvent(objectToPublish, eventToPublish, correlationId);
          }
      }
docs: Publish event for this job instance
  
  @param jobInstance
  @param eventToBePublished