I see the problem now, new lines are being lost which explains why all
errors are on line 1.
You can try something like.
// a comment
print "hello";

Which is legal groovy code.

Lets get Groovy!
================
Version: 1.0-JSR-06 JVM: 1.5.0_09-b01
Type 'exit' to terminate the shell
Type 'help' for command help
Type 'go' to execute the statements

groovy> // a comment
groovy> print "hello";
groovy> go
hello
===> null


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas
Schmidt
Sent: Friday, October 06, 2006 5:55 AM
To: swamp-devel@lists.sourceforge.net
Subject: Re: [swamp-devel] Groovy arrays not working

Pawlowsky, Marc wrote:
> Trying to use Groovy some more.
> 
> Using arrays gets blocked.
> 
> <node name="arrayInTest">
>               <description>Passing in an array.</description>
>               <scriptaction name="arrayInTestAction"
> language="groovy">
>                       <description>Passing in an array</description>
>                       <script>
>                       <![CDATA[
>                       x=[1,2]
> wf.getDatabit("test.result_arrayInTest").setValue("arrayInTest");
>                       ]]>
>       </script>
>               </scriptaction>
>               <edge to="arrayOutTest" event="none"/>
>       </node>
> 
>       Scriptaction: arrayInTestAction contains errors: startup failed,
> Script1.groovy: 1: unexpected token: wf @ line 1, column 10. 1 error
> 
> Any recommended fixes?

You forgot the ";" after x=[1,2]
Greetings

--
Thomas Schmidt (tschmidt [at] suse.de)
SUSE Linux Products GmbH :: Research & Development :: Internal Tools
"Computers are useless. They can only give you answers.", Pablo Picasso

------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT Join
SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
swamp-devel mailing list
swamp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swamp-devel
http://swamp.sf.net
 
     This message may contain privileged and/or confidential information.  If 
you have received this e-mail in error or are not the intended recipient, you 
may not use, copy, disseminate or distribute it; do not open any attachments, 
delete it immediately from your system and notify the sender promptly by e-mail 
that you have done so.  Thank you.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
swamp-devel mailing list
swamp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swamp-devel
http://swamp.sf.net 

Reply via email to