How to model the dependencies between fields in very complex forms

dependenciesformsmodelingwebweb-applications

We have to create a web application that will be used as an application form for multiple insurance products (15 in total). This application form will be similar to a form wizard, it will span across multiple pages, depending on what product between 4 and 10.

The grand total of all different elements (inputs, select boxes) that the form will be rendering is around 250, but even the most complex product will not use more than 170 of them. The least complex one still requires around 80 elements.

We do not want to create 15 different application forms, one per product, we want to have a single application form which will be used by all products.

Now as you can imagine, the elements have a lot of dependencies between them. A value entered in a field can make another field or set of field appear or disappear (on the current page or a following page(s)). Some other dependencies based on entered values:

  • value of an element is required or not
  • possible values for select boxes will be changed
  • the validation constraints will be changed

As you can imagine, modeling this is very complex. The question is, what tool would you recommend for modeling (and documenting) all these elements, the dependencies between them and the validation constraints? How would you do the modeling? Not talking about the data model at all in this case. This model will be part of the specifications of what needs to be done and as a reference after the completion of the project. By changing the model the application forms will not be automatically changed.

Some of the things we would like to be able to do easily:

  • see what elements a certain element depends on
  • see all elements included in the form for certain product
  • see required elements for a certain product
  • define validation rules for each element
  • define various attributes for each element

Limitation: our product managers and product owners are the ones who will do the modelling.

Best Answer

For a similar complex project we implemented an interpreter in the business-layerer with formulas for "isValid" and "isVisible" for every form-element

For the interpreter we used UML-s Object Constraint Language which was once designed for that purpose.

Unfortunately nearly nobody speaks "uml-ocl" so finding somebody to maintain the rules is difficuilt.

If we had to do that again we would choose a more common language like js/vb-script for the interpreter

Related Topic