When you are creating a process with the BMC Atrium Orchestrator Development Studio application, the Script activity enables you to use Perl or Jython scripts through a script adapter. This activity provides an alternative to using the Call Adapter activity with a Script adapter. The Perl or Jython scripts are either written in the activity or referenced by a path.
Some configuration in Grid Manager and other files is necessary to configure the activity. To use the script adapter, you must first edit the dumper.pm file and then create a script actor adapter, named ScriptAdapter, in Grid Manager. In Grid Manager, you must enable the ScriptAdapter on all peers that will run a process containing a Script activity. If a script is referenced, it must exist in the same location on each peer that can be called to run the process.
The Property Panel for a Script activity consists of three tabs: Properties, Logging, and Metadata. The Logging and Metadata tabs follow the standard layout and principles. The Properties tab is organized into three panes: the Script Source, Script Input Tokens, and Script Output Tokens. The choices for Script Source are the following:
- Embedded: Allows you to enter a script within the Script activity in Perl or Jython. With the selection of Embedded, the View/Edit Script button will be available.
- File: Allows you to designate the location of a file containing a script to be executed. With the selection of File, the Location and Script Language fields will be available.
- Locate the Dumper.pm file within the ActivePerl installation directory. The default location is C:/Perl/lib/Data/Dumper.pm.
Unknown macro: {multi-excerpt}
- Open the Dumper.pm file in Notepad.
- Make line 113 a comment, by adding # at the beginning of the line, as shown below.
#
sprintf our $refaddr_format, Scalar::Util::refaddr(shift)
;
Unknown macro: {multi-excerpt}
- Save the changes to the file and close Notepad.
- Create the Script Adapter and enable it on a peer using Grid Manager.
To create an embedded script
- On the the BMC Atrium Orchestrator Development Studio process canvas, double-click the Script Activity to open the Properties panel.
- In the Properties panel for the Script activity, select the Embedded option to designate the Script Source.
Unknown macro: {multi-excerpt}
- Click the View/Edit Script button and use the Scripting Language menu to select the scripting language.
- Click the Enter Script field and type the script to be executed.
Unknown macro: {multi-excerpt}
- Click OK to save the changes to the script and to return to the Properties tab.
- Click OK to save the changes to the Properties tab.
To use a script from an external file
- On the the BMC Atrium Orchestrator Development Studio process canvas, double-click the Script Activity to open the Properties panel.
Unknown macro: {multi-excerpt} In the Properties panel for the Script activity, select the File option to designate the script source.
Unknown macro: {multi-excerpt} In the Location field, click the Search button to launch the file browser.
Unknown macro: {multi-excerpt} Navigate to the location of the script file, and then click Open to select it.
Unknown macro: {multi-excerpt} Select the scripting language.
Unknown macro: {multi-excerpt} Map the input and output values.
Unknown macro: {multi-excerpt} Click OK to save the changes to the Properties tab.
Unknown macro: {multi-excerpt}
This section contains the following topics: