title: Notifying Google PubSub when Dataflow job is complete
body: <p>Is there a way to publish a message onto Google Pubsub after a Google Dataflow job completes? We have a need to notify dependent systems that the processing of incoming data is complete. How could Dataflow publish after writing data to the sink?</p>
  
  <p><strong>EDIT:</strong> 
  We want to notify after a pipeline completes writing to GCS. Our pipeline looks like this:</p>
  
  <pre> 
  Pipeline.create(options)
                  .apply(....)
                  .apply(AvroIO.Write.named("Write to GCS")
                               .withSchema(Extract.class)
                               .to(options.getOutputPath())
                               .withSuffix(".avro"));
  p.run();
  </pre>
  
  <p>If we add logic outside of the pipeline.apply(...) methods we are notified when the code completes execution, not when the pipeline is completed. Ideally we could add another <code>.apply(...)</code> after the AvroIO sink and publish a message to PubSub.</p>