If you want to find out about the execution status of a workflow step, you can use the following methods:


for (step in workflowInfo.steps) {
	if (step.isPreExecuted()) {
	 stageOwner = step.uniqueName
   }
}