[jboss-user] [jBPM] - Re: Jbpm 5 user form variables

onkar ruikar do-not-reply at jboss.com
Mon Jan 3 07:05:19 EST 2011


onkar ruikar [http://community.jboss.org/people/onkarruikar] created the discussion

"Re: Jbpm 5 user form variables"

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

--------------------------------------------------------------
You can try this solution:

In content variable pass the map as mvel. Following is the sample map:
h6.      [ 'reminderInterval' : new String("#{reminderInterval}"),
           'report' : new String( "#{report}")
         ];
 And in human task handler(WSHumanTaskHandler or CommandBasedWSHumanTaskHandler) modify executeWorkItem(WorkItem,WorkItemManager) method. Add following lines at bottom part of the method before serialisation:
h6.         ContentData content = null;
        String contentString = workItem.getParameter("Content").toString();
        //evaluate mvel
        ExpressionCompiler compiler = new ExpressionCompiler(contentString.trim());
        ParserContext context = new ParserContext();
        context.addPackageImport("java.lang");
        Map<String, String> contentObject =(Map<String, String>) MVEL.executeExpression(compiler.compile(context));
--------------------------------------------------------------

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

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/20110103/6d6dea60/attachment.html 


More information about the jboss-user mailing list