Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-3222

ClassCastException when I start a process instance with string parameters containing a number via REST API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.0.2
    • 6.0.1
    • Business Central
    • None

      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:

              swiderski.maciej Maciej Swiderski (Inactive)
              ibek1@redhat.com Ivo Bek
              Ivo Bek Ivo Bek
              Ivo Bek Ivo Bek
              Cheng Zhang (Inactive), Kris Verlaenen, Maciej Swiderski (Inactive), Rajesh Rajasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: