Connector for OData – offer – create service data

Here you can find out how to create and configure your own OData service.

For this purpose, a simple calendar application is used whose appointments are offered via the OData service. You can find the corresponding application template in Templates & solutions when you create a new application.

To create an OData service, select the "Connector for OData" entry under the "Offer data" node in the "Integration" module. Then select the main menu "OData / New service" or the corresponding context menu.

General properties

Enter the unique name of the service here. For our example, we will use the name "Calendar1".

Since the name is part of the service endpoint URL, no special characters or whitespaces may be used.

The endpoint URL is created automatically.

Specifies the namespace to be used, which will be assigned to the OData collections and types in the metadata document. No spaces or special characters may be used here either. For our example, we will also use the name "Calendar1" here.

Enter a description of the service if you want. You also have the option of providing data without a login using the "Anonymous logins" setting. Enable the service by clicking on "Service is active".

Click "Next".

Data groups

Here, the Entity Types and collections, and their relations, of the OData service are defined. To do this, data groups are selected from the desired Intrexx application – in our example, the "Calendar1" application. Each data group represents an Entity Type and is automatically available in the service as an OData entity collection. Relationships between entity types are mapped in OData using association sets and navigation properties. Parent-child relationships and references can be selected to define them as navigation properties in the respective entity types.

Click on "Add data group".

Selection of data group

The desired application with the data group can be selected here. A data group may only be added once per service.

Click "Next".

Data group properties

"Type name" specifies the name of the entity type that represents the description of the data group. The name must be unique and cannot contain special characters or spaces.

"Setname" specifies the name of the entity set that is used to address data records from the data group. The name must be unique and cannot contain special characters or spaces.

"Maximum number of data records per query" defines a maximum number of data records that the service returns for a query.

The settings under "Permitted actions" can be used to define the permitted actions that may be executed on the data group via an OData service.

Click "Next".

Select data fields

All data fields that you move from the "Available" list to the "Selected" list will be available later in the service. For our example, simply select all data fields.

"Edit data field" opens a dialog in which the field properties can be edited if required.

Data field properties

Under "Name" you will find the name of the data field in the entity type. By default, the Intrexx data field name is used. The name must be unique and cannot contain special characters or spaces. The title, on the other hand, is freely selectable.

Allow NULL value

Allows NULL values.

Allow insert

Allows the use of the data field in POST (INSERT) operations.

Allow updates

Allows the use of the data field in PUT (UPDATE) operations.

Click on "Finish".

Click "Continue" here.

Relationships – OData Associations and Navigation Properties

Relationships and references between Intrexx data groups are mapped in OData as associations and navigation properties. Both 1:1 and 1:n relations can be defined. Relationships with m:n cardinality can be represented with an m:n data group. Associations in OData define the relationships and their cardinality between Entity Types. Navigation properties in turn add properties to the entity types that can be used to navigate from a data record to a referenced data record without having to explicitly add the foreign key or reference data fields to the entity type. The required settings for this are made here. After the data groups that will be available to the service have been selected, the relationships between them can be defined.

No relationships are required for our example. Nevertheless, we will briefly explain below how relationships can be configured.

"Add relationship" opens a dialog in which relationships can be selected.

Selecting a relationship

The application and data group whose relationships are being defined are selected here. The system automatically recognizes the relationships to other data groups and offers them for selection. A distinction is made here between references and parent-child relationships.

Click "Next".

Characteristics of the relationship

Source

Defines the source application and data group. "Navigation property name" defines the navigation property being added to the entity type for this relationship. The name may not contain special characters or spaces. It is recommended to choose a name that refers to the target data group.

Goal

Defines the referenced target application, data group and reference. "Navigation property name" defines the name of the navigation property being added to the entity type for this relationship. The name may not contain special characters or spaces. It is recommended to choose a name that refers to the source data group.

Bidirectional relationship

By default, relationships are always defined as bidirectional, so that both sides of a data group can navigate to the referenced data group. If this should only be possible from the source data group, a unidirectional relationship can be defined. In the latter case, no navigation property will be added to the target data group.

Click "Finish" to save changes and close the dialog.

Click on "Finish" here too.

Data group configuration is now complete.

Remove data group

Removes the currently selected data group.

Edit data group

Opens the properties of the data group for editing.

Edit filter

Opens a dialog where a filter for the currently selected data group can be created. This global filter will then be used on this data group for each OData request, regardless of whether a filter has been defined in the OData request. However, in the latter case, the global filter will be combined with the request filter. This allows you to ensure that at a fundamental level, only certain data records can be accessed via an OData service.

Click "Next".

Functions

Click here for more information about this topic. Click on "Finish" here.

OData provider settings

Before the service can be used, the OData provider must be enabled. Click here for more information.

More information

General

System requirements

Consume data

Provide data

Integration in applications

Use in Processes

Expert settings

Appendix