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

Data Object's newly added field is present in the form but not populated

    Details

    • Type: Bug
    • Status: New (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.7.0.GA
    • Fix Version/s: None
    • Component/s: Form Modeler
    • Labels:
    • Environment:

      Fedora 30
      Business Central with KIE Server, internal H2 database

    • Affects Build:
      CR1
    • Steps to Reproduce:
      Hide

      1. Create a data object Person with one field name.
      2. Override toString() method of the data object, so it returns the value of the name field.
      3. Save the data object.
      4. Create a simple process definition (Start-End) and configure a process variable of type Person.
      5. Save the process definiton.
      6. Generate all forms.
      7. Deploy and create a process instance, input the name and check the process variables logs that the Person has the name set.
      8. Add an age field to the Person data object.
      9. Include age field in the toString() method.
      10. Save the data object.
      11. Delete the data object form and recreate it.
      12. Redeploy.
      13. Start a new process instance, the process start form should now include both name and age text input fields so fill them both.
      14. Inspect the variable logs of the process instance. You should see that age was null.
      15. Restart BC./Raise the version of the project.
      16. New process instance should behave correctly.

      Show
      1. Create a data object Person with one field name . 2. Override toString() method of the data object, so it returns the value of the name field. 3. Save the data object. 4. Create a simple process definition (Start-End) and configure a process variable of type Person. 5. Save the process definiton. 6. Generate all forms. 7. Deploy and create a process instance, input the name and check the process variables logs that the Person has the name set. 8. Add an age field to the Person data object. 9. Include age field in the toString() method. 10. Save the data object. 11. Delete the data object form and recreate it. 12. Redeploy. 13. Start a new process instance, the process start form should now include both name and age text input fields so fill them both. 14. Inspect the variable logs of the process instance. You should see that age was null. 15. Restart BC./Raise the version of the project. 16. New process instance should behave correctly.
    • Workaround Description:
      Hide

      Restart Business Central or raise the version of the project.

      Show
      Restart Business Central or raise the version of the project.

      Description

      In the beginning I create:

      • A data object Person with one field called name of type String and I also override the toString() method so I can easily inspect the variable log
      • A Start-End process definition with a process variable of type Person

      Then I generate all forms automatically. When I try to run the process instance, everything works as expected.

      After that, I want to add another field called age of type int. So I add it into the Person data object. Then I save it and go back to the process definition where I regenerate all forms. The first issue is that until I delete the Person form, it won't be regenerated. But maybe that is expected behaviour.

      After the form is regenerated, I redeploy the project and try to run the new process instance. Process start form correctly displays also the age input field, so I fill the name and age and I start a process instance. Then I inspect the variable logs of the process instance and I find that the value of the age field is null.

      Originally I found this when using the data object inside of a human task where I didn't have the newly added field populated. It appeared just blank.

      There are 2 possible workarounds right now:

      • Restart Business Central.
      • Raise the version from 1.0.0-SNAPSHOT to another version like 1.0.1-SNAPSHOT and redeploy.

      I believe it is connected with incorrect handling of the snapshot versions as it works when the version is raised or when Business Central is restarted. I remember that approximately a year ago when we introduced the development and production modes we had similar issue with the same workarounds. So it may be connected to that.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pere.fernandez Pere Fernandez Perez
                Reporter:
                mmacik Marian Macik
                Tester:
                Barbora Siskova
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: