...
Domain | cloudos |
---|---|
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 | ||||
---|---|---|---|---|
| ||||
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.
...
Domain | cloudos |
---|---|
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 | ||||
---|---|---|---|---|
| ||||
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
...