SDK implements a set of core models designed to jump-start development with the most common features needed in a supply chain application. The application model features in the One Network SDK allow you to create models that are unique to the requirements of your application. Application models have all the same capabilities as core models including state machines, workflows, issue computations, integration points, etc.
You use Studio to create models using a visual interface. Once created, your application models reside as files in the models folder in your module project.
Procedure 4.20. To Create a New Model:
Click File | New | Model.
Verify the project you are working with appears in the Project box. If if does not, you can browse for it by clicking the folder icon.
Supply a unique name for your model.
Procedure 4.21. To Add a New Field to an Application Model:
Locate the file you wish to use in the models folder and double-click to open it.
Go to the Fields tab within the Model Editor.
Click the Add button.
Type a name for your field in the ensuing dialog box.
Define the data type for your field and click OK.
Based on which data type you selected, the area below the field list allows you to fine-tune your selections. For example, in the figure below we've just added a string field. There are additional options for configuring the string field.
Don't forget, after you save your new model, you need to build your project before you will see the new or updated models on the server
Procedure 4.22. To Change a Field Definition
Since changing a field definition directly affects the database, you should perform ant clean build to see the new changes in effect. Use the Ant clean task to wipe the module's database structure followed by the default Ant build task to re-generate the artifacts dependent on the model definition.
Open the model file in Studio
Click the field and make your changes.
Click the Save button on the toolbar to save your changes.