Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Groovy is a scripting language that FlexDeploy uses in many places. It allows users to configure values of inputs and variables based on context.

To enable it, click the curly braces next to a value. Some inputs are locked to Groovy mode and can’t be toggled.

once it’s enabled, you will see the purple script indicator

on the left side.

The Maximize button

on the right will enlarge the input so that you can see your code more easily.

Pressing Ctrl+ Space, period, will open a drop down of potential variables or functions available to you based on the context. Regular text values should be quoted.

Clicking the Minimize button

in the top right will collapse the input again and you can save your work.

If your Groovy Script has a compilation error, you will be notified when you save. Other errors are found at run time and will be found when the value is used.

In the above example, there was a compilation error. It shows this in the UI:

Fix the problem, close the error popup, and save again.

After adding the missing plus sign, the value saves successfully.

Known Issues

One issue found in testing that will be resolved in the future, but is open at this time is that in some situations if you make your groovy into multiple lines with plus signs you may get the error:

[No signature of method: java.lang.String.positive() is applicable for argument types: () values: [] Possible solutions: notify(), tokenize(), size(), tokenize(), size()].

If you get this error, move your code onto a single line.

  • No labels