Sample: Run Same Project with Different Data Sources Using Enterprise Guide Automation
Do you have 2 or more datasets that you run through the same process on a regular schedule? If so, this sample could help you to automate this process.
This sample demonstrates how to run the same Enterprise Guide project for 2 different datasets using the Enterprise Guide autormation interface. It demonstrates how to change repositories and use data from different servers when running your project. This type of program could be useful if you have different servers that contain different datasets that use the same basic data format.
This sample will run the project using the first dataset, generate output, and then switch servers, run the project using the second dataset, and generate new output. There are some additional requirements detailed in the program comments.
This automation script is an example of the type of script that can be run in batch mode or scheduled to run using the Windows Scheduler facility.
Check the attachments for the EG Project that is designed to run with this sample code.
Details and Limitations
This vb script will connect to a Repository and server and run an
EG project that refers to data in that repository and on the requested
server. The script will then change the repository and connect to a
new repository that contains data with the same name on a server with
the same name.
Although the servername and data name are the same, the data that is
stored in each repository could be different and provide different
Once a project is run, the project with the new data will be saved
locally to the client PC. The result will be 2 different projects
on the client machine with results of running the same process on
2 different sets of data.
- Program Requirement:
Valid Profiles must be defined within EG for the client that is running
this script. The variables 'profile1' and 'profile2' must be set to
match a valid profile name from within the list of profiles.
The user running this program must have permissions and valid credentials
for the repositories and servers that are referenced in this script and
in the project that is being run.
This type of program could be useful if you have different servers that
contain different data stored in the same hierarchy on both servers. For
example, you may have a repository for an R&D Division and another for HR.
Both repositories may have employee datasets stored on a server called
Administration. The same EG project could be run against the different
datasets and the results would be specific to the R&D Divsion or the HR
- This sample is one in a series of samples available to demonstrate some of the features of the Enterprise Guide 4.2 automation interface for Visual Basic. There is typically a great deal of additional information available in the comments of the code sample.