JBoss Community

get objects from task cast conversion error

created by Luis Tamayo in jBPM Development - View the full discussion

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;

        }

 

    }

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community