<js>
Invokes operations specified by SCRIPT using the JavaScript engine.
| Name | XPath | Description | Reagent Type | Expected Type | Required |
|---|---|---|---|---|---|
| CACHE | @cache | A shared Map to cache items in. The default is the value of the 'Attributes.CACHE' request attribute. | PHRASE | java.util.Map | No |
| CACHE_MODEL | @cache-model | Specify either NONE, ONE, or ALL. | PHRASE | java.lang.String | No |
| SCRIPT | script/text() | Script content to execute. Must be placed within a child <script> element. | PHRASE | java.lang.String | Yes |
| SUBTASKS | subtasks/* | The set of tasks that are children of this task. | NODE_LIST | java.util.List | No |
Creates an array of three URLs in JavaScript, then computes a checksum value ten times for one of the URLs in the array (distributed evenly) using a pool of five threads, writing the current count and checksum value to the console each time:
${num}=${checksum(${js(urls[num % 3])})}