Create and Edit Business Objects in Oracle Visual Builder
You can create a business object in Oracle Visual Builder, such as an invoice, purchase order, or an audit. Think of a business object as a resource similar to a database table; it has fields that hold the data for your application. Like a database table, a business object provides the structure for data. Business objects are stored in a database. The apps in your visual application and other clients access the business objects by using their REST endpoints.
Create a Business Object
You use custom business objects to store data that isn't provided by an external service. The data in your custom business objects is stored in the database that was provisioned for your service instance.
When you create custom business objects, you specify each of the fields that your application needs. As you develop your application, you can modify your business objects to add and modify fields as needed. Your custom business object is exposed as a set of endpoints that provide REST APIs for operations that you can call from page components.
To create a business object:
When you click Create, an artifact window for the new business object opens in the main window and displays the Overview tab. The window contains additional tabs for viewing and editing the various attributes of the business object: Fields, Security, Business Rules, Endpoints, and Data.
You can see the endpoints for the business object that are created by default in the Endpoints tab.
You can also create business objects using the Diagrammer.
View, Create, and Edit Business Object Relationships
The Relationships area of the Overview tab for a business object displays the relationships between that business object and other business objects in your application.
When you create a reference to another business object, the relationship between the current business object and the one being referenced is, by default, many-to-one. For example, when you create a reference from an Employee business object to a Department business object, the employee can belong to only one department, but a department typically has many employees.
The referenced business object, Department, also appears in the Endpoints tab for the Employee business object.
You can delete a relationship, but only if it's associated business objects aren't used anywhere in your application.
To create a new relationship:
To edit a relationship, click the Edit icon next to the relationship name, and make the desired changes. Some fields can't be edited and are disabled. You can specify the Label and select the Default Display Field. You may be able to select the Required check box for the field, and you can specify a delete rule. The default delete rule is Restrict, but you may be able to select Cascade or Set To Null.
Add Fields to Business Objects
You can use the Fields tab of the artifact window to create fields for your business objects.
You can create new fields for your business object while it is in Development status.
To add a new field:
Edit the Fields of Business Objects
You can use the Fields tab of the artifact window to modify the fields of your custom business objects.
You can edit the fields of business objects when your application is in Development status. You can edit fields to specify constraints.
To edit the properties of a field: