:DISCONNECT
Use the :DISCONNECT script statement to disconnect a connection to the AE system. Users or user groups specified as connections must belong to the same client as the object whose script uses this statement. An Automic Web Interface message informs the affected user that their connection has been interrupted and that they must log on again. If there are no active connections to disconnect, no error occurs. If specified users or user groups are invalid, script processing aborts and an error message is sent. You can also specify an agent group instead of individual agents; the disconnect then applies to all agents in that group.
Note: Users or agents must have the right to cancel processes, otherwise this statement cannot be processed.
Syntax
: DISCONNECT Connection, Name
For the connection type HOST:
: DISCONNECT Connection, Name, Communication Process, HOST status
Parameters
| Parameter | Description | Format | Allowed Values |
|---|---|---|---|
| Connection | Type of connection to disconnect | Script literal, script variable, or number |
|
| Name | Name of the user, user group, agent, or agent group to disconnect | Script literal, script variable, or number | n.a. |
| Communication Process
(Optional, HOST only) |
Name of the communication process (CP/JCP) to which the agents are connected. Only valid for connection type HOST. | Script literal, script variable, or number |
|
| HOST status
(Optional, HOST only) |
Filters the agents to disconnect based on their activity status | n.a. |
|
Important Considerations
-
Using :DISCONNECT with HOST or HOSTGROUP does not terminate the agent; it ends the connection temporarily. The agent reconnects when it receives a status check signal. This is useful when starting a new communication process and wanting the agents to rearrange.
-
To terminate an agent, use the :TERMINATE script statement.
Examples
The following example disconnects the user SMITH/AE from the AE system.
: DISCONNECT "USER", "SMITH/AE"
The following example disconnects agent WIN01.
: DISCONNECT "HOST", "WIN01"
The following example disconnects agent WIN01 only if it is idle.
: DISCONNECT "HOST", "WIN01",, "IDLE"
The following example disconnects only idle agents from the communication process AUTOMIC#CP001.
: DISCONNECT "HOST", "*", "AUTOMIC#CP001", "IDLE"
The following example disconnects all idle agents from the base version during a ZDU.
: DISCONNECT "HOST", "*", "BASE", "IDLE"
The following example disconnects all agents in the database agent group.
: DISCONNECT "HOSTGROUP", "HOSTG_DB_UNIX"
See also: