Extension point for defining kit transaction types.(c) SAP AG 2003-2006. All rights reserved.
Defines a new kit transaction type.The new transaction definition.The newly defined transaction type.<h2>Xml definition of a transaction in a configuration file</h2>
<pre>
<CONFIGURE type="TRANSACTIONS">
? <HEADER>
? <PRAGMA># Pragmas section</PRAGMA>
? <SCRIPT># Code section. Place here functions\variables
which you want to address from within the transaction tags
</SCRIPT>
</HEADER>
<TRANSACTIONS>
+ <TRANSACTION id="com.sap.mypackage:transactionId">
# For complete description of transaction
definition see <q ref="core.env:KitTransactions!TRANSACTION_TYPE">TRANSACTION_TYPE</q>
? <PROPERTIES>
* <propertyName type="[function | ]"/>
# Represents a property of the transaction
You can assign the 'type' attribute for
evaluating the value of the property
as a function
</PROPERTIES>
</TRANSACTION>
</TRANSACTIONS>
</CONFIGURE>
</pre>
<h2>Example</h2>
<pre>
<CONFIGURE type="TRANSACTIONS">
<TRANSACTIONS>
<TRANSACTION id="com.sap.mypackage:myTransaction">
<PROPERTIES>
<trans type="function"><![CDATA[
function() {WRITE('trans do');}]]></trans>
<undo type="function"><![CDATA[
function() {WRITE('trans undo');}]]></undo>
<redo type="function"><![CDATA[
function() {WRITE('trans redo');}]]></redo>
</PROPERTIES>
</TRANSACTION>
</TRANSACTIONS>
</CONFIGURE>
</pre>
Gets a specified kit transaction type.Transaction type Id.The requested transaction type.
Gets the complete kit transaction types table.Returns the table of all kit transaction types, indexed by Id.Transaction id's are stored in uppercase. Use <q ref="core.lib:Basic!UPPER">UPPER</q> macro to convert the transaction id to uppercase
before using it as the index in this table.
Removes a specified kit transaction type.The Id of the transaction type to remove.
Represents a transaction object.The TRANSACTION_OBJ object is made of:
<table class="BOTH"><tr><td class="H V">Name </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>type </td><td>String </td><td>Transaction type Id </td></tr><tr><td class=V>phase </td><td>Number </td><td>Transaction phase (TRANS_DO </td><td>TRANS_UNDO </td><td>TRANS_REDO </td><td>TRANS_ABORT) </td></tr><tr><td class=V>... </td><td>Variant </td><td>Any number of additional data members specific to the transaction type </td></tr></table>
Represents a kit transaction type.The TRANSACTION_TYPE structure is made of:
<table class="BOTH"><tr><td class="H V">Name </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>id </td><td>String </td><td>Transaction type Id - must be prefixed with namespace e.g. com.sap.mypackage:id </td></tr><tr><td class=V>trans </td><td>Function </td><td>Transaction method </td></tr><tr><td class=V>undo </td><td>Function </td><td>Transaction undo method </td></tr><tr><td class=V>redo </td><td>Function </td><td>Transaction redo method </td></tr></table>
The <code>trans</code> method should carry out the actual transaction. The <code>trans</code> method's arguments can be used to pass
any information that needs to be recorded for doing, undoing, or redoing the transaction.
The <code>undo</code> method should reverse the effects of the transaction, based on the information stored by the
<code>trans</code> method. Conversely, the <code>redo</code> method should reapply the effects of the transaction. Care should be taken
in the transaction methods to raise notification events in proper order and to avoid error propagation.