Configuration of 'Database' components for accessing MySQL database
Purpose
This topic provides information about how to use the TruBot Designer Database components namely Connect and Execute Query to connect to MySQL database and execute a query respectively.
Prerequisites
-
Connector/ODBC 8.0 and Connector/Net 8.0 must be installed on the machine where the TruBot Designer is installed. This enables access to the provider MySQL.Data.MySqlClient via the Connect and the Execute Query components.
-
A Windows based MySQL client application through which MySQL database can be accessed. For example, MySQL WorkBench, DBeaver, etc.
Procedure
Step 1: Open MySQL WorkBench, and then go to Database > Manage Connections. This opens the Manage Server Connections dialog. In the dialog, select the connection that you want to use for accessing the MySQL database via the Designer components.
In the image below, the connection selected is ConnectDB.
Step 2: In the Manage Server Connections dialog, go to the Connection tab and select the connection method as Standard (TCP/IP) if it is not already selected. Again, in the Connection tab, go to the Parameters tab and by using the displayed parameter values, write a connection string in Notepad similar to shown below.
"server=127.0.0.1,3306;uid=root;pwd=Parker@123;database=world”
-
Except the database name and the password, all other values are available in the Connection tab for forming a connection string.
-
In the Connection tab, you can test the connection using the displayed parameters by clicking Test Connection.
|
Step 3: Open the TruBot Designer, and then create a workflow as displayed in the below image.
In the above workflow, first a connection is established with MySQL database (using the Connect activity), and then a query is executed (using the Execute Query activity), whose output is provided to the Output DataTable activity in a DataTable variable. The activity converts the DataTable instance stored in the variable to text and stored in the result variable. The text is displayed using the WriteLine activity. The properties for each activity are set in the subsequent steps.
Step 4: Select the Connect activity and double-click to view its details. Set the value of the Connection String property using the connection string that you had formed using the Notepad. Next, open the Provider drop-down and select MySql.Data.MySqlClient.
Now, open the Properties pane to view all the properties of the Connect activity. Create and assign dbConnection variable to the DBConnection property.
Step 5: Set the properties of the Execute Query, the Output DataTable and the WriteLine activities as shown in the below slideshow.
The 'WriteLine' activity
.
Note: The query should be based on the data stored in the database
The 'Execute Query' activity
The 'Output DataTable' activity
The 'WriteLine' activity
.
Note: The query should be based on the data stored in the database
The 'Execute Query' activity
Step 6: Go to the Test tab and run the activity. The output displayed is shown below.
Query result using MySQL Workbench
Output in TruBot Designer
Query result using MySQL Workbench
Output in TruBot Designer
Installation guide for IBM Personal Communication emulator
IBM® Personal Communications is a host communication and terminal emulation package for Microsoft™ Windows™. Mainframe Recorder in TruBot Designer requires an emulator to record Mainframe related activities. In addition, bots that run Mainframe type activities on bot‑stations required an emulator.
Follow steps below to install IBM Personal Communication Trial emulator on a given machine:
Step 1: Open IBM Mainframe Setup folder. Inside the folder, there are two folders namely Setup and MFConfig.
Note
|
- The Setup folder contains setup files required to install IBM Personal Communication Trial emulator whereas, the
- MFConfig folder contains configuration files required to run the Emulator.
|
Step 2: Open Setup folder. Select setup.exe and select Enter.
Step 3: A User Access Control prompt will appear. Select Yes to grant permission to the installer application to start the InstallShield Wizard.
Step 4: The InstallShield Wizard page will guide you through the installation process. The page will display the progress of pre‑installation checks. Let the process get completed.
Step 5: After pre‑installation checks are completed, a welcome page will appear. Select Next to proceed to the next step.
Step 6: A Windows Installer pop‑up will appear. Let the installer complete the process.
Step 7: Software License Agreement page will appear. Accept the agreement, and then select Next to proceed to next step.
Step 8: In the Customer Information page, enter username and organization name. Choose one of the two options mentioned under ‘Install this application for’ label as per your requirement, and then select Next to proceed to next step.
Step 9: In the Setup Type page, select Typical option for setup type, and then select Next to proceed to next step.
Step 10: In the Application Data Location page, choose one of the two options for data location as per your requirement, and then select Next to proceed to next step.
Step 11: In the Ready to Install the Program page, select Install to begin the installation process.
Step 12: The installation process will start and a progress bar will display the installation progress.
Step 13: After successful installation of the emulator, a success message will appear. Select Finish.
Step 14: You will be prompted to restart your computer so that configuration changes related to installation take effect. Select Yes. This completes the installation process.
Note
|
1. After restarting your machine, you can go to Control Panel > Programs and Features and find IBM Personal Communications Trial in the list of installed programs.
2. After restarting the machine, copy MFConfig folder (present in IBM Mainframe Setup folder) to a location that does not requires access privilege. Use the same location to launch emulator from TruBot Designer.
3. Mainframe Recorder stores the path of the Config.ws file (that its uses to launch an emulator) in the bot itself. When the bots runs on a bot station, it attempts to find the Config.ws file at the same file location. For example, if the recorded path of Config.ws file is C:\MFConfig, then bot will attempt to find the file in C:\MFConfig folder on bot station. Hence, it is important that Config.ws file should exist in the bot station at the recorded file location. The file location should also be accessible with the user credentials that the bot uses.
4. DefaultKeyboard and DefaultDirectory entries in Config.ws file should be updated as per the Config.ws and TN3270.kmp file locations. Users can also edit other entries in Config.ws to customize it as per their requirement.
|
More about Config.ws and TN3270.kmp files
Config.ws and TN3270.kmp files are present in MFConfig folder of the emulator setup. The former contains host server, keyboard setting, and settings to run emulator while the latter contains keyboard layout setting to run the emulator. A page shot of Config.ws and TN3270.kmp files are shown below.

Config.ws TN3270.kmp
Adding a user account in Google Authenticator
To add a user account in Google Authenticator:
-
Open the link below and sign-in using your Google account credentials.
https://myaccount.google.com/signinoptions/two-step-verification
The 2-step Verification page opens.
-
On the page, turn on two-step verification option, if not already.
-
Scroll down and select Add Authenticator app. The Authenticator app page opens.
-
On the page, select Set up authenticator. A dialog displaying a QR code opens.
-
Before scanning the QR code, select Cant' scan it? to get access to the security key.
Note down the email address and the security key associated with it, and save it in a secure place so that it is not compromised. You can use the security key information for configuring TruBot Designer's multi-factor authentication activities later.
-
Click Back to access the QR code again. Follow the instructions given in the dialog i.e., open the Google Authenticator app and tap +, and then choose Scan the QR code to scan the QR code. A entry related to the user's account gets added in the app. Tap the entry to get access to the token for the user account in real time.
Adding a user account in Microsoft Authenticator
To add a user account in Microsoft Authenticator:
-
Open the link below and sign-in using your Microsoft account credentials.
https://account.microsoft.com/security
-
After successful sign-in, the Security tab opens. Click Manage how I sign in.
This opens the Security page from where you can manage two-way authentication settings.
-
On the top-right corner of the page, click Manage to manage the two-way authentication settings.
This opens the page to set up two-way authentication,
-
On the page, click Next.
Subsequent pages display information on apps where the two-way authentication is not applicable. Keep moving on to the subsequent pages until you reach the last page in the sequence. Click Finish to enable two-way authentication process.
On the Security page, you should now see the two-step process as enabled.
-
Scroll-down the page to find options for adding options for two-way authentication.
-
Click Add a new way to sign in or verify. This displays the list of available options .
-
Select Use an app from the list of available options.
The steps required to set up the Microsoft Authenticator app are displayed.
-
Latest versions of Microsoft Authenticator app give preference to push notifications over token when adding a user account as the former more is more convenient. However, to use the token method, click set up a different Authentiator app.
This displays the QR code along with the steps required how to scan the code.
-
Just below the QR code, click I can't scan the bar code link.
The security code is now displayed in place of QR code along with the list of steps that show how to use the security code.
-
Save the security code in a secure place such that it remains confidential.
Note: Do not close the page as you can use the text box on this page to verify the token generated for your account after the account is successfully added to the Authenticator app. After verifying the token, you can sign out of your account and then sign-in again using the token.
-
Download and install Microsoft Authenticator app in your mobile, if you have not already done it. (At the time of writing, only the mobile version of the app was available.)
-
Open the Microsoft Authenticator app and tap + to add an account.
The options to add work/home account or other account are displayed.
-
In the displayed options, select Other account.
-
Enter the account name and secret key and tap Finish.
The account name gets added and appears on the home page of the app.
-
On the home page, tap the account to view the current token for the account.
Details about the account including the token are displayed.
-
Use the generated token on the set up page to verify that it works.