Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titleDraft Specification

This specification is currently a draft under development.

Issues:

  • We need a picture
  • Unclear where or who raises approval and rejection events
  • Some examples show postlude event raise where PJW thinks an event:send() is correct
  • Not sure why cloudos:CloudOS_subscriptionRemoved and cloudos:CloudOS_subscriptionAdded have CloudOS_ prepended when the event domain gives that information. Also, the provided examples don't have the prepend. Fixed, removed the CloudOS_ prefix.
  • An example of subscriptionList() would be nice

...

 

Code Block
themeConfluence
languagejavascript
fired {
  raise cloudos event subscriptionRequestApproved
    with eventChannel = "3f15b820-af7f-012f-4c6e-00163ebcaaaa"
    and  _api = "sky";
}

Once the subscription request is approved, the CloudOS service in both the orginating and target clouds will raise the cloudos:CloudOS_subscriptionAdded event so that a ruleset can take additional actions once the subscription has been created

 

Domaincloudos
Type
CloudOS_subscriptionAdded
Attributes
eventChannel, backChannel, namespace, relationship, channelName

 

The following shows a rule that is selected when the cloudos:CloudOS_subscriptionAdded event is raised:

 

Code Block
themeConfluence
languagejavascript
rule process_subscriptionRequestAddedsubscriptionAdded {
  select when cloudos subscriptionRequestAddedsubscriptionAdded
    namespace re/MyFriends/
    channelName re/Coworkers Bob+Ted/
    relationship re/friend-friend/
  ...
}

Rejection

To reject the subscription request a ruleset in the the target cloud raises the cloudos:subscriptionRequestRejected event to signal the CloudOS service that the subscription is rejected:

Domaincloudos
Type
subscriptionRequestRejected
Attributes
eventChannel


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

 

Code Block
themeConfluence
languagejavascript
fired {
  raise cloudos event subscriptionRequestRejected
    with eventChannel = "3f15b820-af7f-012f-4c6e-00163ebcaaaa"
    and  _api = "sky";
}

 

When the subscription request is rejected the CloudOS service will raise the cloudos:subscriptionRejected event within the target cloud (i.e. the cloud rejecting the subscription):

 

Domaincloudos
Type
subscriptionRejected
Attributes
eventChannel, namespace, relationship, channelName

 

The following rule is selected when the cloudos:subscriptionRejected event is seen:

Code Block
themeConfluence
languagejavascript
rule receive_subscriptionRejected {
  select when cloudos subscriptionRejected
    namespace re/MyFriends/
    channelName re/Coworkers Bob+Ted/
    relationship re/friend-friend/
  ...
}

In addition, the CloudOS service raises the cloudos:subscriptionRejected event in the originating cloud:

Domaincloudos
Type
subscriptionRejected
Attributes
backChannel, namespace, relationship, channelName

The only difference is that the attribute backChannel is contains the value of the ECI to the target cloud. 


The following rule is selected when the cloudos:subscriptionRejected event is raised:

 

Code Block
themeConfluence
languagejavascript
rule receive_subscriptionRejected {
  select when cloudos subscriptionRejected
    namespace re/MyFriends/
    channelName re/Coworkers Bob+Ted/
    relationship re/friend-friend/
  ...
}

 

...

 

Code Block
themeConfluence
languagejavascript
fired {
  raise cloudos event unsubscribe
    with eventChannel = "3f15b820-7aff-012f-4c6e-00163ebcfddfd"
    and  _api = "sky";
}

The CloudOS service in both the originating and target clouds raises the cloudos:CloudOS_subscriptionRemoved event so that rulesets within the respective clouds can take any appropriate action:

Domaincloudos
Type
CloudOS_subscriptionRemoved
Attributes
eventChannel, backChannel, namespace, relationship, channelName

 

The following rule is selected when the cloudos:CloudOS_subscriptionRemoved event is raised:

Code Block
themeConfluence
languagejavascript
rule receive_CloudOS_subscriptionRemoved {
  select when cloudos CloudOS_subscriptionRemoved
    namespace re/MyFriends/
    channelName re/Coworkers Bob+Ted/
    relationship re/friend-friend/
  ...
}

 

...