cancel
Showing results for 
Search instead for 
Did you mean: 

How to use groovy script with nuxeo shell ?

j0seph_
Champ in-the-making
Champ in-the-making

Hi i'm trying to use a groovy script with the nuxeo shell but everytime I launch the command "script test.groovy" in the remote namespaces, connected as Administrator i get an error "failed to run script". I'm working on this problem for two days, I even try the groovy script example in the nuxeo shell folder but i still get the same error.

Thank you in advance for your help

Additionnal Informations :

Nuxeo Version : 5.5

test.groovy : " println "Hello" " ( this script actually work in the groovyConsole )

1 ACCEPTED ANSWER

Vincent_Dutat
Confirmed Champ
Confirmed Champ

Hi,

to print a string in nuxeo-shell, just do like this in your groovy script :

def result = "";

result += "Hello";

return result;

View answer in original post

3 REPLIES 3

Vincent_Dutat
Confirmed Champ
Confirmed Champ

Hi,

to print a string in nuxeo-shell, just do like this in your groovy script :

def result = "";

result += "Hello";

return result;

Thank you Vincent for your answer, it works fine.

The reason why is how execution of groovy scripts is done in Nuxeo.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.