PEPPERI NOTIFICATION SERVICE
Actions Queue
CPI Node

Addons Relations

Manage the relations between addons

This mechanism is the method to implement a connection between addons (not notifications - refer to PNS for notifications). The connection is anonymous, meaning that there is no coupling between the addon that defines the relation (host) and the addons that would like to use it (hostee).

Examples:

The following are 2 examples of addons hosting other addons.

Import-Export-ATD addon:

The import export ATD addon hosts other addons by calling them when an import or export is perform, allowing them to add data to the exported object that they can then use when it is imported. (eg. UOM creates special fields, and ADAL data per ATD that it is installed on)

ATD-Editor Addon

The ATD editor addon hosts other addons within it's UI, in its menus and tabs. The addons in the menu are then called for action, and their UI is displayed within the tabs.

Definitions

RelationName

Every hosting addon defines one or multiple relation names that define the connection. Every relation name specifies the relation types it supports, and additions parameters in the Relation Names tab.

Type

Every relation type defines basic Relation Fields that are common for all relations of this type, and it defines the communication API's (eg. Angular input for Component type).

There are two ways of communication: Call to the hosted addons which is based on the relation type calls from the hosted addon to the hosting addon which is based on the RelationHostingObject

get
Relations Endpoint

https://api.pepperi.com/v1.0/addons/data/relations
This is a regular ADAL resource for registering to an Addon Relation
Request
Response
Request
Response
200: OK
Relation successfully retrieved. Unique Key = Name + RelationName + AddonUUID
[
{
"Name": "", // mandatory
"Description": "",
"RelationName": "ATDExport", // mandatory
"Type": "AddonAPI" | "NgComponent" | "Navigation", // mandatory on create
"AddonUUID": "1234" // mandatory
"VisiblityRelativeURL": "/api/foo2", // optional
"MultiSelection":false, // false is the default, meaning only single selection
[key: string]: any // additional fields per Type
}
]

get
dont need this. Should use where

https://api.pepperi.com/v1.0/addons/data/relations/{RelationName}
This function returns the relations by name and should be used by the addon that will use the relations assigned to it.
Request
Response
Request
Response
200: OK
[
{
"Name":"ATDExport",
"AddonUUID": "1234",
"CallbackRelativeURL": "api/export"
},
{
"Name":"ATDExport",
"AddonUUID": "5678",
"CallbackRelativeURL": "api/my_export"
}
]