API Tutorial Lesson 07 - Getting Pending Transaction Data
This lesson's sample code shows how to use the 'TransactionNameGet' and 'TransactionParameterGet' APIs. First note that the corresponding 'Transaction…Set' APIs do not exist directly: transactions are started by any successful call of any '…Allow' API and cannot have the values used for its parameters changed once started.
As soon as the transaction has started, it is possible to retrieve its name and parameter values through calls to the 'TransactionNameGet' and 'TransactionParameterGet' APIs. These calls need a valid login operation handle (to identify who is retrieving the information) plus the operation handle of the pending transaction as parameters.
The retrieval of transactions' data can be useful for debugging purposes, both inside specific end-user software as in a tool used to display transactions' data. In some cases, the existence of these APIs avoids having to store this data in the software requesting the transactions. And in some cases, where various end-user software cooperate towards a single goal, just sharing the operation handle among them allows to start a transaction from one software and commit it from another one (as an example, think of a banking family of software, where you could start a transaction on your mobile smartphone and confirm it on your computers browser without having to reenter the data needed by the transaction).
These 'Transaction…Get' APIs can be used for transactions which are still running, as well as for those that ended recently. Currently, data is provided to callers of these APIs if the transaction identified by the operation handle ended less than sixty minutes ago.
US Patent Requested