Create and edit Forward Path scripts
To create and edit Forward Path scenario and task scripts, use the Forward Path Logic Editor. By default, you write scenario and task scripts in Visual Basic .NET 2.0 (VB .NET). For comprehensive Visual Basic .NET documentation, see http://msdn.microsoft.com/en-gb/library/2x7h1hfk.aspx.
- See Forward Path specifications for more information about the structure of the scripts.
- See Forward Path example for a step-by-step tutorial.
To open the Forward Path Logic Editor:
- From the AppDNA menus, choose Configure > Forward Path.
By default, the Forward Path Logic Editor screen is divided into three sections. These are described under separate headings below.
The main toolbar at the top of the screen has the following options:
New Scenario – Creates a new scenario script. When you click this button, AppDNA opens a dialog box where you can enter the new scenario’s name and description. When you click OK, AppDNA creates a basic scenario and opens it in the Editor window, ready for you to edit it.
New Task Script – Creates a new task script and associates it with a specific value in a scenario’s Outcome column. When you click this button, AppDNA opens the Forward Path Task Script dialog box, which lists the possible values in the Outcome column for the scenario that is open in the Editor. Select the value with which you want to associate the task script, enter a description, and click OK. See “Forward Path Task Script dialog box” below for more information.
Test – Use to test simple scenario scripts. This runs the script against the applications that are currently selected in the Application List and displays the results on the Output tab. However, this feature does not support some of the advanced Forward Path features, such as grouping. For more advanced scenarios, you need to test your scenario by displaying it in the Report Viewer in the normal way.
Export – Export one or more scenario and task scripts to an XML file – for example, to create a backup. This opens the Forward Path Scenario Export dialog box where you can select the scripts that you want to export.
Import – Import a previously exported scenario or task script file.
Main section (top left)
The main section of the screen has two tabs as follows:
Editor tab – Use to create and edit Forward Path scenarios and task scripts. The toolbar provides the following options:
Save – Save any changes you have made to the script that is open in the Editor.
Properties – View and edit the name and description of the script that is currently open in the Editor.
Show and hide – Click to view or hide the Errors and Side-by-Side Viewer (located at the bottom of the screen).
Separate window – Open the Editor in a separate window.
Task Script Help – View documentation of the AppDNA APIs that are available to task scripts.
Output tab – Displays the output of your scenario script when you click Test on the main toolbar. The output is shown as a flat list without additional formatting information, even if the scenario includes advanced functionality that groups the applications. For more advanced scenarios, you need to test your scenario by displaying it in the Report Viewer in the normal way.
Explorer (right side)
The Explorer provides three tabs as follows:
Scenarios – Lists the sample scenarios that come with AppDNA and any other scenarios that are available. Click a scenario to open it in the Editor and view its description at the bottom of the Explorer tab. One scenario is shown in bold to indicate that it is the active scenario. This means that it is selected by default when you view the Forward Path report. To mark a scenario as the active scenario, right-click it and from the shortcut menu, choose Set as Active.
Task Scripts – Lists the sample task scripts that come with AppDNA and any other task scripts that are available. Click a task script to open it in the Editor. Task scripts are shown as active or inactive. Active means that it is associated with the active scenario.
Property Explorer – Lists the AppDNA properties that you can use in a scenario script. The property names are mostly self-explanatory. However, the MOE properties relate to data imported from Active Directory and ConfigMgr, and the RAG property is the custom RAG.
Errors and Side by Side viewer (bottom left)
The Errors and Side by Side viewer has two tabs:
Errors / Warnings – Displays any errors or warnings that are detected in the current script.
Side by Side Viewer – Use to view another script side-by-side with the one you are editing in the main Editor. To do this, select the scenario or task script on the Explorer tab, right-click and choose View side by side.
Forward Path Task Script dialog box
The Forward Path Task Script dialog box opens when you do one of the following:
- Click New Task Script on the main toolbar.
- Right-click a scenario on the Scenario Explorer tab and choose New Task Script from the shortcut menu.
The options in the Forward Path Task Script dialog are:
Associated outcome – Lists the possible values that can be generated for the Outcome column by the scenario that is currently open in the Editor window.
My outcome was not listed – Select this check box to refresh the list of possible values in the Associated Outcome drop-down list. If the value you expect still does not appear, make sure that you have saved any changes to the scenario script and check that the correct scenario is open in the Editor.
Description – It is good practice to enter a full description.