Wednesday, September 26, 2018

Simple data migration

Managing change is difficult and forms are no exception. For example, you might make a form available to users, and they start entering data. But then you realize that you need to capture just a bit more information than you had initially thought. So what do you do? You go back to Form Builder, add a few form fields, and that's where things become tricky!

Since Orbeon Forms 4.5, Orbeon Forms has supported form definition versioning to help with this scenario. Versioning introduces the idea that published form definitions also have a version number. Version numbers start with "1" and increase from there: version 2, version 3, etc. So you can talk about "version 2 of the Acme Order form". This allows you to make changes to form definitions, without worrying about the compatibility of the data already captured.

One drawback is that different form versions behave like entirely different forms: version 2 of the Acme Order form cannot read data already captured with version 1 of the Acme Order form.

So Orbeon Forms 2018.2 introduces an additional way to manage change, called simple data migration. This is an option which sits between "overwrite an existing form definition in an incompatible way" and "create a whole new form definition version": when enabled in the form settings, simple data migration allows you to overwrite an existing form definition, but keep certain changes compatible, such as adding and removing controls, grids or sections.

So how does it work? It's simple: when you load existing data with the updated form definition, placeholders for the missing data is automatically added (and the extra data is automatically removed). This allows the user to enter the information associated with the new form controls.
Simple Data Migration setting
Note that some changes remain incompatible with simple data migration. For example, structural changes such as moving controls, grids or sections between sections. In short, consider that simple data migration works for adding and removing a few controls to your form.

For more information, see the documentation. We have also generally updated our documentation on versioning. We hope you will like this new feature!

No comments:

Post a Comment