title: setOnSucceeded is not called
body: <p>I'm trying to implement JavaFX Task with setOnSucceeded listener.</p>
  
  <pre><code>class GetDailySalesTask extends Task&lt;ObservableList&lt;VBox&gt;&gt;
      {
  
          @Override
          protected ObservableList&lt;VBox&gt; call() throws Exception
          {
              TabContentInfrastructure content = new TabContentInfrastructure();
              return FXCollections.observableArrayList(content.initTestTabContentData());
          }
      }
  </code></pre>
  
  <p>And I call the Java Class here:</p>
  
  <pre><code>VBox vb = new VBox();
  
  Task&lt;ObservableList&lt;VBox&gt;&gt; task = new GetDailySalesTask();
  
  Region veil = new Region();
  veil.setStyle("-fx-background-color: rgba(0, 0, 0, 0.4)");
  veil.setPrefSize(240, 160);
  ProgressIndicator p = new ProgressIndicator();
  p.setMaxSize(140, 140);
  
  //p.progressProperty().bind(service.progressProperty());
  veil.visibleProperty().bind(task.runningProperty());
  p.visibleProperty().bind(task.runningProperty());
  //vb.visibleProperty().bind(service.runningProperty().not());
  //tableView.itemsProperty().bind(service.valueProperty());
  
  StackPane stack = new StackPane();
  
  System.out.println("service.valueProperty() = " + task.valueProperty());
  
  task.setOnSucceeded(new EventHandler&lt;WorkerStateEvent&gt;()
  {
      @Override
      public void handle(WorkerStateEvent t){
  
          System.out.print("Yes**********" + t.getSource().getValue());
          stack.getChildren().clear();
          t.getSource().getValue();
          stack.getChildren().addAll(task.getValue().get(0));
  
  
      }
  });
  
  
  
  task.setOnFailed(new EventHandler&lt;WorkerStateEvent&gt;()
  {
      @Override
      public void handle(WorkerStateEvent t){
  
          System.out.print("Entered setOnFailed**********" + t.getSource().getValue());
  
  
  
      }
  });
  
  
  
  stack.getChildren().addAll(vb, veil, p);
  
  tabdata.setContent(stack);
  new Thread(task).start();
  </code></pre>
  
  <p>And for some reason setOnSucceeded is not called. Can you help me to fix this issue?</p>
  
  <p>P.S</p>
  
  <pre><code>public class TabContentInfrastructure
  {
  
      public VBox initTestTabContentData() throws InterruptedException
      {
  
          Thread.sleep(5000);
          final VBox vbox = new VBox(0);
          FlowPane flow = new FlowPane();
          ........................
          vbox.getChildren().addAll(flow, screenController);
          return vbox;    
      }
  }
  </code></pre>