Entity Overview

   MaestroPreviously known as Transact Maestro.  |    Form Builder Platform Developer |  17.10 This feature was introduced in 17.10.

Maestro uses entities to model the data in a form by grouping components in a way you need to implement your business requirements. This provides several advantages, including more meaningful field identifiers that make for clearer business logic code and support refactoring across component and template definition changes in a more resilient, deterministic fashion. The entities also provide a streamlined way of marshalling data objects between client and server code.

Entities define a domain model of a form and they are connected to properties of components and other entities. The entities of the domain model are stored in the form manifest as a JSONJSON (JavaScript Object Notation) is a syntax for storing and exchanging data and is used in Maestro to store forms. If a Form Builder wants to transfer their form to another system, they can do so by using the Download JSON file button. object containing a set of name and value pairs, each representing a real-world concept, such as a street name. The example of JSON definition, stored in a model-schema.json file is presented below:

{
	"title": "Model",
	"type": "object",
	"properties": {
		"applicant": {
			"type": "object",
			"properties": {
				"firstName": {
					"type": "string"
				},
				"lastName": {
					"type": "string"
				}
			}
		}
	}
}

The name in each pair identifies an entity while the value is either empty (default) or another object which has its own name and value pairs for child entities. The example of an entity in JSON format is shown below:


{
	applicant:
		firstName: "//Applicant/FirstName",
		lastName: "//Applicant/LastName"
}

You can create and manage entities in the Maestro editor using the Model pane or a component's ID field in the Properties pane.

The Maestro editor knows that a component is an entity by checking for an underscore in a component ID field. If you add a prefix ending with an underscore to the component ID, Maestro adds the entity and the data item (property) to the domain model. For example, the prefix applicant1_ applied to the firstName component results in the component ID applicant1_firstName, which identifies that the firstName component belongs to the applicant1 entity.

Any existing component IDs, including those with an underscore, will not cause entities to be created. An entity is only created using the Model pane or when a user modifies a component ID.

Next, learn how to create an entity.