Aurélien Pelletier
2013-03-08 08:06:17 UTC
Aurélien Pelletier [https://community.jboss.org/people/apelletier] created the discussion
"Cannot retrieve Boolean/Integer variable from generated process start form"
To view the discussion, visit: https://community.jboss.org/message/801498#801498
--------------------------------------------------------------
Hello,
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.TestInt/render 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:
https://bugzilla.redhat.com/show_bug.cgi?id=854965 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,
Aurélien
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/801498#801498]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
"Cannot retrieve Boolean/Integer variable from generated process start form"
To view the discussion, visit: https://community.jboss.org/message/801498#801498
--------------------------------------------------------------
Hello,
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.TestInt/render 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:
https://bugzilla.redhat.com/show_bug.cgi?id=854965 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,
Aurélien
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/801498#801498]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]