1 Reply Latest reply on Apr 3, 2006 4:32 AM by Hannes Stillerich

    Add HttpPost-Vars to Context Vars

    Ken Nung Newbie

      Hi,

      I tried to add the POST-Vars of a servlet-request to jbpm-context-vars, but I cant access them after that. The code is:

      protected void doPost(HttpServletRequest req, HttpServletResponse response) ..{
      ..
       ProcessInstance processInstance =
       new ProcessInstance(processDefinition);
       processInstance.getContextInstance().addVariables(req.getParameterMap());
       System.out.print(processInstance.getContextInstance().getVariables());
       System.out.print(req.getParameterMap());
       System.out.print(req.getParameter("product"));
       System.out.print(processInstance.getContextInstance().getVariable("product");
      ..
      


      The first and the 2nd output are exactly the same, 3rd and 4th are different - 3rd is the correct string, 4th an Object.
      I'm out of ideas :(

      regards, ken