Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-3454

Process form renderer for Date objects doesn't submit the correct data

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.11.1.GA
    • 7.9.1.GA
    • Form Modeler
    • None
    • False
    • False
    • CR1
    • Undefined
    • Hide

       

      1) Create data object with a single field of type 'Date'

      2) Create process with a variable of the type created in step 1
      3) Generate process form
      4) Start process in Business Central
      5) Date picker widget is used to input the date
      6) Click submit, the error on the server side is:

      Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "[object Object]": not a valid representation (error: Failed to parse Date value '[object Object]': Cannot parse date "[object Object]": not compatible with any of standard forms ("yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS", "EEE, dd MMM yyyy HH:mm:ss zzz", "yyyy-MM-dd"))

       

      Show
        1) Create data object with a single field of type 'Date' 2) Create process with a variable of the type created in step 1 3) Generate process form 4) Start process in Business Central 5) Date picker widget is used to input the date 6) Click submit, the error on the server side is: Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String " [object Object] ": not a valid representation (error: Failed to parse Date value ' [object Object] ': Cannot parse date " [object Object] ": not compatible with any of standard forms ("yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS", "EEE, dd MMM yyyy HH:mm:ss zzz", "yyyy-MM-dd"))  
    • ---
    • ---
    • 2021 Week 19-21 (from May 10), 2021 Week 22-24 (from May 31), 2021 Week 25-27 (from Jun 21)

    Description

      When submitting a form with a Date field, the payload contains the string "[object Object]" instead of the correct date.  The reason is because the rendered form contains the following:

      function getData() {
      return {'date' : {'com.myspace.test_form_date.DateObject' :

      {'date' : *String*(getDateFormated('field_1558564792283367E12'))}

      }}
      };

      The right rendered function should be:

      function getData() {
      return {'date' : {'com.myspace.test_form_date.DateObject' :

      {'date' : *Object*(getDateFormated('field_1558564792283367E12'))}

      }}
      };

       

      This seems like an error in 

      org.kie.server.services.jbpm.ui.form.render.AbstractFormRenderer

       

      Attachments

        Issue Links

          Activity

            People

              abkuma abhishek kumar
              hwu@redhat.com Hao Wu
              Jan Stastny Jan Stastny
              Jan Stastny Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: