Event Subscriptions in vRealize Automation 8

In vRealize Automation 8 the process of creating an Event Subscription has changed a little bit. In vRealize Automation 8 there are 40 Event Topics already defined under Extensibility Library in Cloud Assembly.

Event topics which you can choose from while creating an Event Subscription vRealize Automation are as follows:

Blueprint configuration                                             EventLog            
Blueprint version configuration                               Kubernetes cluster allocation
Compute allocation                                                    Kubernetes cluster post provision
Compute post provision                                            Kubernetes cluster post removal
Compute post removal                                              Kubernetes cluster provision
Compute provision                                                     Kubernetes cluster removal
Compute removal                                                       Load balancer post provision
Compute reservation                                                 Load balancer post removal
Deployment action completed                                 Load balancer provision
Deployment action requested                                  Load balancer removal
Deployment completed                                             Network Configure
Deployment onboarded                                            Network post provisioning
Deployment requested                                              Network post removal
Deployment resource action completed                Network provisioning
Deployment resource action requested                 Network removal
Deployment resource completed                            Project Lifecycle Event Topic
Deployment resource requested                             Security group post provision
Disk allocation                                                             Security group post removal
Disk post Removal                                                      Security group provision
Disk post resize                                                           Security group removal

In order to understand an Event topic review the Descripton, Topic ID, Blocakble and Schema of the Event Topic.

Compute provision Event Topic

If you want to create a Subscription for an Event Topic, just select the Event Topic and click on Subscribe, select the ABX Action or Workflow to trigger, select the Blocking of events and Subscription scope. Schema of an Event Topic can also be reviewed on this screen, Schema (Payload in the previous versions of vRealize Automation) of an Event Topic is a set of Properties which will be passed to Orchestrator when an event of this Topic is triggered.

Test Subscription for Compute provision Event Topic

Important Tip: If you are not sure about the Schema of an Event Topic, create a Blank Workflow with Input Variable of name “inputProperties” & Type “Properties” and Create a Test Subscription using this Blank Workflow. Name of the Input Variable is Important here, if you name it something else it will not receive the Properties from Cloud Assembly.

Schema Properties received by the Orchestrator Workflow

Did you notice that the Workflow ran twice? This is because i have Specified 2 Machine components in the Blueprint and the Workflow ran each time a Machine Component was provisioned for this Deployment request.

2 Workflow Runs for the Test Subscription

The names of the machine components in the Test Blueprint used for this illustration are “Primary_VM” and “Secondary_VM”.

Blueprint for which Event Subscription was triggered

There is one more important thing which you can specify while creating an Event Subscription using Event Topics, which is the Condition. Condition is something which you describe to filter out a specific Event from the list of Events which are triggered when a user requests for Services using Service Broker.

Condition to filter Events for an Event Topic

Condition can only be specified in Javascript Syntax in the current version of vRealize Automation. For Instance if I would like to trigger the same Test Workflow only for the Secondary_VM, i can specify a condition in the Test Subscription as event.data.blueprintId == ‘e9d2abc4-94fa-48f1-a1db-19a31510a375’ && event.data.componentId == ‘Secondary_VM’ Blueprint ID can be copied from one of the previous sample Workflow runs.

Sample Filter Condition for Events in Topic

This condition would ensure that the Workflow is triggered if the Blueprint requested has an id e9d2abc4-94fa-48f1-a1db-19a31510a375 and only for the component with id Secondary_VM. If you request a Deployment now using the same Blueprint, the Workflow will be triggered only once and that is for the Machine Component Secondary_VM.

Single Workflow Run for Secondary_VM Machine Component

Note: I noticed one typo in the examples provided for Condition statement in vRealize Automation 8, there is a space missing after event.data.blueprintId == and the actual id. I had to spend 15 mins figuring out why the event is not triggering a workflow, so make sure that the Syntax for the Condition is correct.

Bad Syntax for the Condition Statement Example

With that you are now ready to create Event Subscription in vRealize Automation 8. Enjoy!!

https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8549655389727719

Leave a Reply