Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The channelName attribute is a label associated with the subscription that should convey meaning to developer. The channelName is only used as a component in the creation of the event channel identifier. If no channelName is specified the value of "orphan" will be used.
  • The namespace attribute is provided as a means for the developer to group subscriptions within a single, or group, or applications. The namespace is used to filter the list of subscriptions returned by the subscriptionList() function. If no namespace is specified the value of "shared" will be used.
  • The relationship attribute allows the developer to characterize the relationship between the originator and target clouds. The relationship attribute should be specified as a pair of values separated by a dash (e.g. parent-child, peer-peer, master-slave). The first value of the relationship attribute will be stored with the originating Personal Cloud subscription, the second value will be stored with the target Personal Cloud subscription. The relationship attribute values are used to filter the list of subscriptions returned by the subscriptionList() function. If no relationship is specified the value of "peer-peer" will be used.
  • The targetChannel attribute is the event channel identifier (ECI) for the target cloud to which the subscription is to be made. Usually, this is the well-known ECI (doorbell) for the target cloud. The well-known ECI provides a means for bootstrapping subscriptions between clouds. 

Any ruleset wishing to create the subscription signals the CloudOS to do so by raising the system:

subscribe 

subscribe event. This is most often done in a rule postlude as shown in the following example:

 

Code Block
themeConfluence
languagejavascript
fired {
  raise cloudos event subscribe
    with channelName   = "Coworkers Bob+Ted"
    and  namespace     = "MyFriends"
    and  relationship  = "friend-friend"
    and  targetChannel = "3f15b820-fa7f-012f-4c6e-00163ebccdcd"
    and  _api = "sky";
}

 

 

The CloudOS service raises the cloudos:subscriptionRequestAdded to the target cloud:

Domaincloudos
Type
subscriptionRequestAdded
Attributes
targetChannel, backChannel, namespace, relationship, channelName

The backChannel attribute contains an ECI for the originating cloud that the CloudOS service has created and will pass to the target cloud. 

...

To approve the subscription request a ruleset in the the target cloud raises the cloudos:subscriptionRequestApproved event to signal the CloudOS service that the subscription is approved:

 

Domaincloudos
Type
subscriptionRequestApproved
Attributes
eventChannel

For example, the following postlude would raise the cloudos:subscriptionRequestApproved event:

...