Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Groovy script - get step status - isWaiting #4468

sebastien.floch ·


I'm trying something simple. From a groovy script, I would like to know if a step or a container is waiting or not.

My script is looking for the "Hello" step status

The groovy script inside the step "MyScript"


//To be sure that the "Hello" step is processed, I'm waiting 5 secs prior looking for the status

def stepPathToWatch = 'master>PAR BLOCK>SEQU 2>Hello'
def stepToWatch = build.getStep(stepPathToWatch) // Same result with steps.get(stepPathToWatch)'stepToWatch.getStatus().name()={}', stepToWatch.getStatus().name())'stepToWatch.isWaiting()={}', stepToWatch.isWaiting())

The log result

17:41:47,695 INFO - stepToWatch.getStatus().name()=IDLE
17:41:47,696 INFO - stepToWatch.isWaiting()=false
17:41:47,696 INFO - Executing post-execute action...

I'm unable to get the "WAITING" status and even the isWaiting() method return false.
any thoughts about what am I doing wrong ?

context: PMEase QuickBuild, 12.0.12, 2022-08-04

Thank you

  • replies 1
  • views 70
  • stars 0
robinshen ADMIN ·

You can not get sibling step status from another step. For performance consideration, a step only carries forward the parent container step info, and sibling steps may even run on different machines, and their status will not be sent to each other from time to time.