groovy.lang.MissingMethodException: No signature of method: com.pmease.quickbuild.plugin.basis.ScriptStep.getStepChildNames() is applicable for argument types: () values: []
Doing something like "system.getConfigurationManager().get('root').getStep('myStep').getStepChildNames()" fails with the above error when looking to see which steps have children.
If the step has children, it works fine. It should just return 0 children.
Description
groovy.lang.MissingMethodException: No signature of method: com.pmease.quickbuild.plugin.basis.ScriptStep.getStepChildNames() is applicable for argument types: () values: []
Doing something like "system.getConfigurationManager().get('root').getStep('myStep').getStepChildNames()" fails with the above error when looking to see which steps have children.
If the step has children, it works fine. It should just return 0 children.
The leaf step is a different class than the container step, and method "getChildStepNames()" only exists in container step. To check if the step has any children, first check if it is a container step, then further check if contains any child steps as below:
groovy:
def mystep = system.configurationManager.get("root").getStep("mystep");
if ((mystep instanceof com.pmease.quickbuild.stepsupport.CompositeStep) && !mystep.childStepNames.isEmpty()) {
// there are child steps
}
Robin Shen[12/Sep/14 12:26 AM]
The leaf step is a different class than the container step, and method "getChildStepNames()" only exists in container step. To check if the step has any children, first check if it is a container step, then further check if contains any child steps as below:
groovy:
def mystep = system.configurationManager.get("root").getStep("mystep");
if ((mystep instanceof com.pmease.quickbuild.stepsupport.CompositeStep) && !mystep.childStepNames.isEmpty()) {
// there are child steps
}
groovy:
def mystep = system.configurationManager.get("root").getStep("mystep");
if ((mystep instanceof com.pmease.quickbuild.stepsupport.CompositeStep) && !mystep.childStepNames.isEmpty()) {
// there are child steps
}