Versions Compared

Key

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

...

Domaincloudos
Type
subscriptionRequestApproved
Attributes
eventChannel, approveAttrs

The approveAttrs attribute is an optional parameter that can be used to pass a JSON hash of key/value pairs to the originating personal cloud.

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

Code Block
themeConfluence
languagejavascript
fired {
  raise cloudos event subscriptionRequestApproved
    with eventChannel = "3f15b820-af7f-012f-4c6e-00163ebcaaaa"
    and  approveAttrs = {"name": "Fred Wilson" , "age": "22" }
    and  _api = "sky";
}

For example, this postlude might be in a rule that has received input from the user indicating the user has approved the request. For some requests in some clouds, you may want to create a rule that rule that automatically approves the request. 

...

Domaincloudos
Type
subscriptionAdded
Attributes
eventChannel, backChannel, namespace, relationship, channelName, approvalAttrs

Note: The approvalAttrs attribute is encoded, you will want to decode() it prior to use.

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

Code Block
themeConfluence
languagejavascript
rule process_subscriptionAdded {
  select when cloudos subscriptionAdded
    namespace re/MyFriends/
    channelName re/Coworkers Bob+Ted/
    relationship re/friend-friend/
  pre {
    approvalAttrs = event:attr("approvalAttrs").decode();
  }
  ...
}

Subscription Approval Event Flow

...