VMware vRA 8 Subscriptions and Advanced Condition Filters
I had to do some filters on a vRealize Automation 8.5, that was based on a tag on the VM/Compute resource.
There is no god documentation for that in VMware’s documentation, and searching the internet did not give anything, maybe I was just search for the correct things.
So I had to dig into the problem and find a solution, and I finally found out how this works.
The filter need to be like this:
event.data["tags"]["onboarding"] == "true"
This can also be used on custom properties. The syntax is the about the same same:
event.data["customProperties"]["<property>"] == "values"
Hope this can help somebody.
NOTE: This does not work on all Event Subscription, I know it does not work on “Deployment *” as this do not have any custom properties or tags.
HI I am trying to get the filter to match a constraint tag and trying the folloing:
event.data[“customProperties”][“constraints”] == “values”
with the following variations:
event.data[“customProperties”][“constraints”] == “Site:DCA” or
event.data[“customProperties”][“constraints”][“Site”] == “DCA”
But cannot get the evet to fire. Any Ideas?
If the Custom properties name is equal to”Site” and the value is “DCA” then this should work:
event.data[“customProperties”][“Site”] == “DCA”
if the Custom properties name is constraints.Site and the value is “DCA” is should be like this:
event.data[“customProperties”][“constraints.Site”] == “DCA”
Remember that everything is case sensitive.
What if you need multiple conditions to trigger the same workflow? For example, let’s assume there is a cloud template with 3 choices for the users. Choices A and C require a workflow to make additional changes to the deployed VM but Choice B does not. Would the condition filter be as simple as putting a single condition per line?
event.data[“customProperties”][“image”] == ‘Choice_A’
event.data[“customProperties”][“image”] == ‘Choice_C’
You need to specify that it is a “or” by putting a “||” in between the two.
event.data[“customProperties”][“image”] == ‘Choice_A’ || event.data[“customProperties”][“image”] == ‘Choice_C’
you can use “()” to group conditions and user OR = “||” and AND = “&&”.
Hope that can help you.