0 Replies Latest reply on Mar 8, 2013 3:06 AM by apelletier

    Cannot retrieve Boolean/Integer variable from generated process start form




      I'm evaluating jbpm 5.4 and I'm trying to implement a very simple workflow:

      I want to start the process with an amount(Integer) variable then if amount>X do task A if amount<=  do task B.

      nothing fancy and I've figured how to implement it.


      But there is a bug:

      With the jbpm designer I define an amount:Integer in the variable definition of the process, then I generate the form, build the package...

      I use the generate form to launch the process: http://localhost:8080/gwt-console-server/rs/form/process/defaultPackage.TestAmount/render

      It works, but if I check the instance data in the jbpm console the amount variable is not an Integer but a String. Then if I try to use like an Integer I get a class cast Exception.


      This issue looks a lot like this one:

      Cannot retrieve Boolean variable from Human Task when using generated task form

      Which is fixed in 5.4...


      The workaround I'm using is to start the process with a user task where I submit again the amount. In this case the amount object is an Integer and it works.


      It looks like the conversion from String to Boolean/Integer/... is called for task generate form (/gwt-console-server/rs/form/task/{id}/render) but not for process start generated form (/gwt-console-server/rs/form/process/{id}/render)


      I've tried to define a dataoutput and dataMappingAssociation in the start event. But when I type the amount variable with amount:Integer the event start extra properties the type defition (:Integer) is removed when I save the file...


      Am I doing anything wrong ?


      Thanks for your help,