[jboss-user] [jBPM] - Re: Can a POJO be Parameter Mapped?

Demian Calcaprina do-not-reply at jboss.com
Tue Aug 2 18:21:53 EDT 2011


Demian Calcaprina [http://community.jboss.org/people/calca] created the discussion

"Re: Can a POJO be Parameter Mapped?"

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

--------------------------------------------------------------
Gary, if you use the default work item :
org.jbpm.bpmn2.handler.ServiceTaskHandler

I think the parameter has to be called "Parameter". 

And then it is invoked:
...
*    Object parameter = workItem.getParameter("Parameter");*
        try {
            Class<?> c = Class.forName(i);
            Object instance = c.newInstance();
            Class<?>[] classes = null;
            Object[] params = null;
            if (parameterType != null) {
                classes = new Class<?>[] {
                    Class.forName(parameterType)
                };
                params = new Object[] {
                    parameter
                };
            }
            Method method = c.getMethod(operation, classes);
*            Object result = method.invoke(instance, params);*

Demian
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/618912#618912]

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110802/b2c0b4d3/attachment.html 


More information about the jboss-user mailing list