One of the most common problem Ragic developers encounter is the difference between Javascript data types and Java data types in workflow programs. Our workflow engine runs on Rhino java scripting engine, and here's some advice from Mozilla that may help developers:
https://developer.mozilla.org/en-US/docs/Scripting_Java
The difference between Java Strings and Javascript Strings is actually the most common problem:
Java Strings and JavaScript Strings
It's important to keep in mind that Java strings and JavaScript strings are not the same. Java strings are instances of the type java.lang.String and have all the methods defined by that class. JavaScript strings have methods defined by String.prototype. The most common stumbling block is length, which is a method of Java strings and a dynamic property of JavaScript strings:
js> javaString = new java.lang.String("Java")
Java
js> jsString = "JavaScript"
JavaScript
js> javaString.length()
4
js> jsString.length
10
Rhino provides some help in reducing the differences between the two types. First, you can pass a JavaScript string to a Java method that requires a Java string and Rhino will perform the conversion. We actually saw this feature in action on the call to the java.lang.String constructor in the preceding example.
Rhino also makes the JavaScript methods available to Java strings if the java.lang.String class doesn't already define them. For example:
js> javaString.match(/a.*/)
ava