Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9984

Form Modeler can create but fails to open form with recursion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.64.0.Final
    • Forms Modeler
    • None
    • False
    • False
    • NEW
    • NEW
    • Hide
      1. Create a DataObject A1 with fields id:String and aField:A1
      2. Create a custom Form Form1 for DataObject A1.
      3. Select aField and drag to canvas, set Form1 as its Nested Form.
      4. Save.
      5. Reopen and see Unexpected error dialog.
      Show
      Create a DataObject A1 with fields id:String and aField : A1 Create a custom Form Form1 for DataObject A1 . Select aField and drag to canvas, set  Form1 as its Nested Form. Save. Reopen and see Unexpected error dialog.

      Assume a DataObject with a field of same type:

       

      public class A1 {
          private java.lang.String id;
          private A1 a;
      ...
      }
      

       

      We can create a custom Form Form1 for this DataObject A1. From the left hand menu we can add A1 field into canvas, select the Form1 to be used as Nested Form. Everything works fine, we can go on and Save the changes.

      When we close the editor and try to reopen, Unexpected Dialog with inner message 

      Uncaught exception: (RangeError) : Maximum call stack size exceeded 

      appears. Also form is rendered wrong underneath.

      The reason is understandable, just the handling should be more graceful. We could tackle the situation by either

      • not allowing the Form1 to reference itself in Nested Form if that's not a desirable use case.
      • selectively catching such exception, but that's questionable what would be the value of having such a form in first place.

              abkuma abhishek kumar
              jstastny@redhat.com Jan Stastny
              Pere Fernandez Perez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: