xdmp.setTransactionName( name as String, [host-id as (Number|String)], [txn-id as (Number|String)] ) as null
Set the name of a local or remote transaction.
http://marklogic.com/xdmp/privileges/xdmp-set-transaction-name-my
http://marklogic.com/xdmp/privileges/xdmp-set-transaction-name-any
If the transaction already has a name, it is overwritten with the new name.
If the specified transaction does not exist, XDMP-NOTXN
is raised.
If host-id is not found or MarkLogic Server is not available
on that host, the exception XDMP-HOSTOFFLINE
is raised.
xdmp.setTransactionName("myTransaction"); => Set the name of the current transaction in the current local session to "myTransaction".
xdmp.setTransactionName("myTransaction", xdmp:host("some-host.marklogic.com"), $txn-id); => Set the name of the given transaction on the remote host some-host.marklogic.com to "myTransaction".