VMware Cloud Community
richarddevers
Contributor
Contributor

vRa Code Stream 8.2 - POLL task criteria

Hi

I'm currently working on code stream on vmware cloud services and i got an issue.

Using a "POLL" task, i can not figured out an success criteria based on the output of one of the current poll rest call

for eg, this does not works:

${Stage0.task1.output.responseJson.status} == "COMPLETED"

The error message is "Invalid exit criteria"

Based on this documentation, it should works, but it doesn't.

How do I use a REST API to integrate vRealize Automation Code Stream with other applications

Even worse, the simpliest test doesn't work too.

true == true

"a" == "a"

Do you know the syntax , it looks like it's completly broken as it is.

Thanks,

Regards

Richard Devers

Reply
0 Kudos
4 Replies
yswaroop
VMware Employee
VMware Employee

Hi,

Could you please try once again by entering the Success Condition and Failure Condition?

Thanks,

Swaroop

Reply
0 Kudos
filosmith
Enthusiast
Enthusiast

I'm having a similar problem. Admittedly, this is my first attempt at a POLL task.

My POLL task is called waitForDeployment (I thought whitespace might be the problem). My Success Condition is:

${Stage0.waitForDeployment.output.responseJson} != ''

And I get this when validating:

waitForDeployment >> Invalid binding(s): ${Stage0.waitForDeployment.output.responseJson}

I've tried many different Success Conditions.

Does anyone have this working?

Reply
0 Kudos
filosmith
Enthusiast
Enthusiast

I tried just plain responseBody and that validates but then gives an Undefined Variable error when running it.

Reply
0 Kudos
filosmith
Enthusiast
Enthusiast

I opened a case with VMware. We're doing it wrong. Start from the key in the response, so in my case my Success condition is simply:

state == 'SUCCESSFUL'

and my Failure condition is:

state == 'CANCELLED' || state == 'PRE_REJECTED'

 

I guess yours would be:

status == 'COMPLETED'

Reply
0 Kudos