Show Table of Contents

4.13. Data models
Data models are models of data objects. A data object is a custom complex data type (for example, a Person object with data fields Name, Address, and Date of Birth).
Data models are saved in data models definitions stored in your Project. Red Hat JBoss BPM Suite provides the Data modeler, a custom graphical editor, for defining data objects.
Important
Every data object is implemented as a POJO and you need to import its class explicitly into your Process definition to allow the Process definition to see the data object.
4.13.1. Data Modeler
The Data Modeler is the built-in editor for creating data objects as part of a Project data model from Business Central. Data objects are custom data types implemented as POJOs. These custom data types can then be used in any resource (such as a Process) after importing them. To open the editor, open the Project Authoring perspective, click → in the perspective menu.

|
The Objects panel contains a list of data objects that constitute the data model in the given Project.
|
|
The Fields panel contains a list of fields of the data object selected in the Objects panel.
|
|
The Properties panel displays the properties of the data field selected in the Field panel.
|
Figure 4.25. Data Modeler environment
4.13.2. Creating a data object
- Open the Data Modeler: in the Project Authoring perspective, click → on the perspective menu.
- Create a data object:
- In the Objects panel, click the button and provide the data object details:
- Identifier: name of the data object unique within the project.
Warning
This identifier name must be unique within the whole project, and not just the package. - Label: name of the data object to be displayed in the Objects panel
- New package: a new package the object should be created in
- Existing package: an existing package the object should be created in
- Superclass: a data object to be used as the superclass for the data object (the data objects extends this class, that is, it inherits all its fields)
- Create fields of the data object:
- Select the object in the Objects panel.
- In the Create new field part of the Fields panel, define the field properties:
- Id: field ID unique within the data object
- Label: label to be used in the Fields panel
- Type: data type of the field
- Click .
Important
To use a data object, make sure you import the data model into your resource. This is necessary even if the data model lives in the same Project as your resource (Business Process).
Warning
When the Data Modeler opens a project's model objects, it checks if the model has been externally modified. If it has been, then it will notify you that the object was externally modified and will still allow you to modify the model.
However, any such subsequent changes made in the model via the Data Modeler won't get propagated to the external source where it was original created/modified. You risk losing changes to your model as a full roundtrip is not implemented.




Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.