cancel
Showing results for 
Search instead for 
Did you mean: 

Access Transaction Name dynamically

Former Member
0 Kudos

Hi all,

does anybody know a way to access the BLS transaction name dynamically in the link editor? When I do Error Logging I want to pass the name of the BLS transaction.

thanks,

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

No built-in technique that I'm aware of, but a custom action could use the getName() method on the Transaction object to obtain it.



String sName = "";

public String getTransactionName() {
    return sName;
}

void Invoke(Transaction transaction, ILog log) {
    sName = transaction.getName();
}

agentry_src
Active Contributor
0 Kudos

Matthias,

The simplest method is to create a local property (Local.TransactionName) and store the name there. I add this property to every transaction I build for logging and error handling purposes. It can also be helpful in troubleshooting linked transactions. Not real sophisticated, but easy to implement and simple to maintain.

Regards,

Mike

Former Member
0 Kudos

Hi Mike,

I also thought about this. I think this will be the preferrable solution.

Regards,

Matthias

0 Kudos

For those of you watching/searching...

In MII 12.1and newer there are Shared Memory properties at the project level which can be modified via the MII Menu -> Data Services -> Shared Memory page once a project is imported/deployed. These should be used to cover this use-case.

Sam

0 Kudos

Sorry all, I was mistaken about the purpose of this post...

Still referring to MII 12.1 and newer:

You can use the transactionid link editor expression function to get the GUID of the currently running transaction. This GUID can be cross-referenced with the Transaction Manager page to display specific execution detail and the transaction path/name.

Regards,

Sam

Answers (0)