Previous Topic: Writing Scripts

Next Topic: How You Pass Data to and from Scripts

Implementing in Java or JavaScript Considerations

Deciding to implement in Java or JavaScript encompasses a number of considerations:

Important! Pay careful attention to XML quoting issues so that scripts are not corrupted when they are included as fields within an opbindings XML metadata document. To avoid script corruption, use CDATA sections as demonstrated in sdkscript_opbindings.xml. If for some reason you cannot use CDATA sections, then use the correct quoted characters in your script text instead. For example, replace < characters in a script with &lt; when the script is included in an XML document.

Note: The scripting language supported for the Java CS is JavaScript as provided by the Rhino opensource project, which Sun Microsystems bundle with JDK 6 onwards. For more information, see the Rhino opensource project at http://www.mozilla.org. The version used by JCS 1.7R1 is later than the bundled version (1.6R2), as the bundled version is deficient in regards to exceptions thrown from your JavaScript scripts.