Task Builder Help Globe Icon

Add Navigation Script: Transition

Use transition script to notify the run-time navigation engine which AID key should be sent to the host to navigate away from the task step.

You notify the navigation engine by calling the INavSystem.setAction method with a string representing AID key you wish to be sent to the host. The desired AID key can be represented using either the brace style mnemonic or the HLLAPI style mnemonic and the Javadocs for the INavSystem.setAction method shows the supported AID keys for each host type including the associated mnemonics. The Usage Tips, located on the top pane of the editor, provide the variable names that are available to you and link you to the Javadocs for more information on the objects the variables represent.

After the transition phase has been scripted, the transition action is no longer visible in the designer. If you disable or delete the transition script, then the original transition action will again be available.

The following code snippet demonstrates how to tell the navigation engine to issue a F3 AID key if the contents of HostField 3 has the string "Error", or, if not, to send the Enter AID key:

		String strHostField3 = qaScreen.getField(2).getText();
		if (strHostField3.indexOf("Error") != -1)
	catch(Exception e)
		Handle any exceptions that may have occurred
		throw new UserScriptException(e.getLocalizedMessage());

Disable the Above Script in Step Execution:   Select this option to save your script, but make it unavailable to your task. With this option selected the scripting field is disabled and you cannot edit your script.

Verify Script:   Click this option to verify your script. This will not save changes. If the verification is successful, a message displays in the top pane of the editor. If the verification produces errors, they must be either corrected or the script disabled before you can save the script and proceed with implementing task execution.
Related Topics
Bullet Adding Scripts to Task Steps
Bullet Referencing Scripted Steps in a Task
Bullet Using Scripts to Replace Portions of Task Steps, Overview
Bullet Task Builder for Screens Help Links