[jboss-dev-forums] [jBPM Development] - get objects from task cast conversion error

Luis Tamayo do-not-reply at jboss.com
Tue Sep 6 17:00:46 EDT 2011


Luis Tamayo [http://community.jboss.org/people/luis.tamayo] created the discussion

"get objects from task cast conversion error"

To view the discussion, visit: http://community.jboss.org/message/625133#625133

--------------------------------------------------------------
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
[http://community.jboss.org/message/625133#625133]

Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110906/b7aa3312/attachment.html 


More information about the jboss-dev-forums mailing list