The BSF Script Tool Agent
The BSF Script tool agent executes a script written in a Bean Scripting Framework-compliant (BSF) scripting language.
Repository Metadata
The script can be specified in the tool agent repository or in an <xpdl:ExtendedAttribute>
element. A BSF Script tool agent metadata entry contains:
<bsf-script ... file="boolean">
...
<script ... />
<language ... />
</bsf-script>
- script
- The script content, enclosed in a CDATA section if necessary.
- file
true
if script is the name of the file containing the script content, false
if the script is inline (the default).
- language
- The name under which the language is registered in the BSF framework.
XPDL Extension
To supply the script inline in the workflow definition, use the obe.Script
XPDL extension:
<Activity Id="nmtoken" ...>
...
<Implementation>
<Tool Id="MyBeanShellScript" Type="PROCEDURE">
...
<ExtendedAttributes>
<ExtendedAttribute Name="obe.Script"><![CDATA[System.out.println("Hello from Beanshell");]]><ExtendedAttribute>
</ExtendedAttributes>
</Tool>
</Implementation>
...
</Activity>