TABLE OF CONTENTS


1. Main concept

Domain Objects is the main feature of the XME.digital 2 that allows users to configure different Business Entities from any Domain area without development. This was made possible by an Entity Specification yaml file.


Picture 18. Main concept


2. Root element and types

The file starts with the --- and then contains types element:

---
types:
    - ...
    - ...
  • key - contains a unique entity type identification. There is a convention for it:                     

    • all letters written in capitals (upper case)

    • with - between words. There is inheritance functionality between entity type. A . can be used to identify it. The example shows that ACCOUNT.ADMIN inherits data, functions, attachments, calendars, links, locations, ratings, states, tags and comments specification from the ACCOUNT type.


types:
    - keyACCOUNT
       ...
    - keyACCOUNT.ADMIN
      ...   
  • name - see at Names

  • pluralName see at NamesThis name will be used in menu and application card.

  • isApp - tag used to identify that this entity type will be shown as Application in the menu:




Picture 19


  • isAbstract tag uses to identify that this entity type will not have real Domain Objects.

  • isAvatarEnabled tag uses to identify that this entitis will have avatar or not.

  • fastSearch - see at Fast Search

  • icon - name of Google material system icon https://material.io/icons/.

  • dataSpec and dataForm tags - used for the entity data specification and visualization. form-playground page can be used in Administration panel for experiments and testing of the available functionality.



Picture 20. Form Playground


Fast Search functionality used to speed up entities selection on the application page:


Picture 21. Fast Search


Example:

fastSearch:
          - 
querytypeKey:ACCOUNT* AND NOT stateKey:RETIRED
          - 
querytypeKey:ACCOUNT* AND stateKey:NEW
            
name{ en: "New", ru: "Новые" }
          - 
querytypeKey:ACCOUNT* AND stateKey:ACTIVE
            
name{ en: "Active", ru: "Активные" }

  • query search query based on Query Syntax.

  • name see at NamesQuery will be interpreted as 'All', if name will not defined.


4. Names

Localized name via map structure

Example:

name{ en: "Account", ru: "Учетная запись" }

  • key - is ISO 639-1 code.

  • value - localized name.3.2.5      

 

5. Functions

Functions block with a list of available extensions on the Entity detail block.



Picture 22. Functions



Example:

 functions:
          - 
keyACCOUNT.REDEEM-VOUCHER
            
name{ en: "Redeem Voucher", ru: "Погасить Ваучер" }
            
inputSpec|
                      {
                          "type": "object",
                          "properties": {
                                "attemptedDate": {
                                    "title": "Attempted Date",
                                    "type": "string"
                                },
                                "isSuccess": {
                                    "title": "Is Success",
                                    "type": "boolean"
                                },
                                "voucherSerial": {
                                    "title": "Voucher Serial",
                                    "type": "string"
                                },
                                "enteredSecret": {
                                    "title": "Entered Secret",
                                    "type": "string"
                                }
                            }
                      }
          - 
keyACCOUNT.EXTRACT-LINKEDIN-PROFILE
            
name{ en: "Extract LinkedIn profile", ru: "Получить LinkedIn профиль" }
            
allowedStateKeys:
                - 
VERIFIED
                - 
ACTIVE
            
inputSpec|
                         {
                             "type": "object",
                             "title": "functionContext",
                             "properties": {
                                 "linkedInProfileUrl": { "type": "string", "title": "LinkedIn profile URL" },
                             }
                         }
            
contextDataSpec|
...


  • key - contains a unique function type identification. The convention is the same as for the type key.

  • name - see at Names

  • actionName - action button name for the default logic. See at Names

  • allowedStateKeys - list with allowed state keys. Allowed for all states if not specified. 

Example:

  • inputSpec and inputForm tags - used for the function input parameters specification and visualization. form-playground page can be used in Administration panel for experiments and testing of the available functionality.

  • contextDataSpec and contextDataForm tags - used for the function context specification and visualization. form-playground page can be used in Administration panel for experiments and testing of the available functionality.


6. Attachments

Attachments block with a list of available attached content on the Entity detail block.


Picture 23. Attachments


Example:

attachments:
          - 
keyDAMAGE.PHOTO
            
name{ en: "Damage photo", ru: "Фотография повреждения" }
            
contentTypes:
                - 
'image/gif'
                - 
'image/jpeg'
                - 
'image/png'
                - 
'image/tiff'


  • key - contains unique attachment type identification. The convention is the same as for the type key.

  • name - see at Names

  • contentTypes - a list of acceptalbe content types. Logic is not implemented!

  • max - maximum count of attachmants with this type. Logic is not implemented!

  • size - maximum size for one attachment. Logic is not implemented!

7. Calendars

Calendars block on the Entity detail block.


Picture 24. Calendar


Example:

calendars:
          - 
keyRESOURCE.CHARGING-STATION.RESERVATION
            
name{ en: "Reservation", ru: "Резервация" }
            
events:
                - 
keyEVENT1
                  
name{ en: "Reservation", ru: "Резервация" }

     

8. Links

Links block to the Entity detail block .


Picture 25.  Links


Example:

  links:
          - 
keyPRODUCT.RENT-CAR.CAR
            
builderTypeSEARCH
            
name{ en: "Car", ru: "Автомобиль" }
            
icondirections_car
            
typeKeyRESOURCE.CAR
            
max10
          - 
keyPRODUCT.RENT-CAR.PRODUCT-OFFERING
            
builderTypeSEARCH
            
name{ en: "Car", ru: "Автомобиль" }
            
iconlocal_offer
            
typeKeyPRODUCT-OFFERING
            
max10
...
      
links:
          - 
keyPRODUCT-OFFERING.RATE-PLAN.PRICE
            
builderTypeNEW
            
name{ en: "Price", ru: "Цена" }
            
iconlocal_offer
            
typeKeyPRICE
            
max10


  • key - contains unique link type identification. The convention is the same as for the type key.

  • name see at Names

  • backName - see at Names for the back entity link displaying and naming

  • builderType - could be:

    • SEARCH - search with entity selection popup will be shown.


Picture 26


  • NEW - then Add new entity popup will be shown.


Picture 27


  • icon name of Google material system icon https://material.io/icons/.

  • typeKey - reference to the root type of other entities. It is the same for hierarchy implementation.

  • max - maximum count of links with this type. Logic is not implemented!


9. Locations

Locations block on the Entity detail block.


Picture 28. Locations


Example:

 locations:
          - 
keyRESOURCE.CAR.CURRENT-LOCATION
            
name{ en: "Current location", ru: "Текущее местоположение" }
            
max1


  • key - contains a unique location type identification.The convention is the same as for the type key.

  • name - see at Names

  • max - maximum count of locations with this type. Logic not implemented!



10. Rating

Ratings block on the Entity detail block in the entity main information.


Picture 29. Rating


Example:

ratings:
          - 
keyNEW-RATING
            
name{ en: "5STARS rating", ru: "Рейтинг 5 звезд" }
            
style5STARS
            
votes1


  • key - contains a unique location type identification. The convention is the same as for the type key.

  • name - see at Names

  • style - rating style:

    • 5STARS - 5 Stars rating.

    • THUMB-UP - Thumb up rating. Logic not implemented!

    • THUMB-DOWN - Thumb down rating. Logic not implemented!

  • votes - maximum count of votes with this type from one user. Logic not implemented!


11. States

Entity state and next states block on the Entity detail block in Functions.


Picture 30. States


Example:

 states:
          - 
keyNEW
            
name{ en: "New", ru: "Новый" }
            
iconfiber_new
            
color'#FFEB3B'
            
next:
                - 
stateKeyAVAILABLE
                  
name{ en: "Make available", ru: "Сделать доступной" }
                - 
stateKeyRETIRED
                  
name{ en: "Retire", ru: "Удалить" }
          - 
keyAVAILABLE
            
name{ en: "Available", ru: "Доступный" }
            
iconcheck_box_outline_blank
            
color'#CDDC39'
            
next:
                - 
stateKeyRESERVED
                  
name{ en: "Reserve", ru: "Зарезервировать" }
                - 
stateKeyRETIRED
                  
name{ en: "Retire", ru: "Удалить" }
                - 
stateKeySERVICE-REQUIRED
                  
name{ en: "Service required", ru: "Требуется обслуживание" }
          - 
keyRESERVED
            
name{ en: "Reserved", ru: "Зарезервированный" }
            
iconcheck_box
            
color'#8BC34A'
            
next:
                - 
stateKeyAVAILABLE
                  
name{ en: "Make available", ru: "Сделать доступной" }
                - 
stateKeyIN-USE
                  
name{ en: "Start to use", ru: "Начать использовать" }
          - 
keyIN-USE
            
name{ en: "In use", ru: "В использовании" }
            
iconplay_arrow
            
color'#4CAF50'
            
next:
                - 
stateKeyAVAILABLE
                  
name{ en: "Make available", ru: "Сделать доступной" }
          - 
keyRETIRED
            
name{ en: "Retired", ru: "Удаленный" }
            
iconstop
            
color'#000000'
          - 
keySERVICE-REQUIRED
            
name{ en: "Service required", ru: "Требуется обслуживание" }
            
iconreport
            
color'#FF9800'
            
next:
                - 
stateKeyAVAILABLE
                  
name{ en: "Make available", ru: "Сделать доступной" }
                - 
stateKeyIN-SERVICE
                  
name{ en: "In service", ru: "На обслуживание" }
          - 
keyIN-SERVICE
            
name{ en: "In service", ru: "На обслуживание" }
            
iconreport
            
color'#FFC107'
            
next:
                - 
stateKeyAVAILABLE
                  
name{ en: "Make available", ru: "Сделать доступной" }
                - 
stateKeyRETIRED
                  
name{ en: "Retire", ru: "Удалить" }


  • key contains a unique state type identification for entity. The convention is the same as for the type key.

  • name - see at Names

  • icon name of Google material system icon https://material.io/icons/.

  • color - hexidecimal color for the state on screen.

  • next list of allowed states for transition.

    • stateKey - next entity state key for transition.

    • name - see at Names

12.Tags

Tags block of the Entity detail section in the entity main information.


Picture 31. Tags


Example:

tags:
          - 
keyDEFAULT
            
name{ en: "", ru: "" }


  • key contains a unique tag type identification for entity. DEFAULT only available right now.

  • name - see at Names

13. Comments

Comments block on the Entity detail block.


Picture 32. Comments


Example:

comments:
          - 
keyDEFAULT
            
name{ en: "Comments", ru: "Комментарии" }


  • key contains a unique tag type identification for entity. DEFAULT only available right now.

  • name - see at Names


14. Example


---
types:
    - 
keyACCOUNT
      
name{ en: "Account", ru: "Учетная запись" }
      
isApptrue
      
isAbstracttrue
      
iconaccount_balance_wallet
    - 
keyACCOUNT.ADMIN
      
name{ en: "Admin", ru: "Администратор" }
      
isAppfalse
      
isAbstractfalse
    - 
keyACCOUNT.DONOR
      
name{ en: "Donor",  ru: "Донор" }
      
isAppfalse
      
isAbstractfalse
      
links:
          - 
keyACCOUNT.DONOR.BLOOD-DONATION
            
builderTypeNEW
            
name{ en: "Blood donation", ru: "Сдача крови" }
            
iconfavorite_border
            
typeKeyBLOOD-DONATION
    - 
keyBLOOD-DONATION
      
name{ en: "Blood donation", ru: "Сдача крови" }
      
isApptrue
      
isAbstractfalse
      
iconfavorite
      
dataSpec|
                {
                    "type": "object",
                    "properties": {
                        "bloodType": {
                            "title": "Blood Type",
                            "type": "string",
                            "enum": [
                                "1+",
                                "1-",
                                "2+",
                                "2-",
                                "3+",
                                "3-",
                                "4+",
                                "4-"
                            ]
                        },
                        "donationDate": {
                            "title": "Donation Date",
                            "type": "string",
                            "format": "date"
                        }
                    },
                    "required": [
                        "bloodType"
                    ]
                }


    - 
keyBLOOD-DONATION-DAILY
      
name{ en: "Blood donation daily", ru: "Сдача крови дневная" }
      
isApptrue
      
isAbstractfalse
      
icondonut_small
      
dataSpec|
                {
                    "type": "object",
                    "properties": {
                        "dailyDonation1Plus": {
                            "title": "Daily Donation 1+",
                            "type": "number"
                        },
                        "dailyDonation1Minus": {
                            "title": "Daily Donation 1-",
                            "type": "number"
                        },
                        "dailyDonation2Plus": {
                            "title": "Daily Donation 2+",
                            "type": "number"
                        },
                        "dailyDonation2Minus": {
                            "title": "Daily Donation 2-",
                            "type": "number"
                        },
                        "dailyDonation3Plus": {
                            "title": "Daily Donation 3+",
                            "type": "number"
                        },
                        "dailyDonation3Minus": {
                            "title": "Daily Donation 3-",
                            "type": "number"
                        },
                        "dailyDonation4Plus": {
                            "title": "Daily Donation 4+",
                            "type": "number"
                        },
                        "dailyDonation4Minus": {
                            "title": "Daily Donation 4-",
                            "type": "number"
                        },
                        "donationDate": {
                            "title": "Donation Date",
                            "type": "string",
                            "format": "date"
                        }
                    }
                }