Script activity

When you are creating a process with the  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.

To configure your system to execute scripts with the script adapter

  1. Locate the Dumper.pm file within the ActivePerl installation directory. The default location is C:/Perl/lib/Data/Dumper.pm.
  2. Open the Dumper.pm file in Notepad.

  3. Make line 113 a comment, by adding # at the beginning of the line, as shown below.
    #sprintf our $refaddr_format, Scalar::Util::refaddr(shift);
  4. Save the changes to the file and close Notepad.

  5. Create the Script Adapter and enable it on a peer using Grid Manager.

To create an embedded script

  1. On the the  Development Studio process canvas, double-click the Script Activity to open the Properties panel.
  2. In the Properties panel for the Script activity, select the Embedded option to designate the Script Source.
  3. Click the View/Edit Script button and use the Scripting Language menu to select the scripting language.

  4. Click the Enter Script field and type the script to be executed.
  5. Click OK to save the changes to the script and to return to the Properties tab.

  6. Click OK to save the changes to the Properties tab.

To use a script from an external file

  1. On the the  Development Studio process canvas, double-click the Script Activity to open the Properties panel.
  2. In the Properties panel for the Script activity, select the File option to designate the script source.

  3. In the Location field, click the Search button to launch the file browser.

  4. Navigate to the location of the script file, and then click Open to select it.

    This script file must exist in the same location on every Peer that has the Script adapter enabled.

  5. Select the scripting language.

  6. Map the input and output values.

  7. Click OK to save the changes to the Properties tab.

This section contains the following topic:

Was this page helpful? Yes No Submitting... Thank you

Comments