Ticket action code snippet example for Business Logic Tiers (BLT)
- Last UpdatedApr 24, 2025
- 1 minute read
The following code snippet provides an example of how you can execute the various ticket actions for BLTs.
String batchTransferName = "ATBatchXfer01";
BLTParameterValueAccessor success;
BLTParameterValueAccessor returnMessage;
var bltClientFactory = new BLTClientFactory();
using (var client = bltClientFactory.Create("ExecuteTicketAction"))
{
client.AddParameter(batchTransferName); // batchTransferName input
client.AddParameter("VALIDATE TICKET START"); // action input
client.AddParameter(""); // arguments input
client.AddParameter(out success); // success output
client.AddParameter(out returnMessage); // returnMessage output
client.Execute();
if (Boolean.TryParse(success.Value.ToString(), out Boolean s) && s == false)
{
// next ticket's product is not the same as current ticket
Console.WriteLine("ExecuteTicketAction VALIDATE TICKET START was not successful: " +
returnMessage.Value.ToString());
}
else
{
// next ticket's product is not different from the current ticket
Console.WriteLine("ExecuteTicketAction VALIDATE TICKET START was successful");
}
}