Determine the calling user and display name
- Last UpdatedApr 08, 2026
- 2 minute read
A Business Logic Tier (BLT) component can determine who was the originator of the execution and the display station from which it was called. This can be done by accessing some built-in properties of the BLTProcessor class.
This scenario guides you through the steps required to determine the calling user and the display name.
To identify the code associated with each step, see the code comments in the Example code section.
To determine the calling user and display name
- Open the Program.cs file from the created project.
- Navigate to the Process method of the TestBLTProcessor class.
- Use the following properties:
- OriginalClientDomainName: Gets the domain name of the client that initated the BLT call.
- OriginalClientUserName: Gets the username of the client that initiated the BLT call.
- XOSDisplayName: Gets or sets the AVEVA Enterprise SCADA HMI display name that called the BLTComponent.
- Verify the execution by using the DALBLTTestClient application.
For more information, see Check the execution of a BLT component using the DALBLTTestClient application.
Example code
/// <summary>
/// Checks whether the calling user has permission to perform fnputs on a provided analog point
/// from the current display station in the current operation mode.
/// If the combination of user and display stations does not allow fnputs operations,
/// an error describing the calling domain/user and the display station is returned.
/// If the combination of user and display stations does allow fnputs operations, the process execution terminates successfully.
/// </summary>
public sealed class TestBLTProcessor : BLTProcessor
{
private readonly IDNALog log;
public TestBLTProcessor()
{
log = DNALogAdapter.Instance;
Parameters = new BLTParameterList();
Parameters.Add(new BLTParameter("name", typeof(String), false, false));
}
/// <summary>
/// Executes the business logic of the component.
/// </summary>
public override void Process()
{
RowsAffected = 0;
try
{
String pointName = Parameters.Item(0).Value.ToString();
// This guarantees that the point is valid. An exception is thrown otherwise.
var pointNamePath = new RealTimeVPath("analog", pointName, "name");
using (var rpccmx = new RPCCmx())
{
if (rpccmx.CanUserFnput(pointNamePath.TableNumber, pointNamePath.PointNumber, "", XOSDisplayName) == false)
{
throw new BLTException(quot;User {OriginalClientDomainName}/{OriginalClientUserName} cannot execute commands on analog {pointName} from {XOSDisplayName} station.");
}
}
}
catch (Exception ex)
{
log.Always(quot;{nameof(TestBLTProcessor)}: {ex.Message}");
throw new BLTException(ex.Message);
}
}
}