+1 (855) 920-2583
Login

[APS1 to APS2] In APS1 the hierarchy of the sevices was specified in APP-META.xml, how should it be done in APS2?

Modified on: Fri, 17 Nov 2023 12:07 PM
Original Publishing Date:
2020-01-22

Symptoms

In APS1 I could define services hierarchy in APP-META.xml:

<service id="top-service">
<...>
    <service id="sub-service">
    <...>
    </service>
    <...>
</service>

How it should be done in APS2?

Resolution

APS2 services are now linked based on relations node specified in schema of each resource

For example for main customer service (aka tenant) to be able to read settings from main provider service (aka globals) there should be the following relations:

  • in globals.schema:

    "relations": {
        "tenant": {
    "type": "http://application.com/tenant/1.0",
    "collection": true
        }}
    
  • in tenant.schema:

    "relations": {
    "globals": {
      "type": "http://application.com/globals/1.0",
      "required": true,
      "collection": false
    }}
    

Internal content