You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Good afternoon. Help solve the problem using the generated scripts. We have an endpoint where I want to use a script from the Script Editor. But I get an error - The script could not be compiled:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script761.groovy: 17: unable to resolve class Generator
If you want to import a class into another script, the script file has to match the class name.
So try to rename update.groovy to Generator.groovy
Then you will be able to
Generator gen = new Generator()
I see that your collectData method is static, this means you don't need to instantiate the class first:
I don't think it's possible to access a nested class that is nested inside a script.
The nested class would only be available from inside the script itself.
So if you want your nested class to be available to other scripts, then it must be nested inside a proper groovy glass.