Bug 1069622 - ClassCastException when I start a process instance with string parameters containing a number via REST API
Summary: ClassCastException when I start a process instance with string parameters con...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER2
: 6.0.2
Assignee: Maciej Swiderski
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-25 12:21 UTC by Ivo Bek
Modified: 2014-08-06 19:50 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 19:50:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ivo Bek 2014-02-25 12:21:37 UTC
Description of problem:

I have a process definition which requires two String parameters. I will get ClassCastException when I start the process like this:

http://localhost:8080/business-central/rest/runtime/org.jboss:integration:1.2.0-SNAPSHOT/process/org.jboss.qa.bpms.ScriptTaskTwoVariables/start?map_var1=10&map_var2=20

java.lang.Long cannot be cast to java.lang.String because the numbers are recognized as numbers

I was trying changing the numbers:

http://localhost:8080/business-central/rest/runtime/org.jboss:integration:1.2.0-SNAPSHOT/process/org.jboss.qa.bpms.ScriptTaskTwoVariables/start?map_var1="10"&map_var2="20"

It works but not with the required output:

the variables really contains "10", "20" including the quotes.

A workaround is to start the process via StartProcessCommand and execute REST operation instead.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Maciej Swiderski 2014-04-10 16:41:50 UTC
fixed to honor "" as indicator that it should be string even though value might be converted to a number. So using "10" will be kept as string value of 10.

droolsjbpm-integration
master:
https://github.com/droolsjbpm/droolsjbpm-integration/commit/b7dd5e4959fd33572d545e1eb1a845d5f4f35a39

6.0.x:
https://github.com/droolsjbpm/droolsjbpm-integration/commit/70f0da47be04fdd6e5580630fc0dd0e53a0ef3a6

Comment 2 Ivo Bek 2014-05-05 09:32:24 UTC
Verified in BPMS 6.0.2.ER2


Note You need to log in before you can comment on or make changes to this bug.