error MissingMethodException: No signature of method: when.call()
reyhansofian opened this issue · 1 comments
reyhansofian commented
Hi, there's MissingMethodException
on a sandbox
hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: when.call() is applicable for argument types: (org.jenkinsci.plugins.workflow.cps.CpsClosure2) values: [org.jenkinsci.plugins.workflow.cps.CpsClosure2@17cc74ef]
01:56:46 Possible solutions: call(boolean, java.lang.Object), wait(), any(), wait(long), main([Ljava.lang.String;), any(groovy.lang.Closure)
I'm not sure how to fix this issue tho
michaelze commented
As you did not quote the code that is throwing the exception, the following proposal is just an edjucated guess: The error message says, that you forgot to specify a boolean parameter to the when call.
So instead of
when () {
// your code to execute conditionally
}
try to use
when (<boolean statement>) {
// your code to execute conditionally
}
where <boolean statement>
can be anything that evaluates to a boolean value.