title: What Makes A JavaFx 2 Task Succeed/Fail
body: <p>I have a task that does a Navison look up and returns an ObservableList or Null.<br>
  No matter if if the look up is successful and the list populates or not the task always calls the failed() and never the succeeded()!<br>
  Any ideas why this is happening?<br>
  Here is my task:<br></p>
  
  <pre><code>    public class LoadLocsTask extends Task&lt;Void&gt;{
      Button button;
      @Override protected Void call() throws Exception {
  
              ObservableList&lt;String&gt; list = application.getValidator().getLocList(button.getText());
              if(list != null){
                  locationList.setItems(list);
              }else{
                  Dialogs.showErrorDialog(application.getPrimaryStage(),"An error occured while retrieving the loaction list from navision.", "Please contact IS department", "Unable To Populate Location List");
                  locationList.setItems(null);
              }
          return null;    
      }
  
      @Override protected void succeeded() {
          super.succeeded();
          selectProgressIndicator.setVisible(false);
          disableSelected(button);
  
      }
      @Override protected void failed() {
          super.failed();
          selectProgressIndicator.setVisible(false);
          disableSelected(button);
  
      }
      @Override protected void scheduled() {
          super.scheduled();
          locationList.getSelectionModel().clearSelection();
          locationList.setItems(null);
          selectProgressIndicator.setVisible(true);
          disableAll();
  
      }
      @Override protected void cancelled() {
          super.cancelled();
          logger.info("Cancelled");
          locationList.setItems(null);
          selectProgressIndicator.setVisible(true);
  
      }
  </code></pre>
  
  <p>Here is application.getValidator().getLocList(button.getText())<br></p>
  
  <pre><code>public ObservableList&lt;String&gt; getLocList(String selectedLoc) {
      ObservableList&lt;String&gt; binsOL = null;
      String warehouseCode = null;
      if (selectedLoc.equalsIgnoreCase("location1")) {
          warehouseCode = "LOCATION1";
      } else if (selectedLoc.equalsIgnoreCase("location2")) {
          warehouseCode = "LOCATION2";
      } else if (selectedLoc.equalsIgnoreCase("location3")) {
          warehouseCode = "LOCATION3";
      } else if (selectedLoc.equalsIgnoreCase("location4")) {
          warehouseCode = "LOCATION4";
      } else if (selectedLoc.equalsIgnoreCase("location5")) {
          warehouseCode = "LOCATION5";
      } 
  
      if (warehouseCode != null) {
          try {
              binsOL = FXCollections.observableArrayList();
              Bins[] bins = navWebservice.getBinsList(warehouseCode);
              for (Bins bin : bins) {
                  binsOL.add(bin.getCode());
              }
          } catch (RemoteException e) {
              logger.error("LocationSelectionController - processLocButton(): Could not generate list for " + warehouseCode + " button", e);
              Dialogs.showErrorDialog(parentApp.getPrimaryStage(), e.getMessage(), "Please contact IS department", "Unable To Populate Location List");
  
          }
      }
      return binsOL;
  
  }
  </code></pre>
  
  <p>Thanks in advance!!!</p>