MaestroThe UI design product. | Form Builder | 17.10 This feature was introduced in 17.10.
Traditionally, Maestro and other Transact tools relied on built-in code editors to create, edit, and manage Maestro business rules. However, with the move to Source Code Management (SCM) tools into the Transact platform, Maestro has introduced the Move Rules to JS (JavaScript) File feature, which allows you to move all selected business rules from a Maestro form to an external JavaScript file. This file can be later referenced in any Maestro form.
You should use the Move Rules to JS File feature to create a resource that holds all required JavaScript rules for a Maestro form. This file can then be edited in any SCM tool before being referenced into a Maestro form by using the JavaScript library component from the Maestro Palette.
The Move Rules to JS File feature should be used when you are looking to extend the functionality of your form by using Source Code Management (SCM) tools such as Git. Or if you want to consolidate all the rules for your form into one place to make editing easier as your form grows and matures.
To move all configured business rules of a form to an external JavaScript file, follow these steps:
Once the Maestro rules have been moved to the JS file, you can then reference the created JS file directly in the form that you just used to create the JS file (using a JavaScript Library component), and then download the JS file and edit it using a SCM tool before uploading the JS file back into Maestro.
Next, learn how to reference a JavaScript File into a Form.