JBoss Community

Re: Jbpm 5 user form variables

created by onkar ruikar in jBPM - View the full discussion

You can try this solution:


In content variable pass the map as mvel. Following is the sample map:

     [ '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:

        ContentData content = null;
        String contentString = workItem.getParameter("Content").toString();
        //evaluate mvel
        ExpressionCompiler compiler = new ExpressionCompiler(contentString.trim());
        ParserContext context = new ParserContext();
        Map<String, String> contentObject =(Map<String, String>) MVEL.executeExpression(compiler.compile(context));

Reply to this message by going to Community

Start a new discussion in jBPM at Community