Configuring Volt MX Foundry Server
Offline Objects supports the following modules:
- Service Driven Objects (SDO): Object services can interact with the backend through service-driven objects derived from Integration services, which wraps the backend end-points such as REST API.
- Line-of-Business (LOB) Adapters: You can use Object Services to create data models from line-of-business (LOB) objects. You can access LOB objects by using Volt MX Foundry business adapters such as SAP, Salesforce, and RDBMS. These business adapters enable you to visually discover and select the entities exposed by the LOB system.
The following section explains how to configure Offline Objects by using Service Driven Objects and Line-of-Business Adapters.
Service Driven Objects
- Sign in to the VoltMX Foundry Console.
- Create a new application by clicking ADD NEW in the applications' page. A new app is created, and the Configure Services page opens, by default.
- Under the Integration tab, either create a new Integration service or use an existing one. For more information about creating an integration service, click here.
- Under the Objects tab, click CONFIGURE NEW. A New Object Service page appears.
-
Type a name for your object service and select Integration & Orchestration Services from the Endpoint Type list.
-
Select the Offline enabled check box. Upon selecting this check box, options to set [Conflict Resolution Policy](../../../Foundry/offline_objects_user_guide/Content/Conflict_Resolution.html) and [Enable Upload Cache](../../../Foundry/offline_objects_user_guide/Content/Upload_Cache.md) are enabled.
-
Configure the Conflict Resolution Policy and Enable Upload Cache features as required and save the service.
-
To link your integration service to your object service, click Generate under the Data Models’ section. The Generate App Data Model from Existing Services tab appears.
-
Click Add and type your Object Name and select your Service Name and Operation Name from the list. Click Generate.
-
The generated data model is created with the relevant fields and relationships.
Note: Enable primary key for the fields.
-
Configure the Fields, Relationships, and ChangeTracking as required.
Note: ChangeTracking column: At present, this column supports only string type. Another type, like date, can be used, but it would require a postprocessor to convert to string format.
-
Save the changes and publish the app.
- Now, link your Foundry application to the client application.
Defining Mapping for Objects in Parent-Child Relationship
When two objects are in parent-child relationship, the mapping for verbs (GET/CREATE/UPDATE) can be defined in two ways depending on how the integration services are defined for these objects:
- Parent and Child objects have their own integration services for the verb mapping (GET/CREATE/UPDATE):
-
Verbs for parent and child objects are defined as though they are two independent objects.
Note: verbs should be mapped individually for both parent and child objects.
- For the selected parent object and verb, in Advanced > Related Objects > Include Related Objects section, checkboxes should not be turned on for including child objects.
-
For example, Member (parent object) has one-to-many relationship with Milestone and Sale (child objects) and they have their own integration services that get/create/update them.
Individual verb (CREATE/UPDATE) mappings are defined for Milestone and Sale objects.
Checkboxes should not be turned on for Milestone and Sale objects when defining verb mapping for Member object
- Parent and Child objects share the same integration service for the verb mapping (GET/CREATE/UPDATE):
-
Verbs for both parent and child objects should be mapped in parent object only.
Note: verbs should not be mapped individually in both parent and child objects.
-
For example, Sale (parent object) has one-to-many relationship with SaleItem (child object) and they share the same integration services.
Individual verb (CREATE/UPDATE) mappings are not defined for SaleItem. Mapping these verbs for Sale will create/update SaleItem as well.
-
For the selected parent object and verb, in Advanced > Related Objects > Include Related Objects section, checkboxes should be turned on for both parent, child objects and for all the applicable methods for which the mapping is defined in this verb.
- When the check box for child object is turned on, the child object fields become available in visual mapper for mapping the fields to input/output parameters in request/response mapper.
Request and Response Mapping with Parent-Child Objects
Request Mapping with Parent-Child Objects
In request mapping, child object fields are mapped to integration service input parameters.
Note: Visual mapper does not allow to map the child object fields to collection inputs in integration service. This can be achieved by editing the request mapper XML. Need to define at least one Request property mapping for Parent Object to pass the Data Filter from the requests.
Response Mapping with Parent-Child Objects
- In response mapping, child object's integration service response parameters are mapped to child object fields.
-
For example, Items is a collection in the response of “sale_create” integration service. The fields of Items collection are mapped to fields of the child object SaleItem object.
Note: Parent object's integration service response output parameters should not be mapped to child object fields. If Response Mapping is done manually in XML then Child Object properties should be nested in Parent Object Response mapping for hierarchical output data.
For example, below mapping should not be done.
Line-of-Business Adapters
- Sign in to the VoltMX Foundry Console.
- Create a new application by clicking ADD NEW in the applications' page. A new app is created, and the Configure Services page opens, by default.
- Under the Objects tab, click CONFIGURE NEW. A New Object Service page appears.
- Type a name for your object service and select the required business adapter from the Endpoint Type list.
-
Select the Offline enabled check box. Upon selecting this check box, options to set Conflict Resolution Policy and Enable Upload Cache are enabled. Configure these fields as required.
-
Configure the fields of the selected business adapter. For example, SAP.
-
Click Save and Configure to configure the data models and add mappings.
-
You can either create a new data model and add mappings or import the objects from the metadata of your backend provider.
- To create a new data model and add a mapping, click Configure New under the Data Model section. For more information about how to create a data model and add a mapping, click here.
- To import objects from your backend, click Generate under the Data Model section. For more information about importing objects from the metadata of your backend provider, click here.
Note: Enable primary key for the fields.
-
Configure the Fields, Relationships, and ChangeTracking as required.
Note: ChangeTracking column: At present, this column supports only string type. Another type, like date, can be used, but it would require a postprocessor to convert to string format.
-
Save the changes and publish the app.
- Now, link your Foundry application to the client application.