VMware Cloud Community
jim102190
Contributor
Contributor

How to write (format) a switchaction / condition statement in ABX - Conditional action flows

Hi All,

Using vRA 8.7. I would need some advice on how to format a switchaction condition in an ABX conditional action flow. I would like to use a custom property test but keep getting the "Unknown property used in expression..." error. All actions work fine otherwise. The error seems to suggest a formatting issue. I have tried other formats but no luck. This is my latest excerpt from the Flow using a test conditional I am using in the subscription definition:

...

condition1:
switch:
"${ event.data.customProperties['image'] == 'imageA' }": action3
"${ event.data.customProperties['image'] == 'imageB' }": action5

...

 

The "Inputs" does contain the appropriate customProperties - image key with a value of either "imageA" or "imageB"

How is this conditional expression supposed to be formatted?

 

I am finding the vRA documentation "very light" in details. This is all the documentation says in regards to this:

"In some cases, the condition must be equal to true in order for the action to run. Other cases, as
seen in this example, require parameter values to be met before an action can run. If none of the
conditions are met the action flow fails. "

Link to the relevant documentation section: https://docs.vmware.com/en/vRealize-Automation/8.7/Using-and-Managing-Cloud-Assembly/GUID-670F5F75-7...

Any advice would be greatly appreciated!

 

 

0 Kudos
1 Reply
jim102190
Contributor
Contributor

Just in case if anyone runs into this. It appears that it is as simple as:

...

condition1:
switch:
"${ customProperties.image == 'imageA' }": action3
"${ customProperties.image == 'imageB' }": action5

...

Obviously all test conditions must be covered or else there will be a failure with the following error message: "No outgoing sequence flow of the exclusive gateway 'condition1' could be selected for continuing the process"

0 Kudos