Vasyl Matyashovskyy schrieb: > Hi Thomas! > I have use the 1.5 Version of SWAMP. > > I meet a difficulty in operations with Variables. > > I need to execute simple action - to increment a variable on each entering > in Node. I try to make operations in "scriptaction" field. And the questions > are: > - how to declare a variable? > - how to make mathematical operations with it? > - maybe exist other way to make increment without using scriptaction?
Hi, the syntax of velocity scripts is explained here: http://jakarta.apache.org/velocity/docs/user-guide.html In the next version of SWAMP it will also be possible to use groovy (http://groovy.codehaus.org) scripts which are more powerful. > > Bellow is code how I try to make it, but it not working: We use the following code in one of our internal workflows to increment a variable: <scriptaction name="set_reopened_counter"> <description>Setting re-opened counter</description> <script> #set ($reopened = $wf.getDatabitValueAsInt("l3set.statistic.reopened")) #set ($reopened = $reopened + 1) $wf.getDatabit("l3set.statistic.reopened").setValue("$reopened") </script> </scriptaction> 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 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ swamp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/swamp-devel http://swamp.sf.net
