Employee Data Model

Employee Data Model

Employee Data Model

Asset Version: 1.0.0
  • Version 1.0.0
Last Published: Apr 11, 2017 By: Kony Team
159 2 0 19
The Employee App Data model aims to provide a quick starting point for building mobile apps dealing with employee data. You can easily extend/ reduce/ modify the App Data Model based on your use-case. You can also map the App Data Model to any backend data source.

Requirements

  • MobileFabric
 

Features

  • Quick reference app data model- Extend/ Reduce/ Modify based on your requirement
  • Map to any backend data source

The app data model abstracts common Employee fields and objects from the backend data source, allowing you to create a mobile app which is decoupled from backend data sources. You can then map any data source to the mobile app, without modifying the client side code.

Prerequisites

  • Kony account
  • Kony MobileFabric

Employee App Data Model aims to provide a quick start point for building mobile apps dealing with employee data. The data model contains multiple objects and fields related to employee information. The following diagram illustrates the objects in the data model and relationships among them.

employeedm_architecture.png

When you import the app data model into MobileFabric, the app data model is created as an object service. Using the MobileFabric console, you can modify the fields and relationships of the objects in the data model. For example, you can add new fields to objects and define new relationships between objects.

You can also map Employee App Data Model to any back end data source. For example, if you are using Oracle database to store your employee details, using the MobileFabric console, you can connect Employee App Data Model with the Oracle database and map the fields of each object in the data model with the fields of the Oracle database.

The following sections help you use the Employee App Data Model:

Prerequisites

Before you start using the Employee Data Model, ensure you have the following:

  1. Kony account
  2. Kony MobileFabric 7.3

Importing Employee App Data Model

Before you import the data model to MobileFabric, you must download the data model from the Kony Marketplace website.

To import the Employee App Data Model zip file, do the following:

  1. Log on to your Kony account. The Dashboard page appears by default.
  2. In the left pane, click the Apps menu. The Custom Apps page appears.
  3. Click Import. The Import dialog appears.
    employeedm_importapp.png
  4. Drag the zip file into the Import App dialog.

    Alternatively, click browse. The Open dialog appears. Navigate to the location where you downloaded the data model (zip file) on your computer, select the zip file, and click Open. The zip file is selected and the Import App dialog appears as shown in the following figure:


    employeedm_importapp_slct.png

    Note:

    If the selected component is not the one that you want to import, click Change Binary.

  5. In the App Name box, the EmployeeDataModel is displayed by default. You can change the name, if required.
  6. Click Import as new to create a new MobileFabric app. If there is an app exists with the same app name and if you want to overwrite it, click Overwrite existing app.
  7. Click Import. The EmployeeDataModel app is listed on the Custom Apps page.
    Note:

    If you changed the name in the App Name box, the app with the updated name is listed on the Custom Apps page.

Viewing the Object Service

When you import Employee App Data Model into MobileFabric, the app data model is created as an object service. In the object service, you can view all the objects of the data model and the default fields and relationships of each object.

To view the object service, do the following:

  1. Log on to your Kony account. The Dashboard page appears by default.
  2. In the left pane, click the Apps menu. The Custom Apps page appears.
  3. Find and click the EmployeeDataModel app. The EmployeeDataModel page appears along with the Configure Services tab and the Identity sub-tab opened by default.
    Note:

    If you changed the name of the app while importing the app data model, find and click the app name that you specified using the search box on the Custom Apps page.

  4. Click the Objects sub-tab. The Objects sub-tab opens along with the UserDetailsSchemaED object service listed.
    employeedm_userdetails.png
  5. Click UserDetailsSchemaED. The Configure page appears with all objects in the app data model.

    employeedm_config.png

Mapping Employee App Data Model with a back end Data Source

By default, the Employee App Data Model is mapped with the MobileFabric storage. You can easily decouple the app data model with the MobileFabric storage and map it with other back end data source.

To map with a back end data source, do the following:

  1. On the EmployeeDataModel page, Click the Configure Services tab, and then click Objects sub-tab. The Objects sub-tab opens along with the UserDetailsSchemaED object service listed.
  2. Click the context menu icon of UserDetailsSchemaED as shown in the following figure. The context menu opens.
    employeedm_clone.png
  3. Click Clone App Data Model. A copy of Employee App Data Model is created and the New Object Service page appears.
    employeedm_endpoint.png
  4. In the Name box, type a name for a copy of Employee App Data Model.
  5. Click the context menu arrow to expand the Endpoint Type list. A drop-down list opens.
  6. Select the required back end data source that you want to map and click SAVE & CONFIGURE.

Modifying Employee App Data Model

The Employee App Data Model comes with a default set of objects. Every object in the data model contains a set of fields and a relationship with at least one object. The UserDetailsSchemaED object service allows you to modify the app data model as you require. Every object in the object service contains the following sections:

Fields

In the Fields section of an object, you can add new fields and edit and delete the fields associated with the object. Every object has a set of fields that you cannot edit or delete. For example, the createdBy and CreatedDataTime fields of the contact_type object cannot be modified.

Relationships

In the Relationships section of an object, you can define new relationships with other objects and edit and delete existing relationships of the object.

For more information, refer to Object Services.