Developing and Debugging Your BPA Scripts

We recommend considering the approaches outlined below when you construct scripts.

While designing your scripts, determine the most maintainable way to set them up. Rather than creating complex, monolithic scripts, we recommend dividing scripts into smaller sections. For example

  • Determine if several scripts have similar steps. If so, set up a script that contains these common steps and invoke it from the main scripts using a Perform script step.
  • Determine if a large script can be divided into logical sections. If so, set up a small script for each section and create a "master script" to invoke each sub script via a Transfer control step.
For debugging purposes, you may find it helpful to categorize the step types into two groups: those that involve some type of activity in the script area, and those that don't. The following step types cause activity in the script area: Height, Display text, Prompt user, Input data, Input Map, Set focus to a field.
CAUTION: Guiding scripts that interact with the user using the script area are limited to surf over fixed pages only and are considered legacy functionality. This technique is not supported on top of portal pages and is planned to be deprecated in a future release.
The rest of the step types are procedural and involve no user interaction. There are two techniques you can use to assist in debugging these step types.
  • You can instruct the system to display text in the script area.
  • You can display an entire data area (or a portion thereof) in the script area by entering %+...+% where ... is the name of the node whose element(s) should be displayed.
Note: Time saver. When you develop a new BPA script, change your user preferences to include the script as your first "favorite". This way, you can press Ctrl+Shift+1 to invoke the script (eliminating the need to select it from the script menu).