0 Replies Latest reply on Sep 6, 2011 5:00 PM by Luis Tamayo

    get objects from task cast conversion error

    Luis Tamayo Newbie

      Always the object returned is String, do you have any ideas how can I get the object modified in previus task. 

       

       

      public String imprimirTareasConsola() {

              HumanTaskClientMina htk = new HumanTaskClientMina();

              User u = new User("operator");

              System.out.println("======>Operador");

              List<TaskSummary> t = htk.getAssignedTasks(u);

              if (t != null && t.size() > 0) {

                  Object xx = htk.getTaskContentInput(t.get(0));

       

                  if (xx != null) {

       

                      if (xx != null) {

                          System.out.println("===> Class name en content:   "

                                  + xx.getClass().getName());

                          if (xx instanceof Persona) {

                              System.out.println("==00> Id en content type "

                                      + ((Persona) xx).getId());

                          } else if (xx instanceof String) {

                              System.out.println("==00> name type " + (String) xx);

                          }

                          System.out

                                  .println("===> cerrando Class name en content:   ");

                      } else {

                          System.out.println("==> El content es null ");

                      }

                  }

       

                  return null;

              }

       

          }