Migrate scripts from AX to Robots
Important
Only proceed with migrating the scripts if you have completed the previous stage of the migration. For more information, see Recreate your AX repository structure in Robots.
For each automated process in AX that you intend to recreate in Robots you need to migrate the associated scripts. You need to migrate all analytic scripts and any subscripts or helper scripts.
You cannot migrate scripts directly from AX to Robots. You need to export the scripts from AX to an intermediary location where Analytics is installed, such as your own computer. After completing any preparatory work that may be necessary, you commit (upload) the scripts from the intermediary location to Robots.
Backward compatibility of Robots
In general, Robots is designed to be as backward compatible as possible with AX. Most AX scripts should work in Robots without requiring any modification.
Any scripts that depend on AX-specific design will need to be adjusted. For example:
- scripts that access the AX operational database to read job schedules or logs
- scripts that include absolute paths to server resources that are no longer valid on the Robots Agent server
If you need assistance with adjusting analytic scripts for use in Robots, contact Diligent Support.
Export the scripts from AX
To begin the migration, use the Export option to export scripts from AX. Scripts are exported in the analysis app that contains them. Each exported analysis app becomes a separate Analytics project in the export destination.
This procedure assumes that you are using your own computer as the intermediary location.
- Create a folder on your computer for storing exported scripts.
- In the AX Server Explorer, select the analysis app containing the scripts that you want to export.
You can Ctrl+click to select multiple analysis apps in the same Analysis Apps parent folder, or select the parent folder to export all the analysis apps in the folder.
- Select File > Export.
- In the Export dialog box, make sure both options are not selected:
- Work with the exported file(s)?
- Export data files along with selected definitions?
- Click Browse, select the folder that you created for storing scripts, and click OK.
- Click OK to export the analysis app or apps.
The scripts are exported in their analysis app to the specified location. Each analysis app is converted to an Analytics project.
- Repeat the process for any additional scripts that you are ready to migrate.
Linked analytic scripts
Unlike AX, Robots does not support linked analytic scripts. If you use linked analytic scripts in AX, export the master analytic script and then commit it to each robot in which it is required.
Do any necessary preparatory work
Following the export from AX, scripts are ready to be committed to Robots if:
- all the scripts associated with an automated process are in a single Analytics project
- all analytic scripts that must execute sequentially in an automated process:
- use an appropriate alphanumeric naming scheme
- if implemented, have an appropriate analytic type
Analytic chains
Unlike AX, Robots does not support analytic chains. If you use analytic chains, you may need to do some preparatory work before scripts are ready to commit to Robots. For more information, see Replicating analytic chains in Robots.
Commit (upload) the scripts to Robots
Once all the scripts associated with an automated process are contained in a single Analytics project, and appropriately named, you can commit the scripts to Robots.
Committing scripts uploads them from a local environment to the cloud-based Robots app. We use the word "commit" rather than "upload" because each time that you commit scripts to the same robot you create a new version of the scripts in the script history.
For detailed information, see Committing ACL scripts (uploading) to Robots.
- Open the Analytics project with the scripts that you want to commit.
- From the Analytics main menu, select File > Commit Scripts.
If an error message appears, there may be a problem with the analytic header, or the script syntax, in one or more of the scripts in the project.
For more information, see ACL script development workflow in Analytics and Robots.
- If required, in the Select Destination dialog box, double-click the appropriate Diligent One instance.
The Robot Collection appears with the list of existing robots.
- In the list of robots, select the robot that you want to commit the scripts to and click OK.
The Analytics project that contains the scripts, and the existing robot, are now associated so that subsequent commits do not require that you manually locate the robot.
-
Enter a short commit message that describes the committed scripts, and click OK.
The scripts are committed to development mode in the robot.
- In the Commit Scripts Successful dialog box, click the second link to inspect the newly committed scripts in the Robots app.
The Script versions tab opens with the committed version of the scripts.
- Select the script version (vn).
The Version details side panel opens. The names of the individual analytic scripts and auxiliary scripts are listed beneath Script version changes.
- In Analytics, click OK to exit the Commit Scripts Successful dialog box.
Replicating analytic chains in Robots
Note
This section only applies if you use analytic chains in AX.
Unlike AX, Robots currently does not support assembling analytic scripts from anywhere in the repository into an analytic chain that executes sequentially. To implement sequential execution of a series of analytic scripts in Robots, you need to do two things:
- contain the analytic scripts in a single robot, and create a single task to execute the scripts
- use script names, and analytic type, to create a script sequence
Contain the analytic scripts in a single robot
Contain the analytic scripts that you want to execute sequentially in a single robot.
To contain the scripts in a single robot requires that you first contain all the related scripts in a single Analytics project. You commit the scripts as a single bundle called a script version from the Analytics project to the robot.
Once the scripts are in a single robot, you create a single task to execute the series of analytic scripts.
Contain associated scripts in a single Analytics project
If the scripts associated with a single automated process are distributed between two or more Analytics projects, you must unite the scripts in a single project before committing them to Robots. This situation could arise if analytic scripts were part of an analytic chain in AX.
- Open the Analytics project that you want to use to contain all the scripts associated with an automated process.
- In the Overview tab of the Navigator, right-click the project name at the top of the tree view and select Copy from another Project > Script.
- In the Locate Project File dialog box, locate and select the Analytics project that you want to copy the script or scripts from and click Open.
- In the Import dialog box, complete
any of the following steps to add one or more scripts to the To project_name list:
- Double-click a script.
- Ctrl+click multiple scripts and then click the right-arrow button.
- Click Add All to add all the scripts.
- Click OK to copy the script or
scripts into the destination project.
If a script with the same name already exists in the project, the copied script is given an incrementing numeric suffix.
- Repeat the process for any scripts in other projects that need to be included in the destination project.
Use script names, and analytic type, to create a script sequence
Script names
Analytic scripts are sorted alphanumerically by name in a robot task, and execute in order, so name the analytic scripts in a way that creates the execution sequence you want.
For example, the first script in the sequence could use the prefix A_01, the second script could use A_02, or B_01, and so on. A prefixing system makes subsequent insertion of additional scripts easier. Subscripts or helper scripts are not subject to the sequential naming requirement.
Note
You cannot rename scripts in Robots, so make sure all scripts are correctly named in Analytics before you commit them to Robots.
Analytic type
As an additional aid for sequencing, you can optionally specify a type for analytic scripts. Specifying a type groups the scripts into separate areas in a task. The areas are ordered as follows, and execute in order:
- Import
- Preparation
- Analysis
Within each area, the scripts are sorted alphanumerically. Regardless of script name, a task executes all the scripts in an area before moving to the next area.
For more information, see ANALYTIC tag.
Rename analytic scripts to create an execution sequence
If you want two or more analytic scripts to execute in sequence they need to be named in a way that creates the execution sequence you want. For more information, see Replicating analytic chains in Robots.
Note
The analytic script name specified in the analytic header is the name used in Robots. The name of the script in the Overview tab of the Navigator is not used.
- In Analytics, open the analytic script that you want to rename.
- In the //ANALYTIC tag in the analytic header, update the analytic name and click Save the Open Project .
For more information, see ANALYTIC tag.
- Repeat the process for all analytic scripts that require renaming.
Specify an analytic type to group analytic scripts
If you want to group analytic scripts into separate Import, Preparation, and Analysis areas in a task you need to specify a corresponding analytic type for each script. Grouping analytic scripts gives you an additional option for creating a script sequence but it is not required. For more information, see Replicating analytic chains in Robots.
- In Analytics, open the analytic script that you want to specify a type for.
- In the //ANALYTIC tag in the analytic header, add an analytic type and click Save the Open Project .
For more information, see ANALYTIC tag.
- Repeat the process for all analytic scripts that require an analytic type.
What to do next
Once you have migrated the scripts for one or more automated processes you are ready to start migrating data: Migrate data from AX to Robots.