Domains
Introduction
When clients are registered to use the Dynamo system, they have to be recognized somehow on the platform. Clients are recognized on Dynamo as Domains.
Domain Overview
Each Domain has a unique ID on the platform and this ID can be used to retrieve information about the Domain. Clients need to also be able to store their configuration information on the platform that Processes can use to customize their behaviours.
Domains are exposed to protected Processors via a $domain property in the processor arguments (this.args). This means that the domain object can be accessed in these processors using
this.args.$domain
Domains can also be fetched in unprotected Processors by calling the getDomain library with the processors context. This is possible because while the domain is not exposed in the processor arguments, the _id of the domain is still exposed in the requestContext object seen as
this.args.$requestContext.domain
Usage of the library is shown below:
Domain Object
Property Name | Type | Description |
---|---|---|
_id | Mongo ObjectID | MongoDB generated ID for the Domain |
name | String | The name of the Domain |
uid | String | Unique ID for the Domain |
config | Object | This property is originally saved as an array of Objects in the database but is reduced to an object of key-value pairs when it is fetched. |
Configuration Object
Property Name | Type | Description |
---|---|---|
_id | Mongo ObjectID | MongoDB generated ID for the Property |
name | String | Config key |
value | String | Config value |