Disconnect
AutomatR.MySQLDataBase.Database.Disconnect
The "Disconnect" activity in AutomatR is designed to gracefully disconnect from a MySQL database, ensuring proper closure of the database connection established by the "Connect" activity. This is a crucial step in database operations to release resources and manage connections efficiently.
Properties
Name | Description |
---|---|
Input | |
Connection | Provide a MySqlConnection variable that was used to establish the database connection. Variables of type MySqlConnection. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Disconnect" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
How to use:
- Drag and drop the "Disconnect" activity onto the workflow.
- Configure the properties by specifying the MySqlConnection variable obtained from the "Connect" activity.
- Optionally, configure the delay for synchronization purposes.
- Execute the workflow to gracefully disconnect from the MySQL database.
Example: Consider an example where the "Disconnect" activity is used to disconnect from a MySQL database:
Disconnect:
Connection: MySqlConnectionVariable
Delay: 2
In this example, the activity disconnects from the MySQL database using the MySqlConnection variable "MySqlConnectionVariable." A delay of 2 seconds is introduced before the disconnect operation to handle synchronization issues. The activity logs a trace message indicating successful disconnection.