TRANSACTION PROCESSOR

TRANSACTION – XML definitions for transaction processor – ubtransaction and ubtp

NAME

transaction – transaction processor records in XML format

DESCRIPTION

ubtransaction reads XML format records and processes them to do a range of updates and processes on the database.

The different commands are:

  • ADD
  • DATA
  • DELETE
  • EXECUTE
  • PASSWORD
  • UPDATE
  • TRANSACTION

ubtransaction uses two security models. At this time these are not high security but adequate for most installations.

Method 1. Local sessions will be processed if the environment variable “REMOTE_USER” is set. This is done automatically for web based access from ubprompt for data table updates etc.

Method 2. Remote sessions must include the element “password” (see below). If the user name password pair (from the Linux passwd database) do not match the transaction will not be processed.

All transactions are logged in /var/log/ubtransaction/ubtp.log and the details in matching log files – /var/log/ubtransaction/ubtp.<transaction>.

If sendmail is running on the server, /usr/bin/ubtransaction.smrsh is linked to /etc/smrsh/ubtransaction allowing remote transactions to be delivered to ubtransaction@<server>. An entry is also put into /etc/aliases. To disable this feature, remove both the alias entry and the link in /etc/smrsh. For postfix, only the /etc/aliases entry is required.

ADD

Add records to a table. Currently only the “attribute,value” format is supported. This can be specified in two ways: using the attribute element or using an element with the name of the attribute. NB The latter only works if there are no special characters in the attribute name (allowed by Unibase but not XML).

<add table=”…”>

<record>

<attribute name=”…”>attribute value</attribute>

<attribute name>attribute value</attribute name>

</record>


</add>

DATA

Return records from the database using a specfied format.

<data table=”…”>

{<key>table key</key>}
{<match>index match</match>}
<format>layout format</format></data>

DELETE

Delete records from a table.

NOTE: The matching index value is optional and if omitted, the entire table contents will be deleted.

<delete table=”…”>

{<key>table key</key>}
{<match>index match</match>}
</delete>

EXECUTE

Execute a system command.

NOTE: ubreport is a command interpreter, as are many other UNIBASE commands. However only ubreport in non-interactive mode is sensible. Other interpreters such as perl and tcl are also suitable. The default is sh (bash).

<execute>

<command interpreter=”…”>

command text
</command>

{<argument>argument value</argument>}

{<input>input stream</input>}
</execute>

TRANSACTION

Wrapper for a transaction set.

This is the wrapper for this transaction set.

<transaction {sessionid=”…”} {application=”…” {directory=”…”}}>

<sequence>system allocated sequence number</sequence>
transactions
</transaction>

sessionid is a unibase session and defines the application, operational directory, and user.

UPDATE

Update attribute values in a record.

The key and match value for the record to be updated can be specified as attributes of the update element or as separate elements within the update.

Updates can be generic – value; or domain specific – date, number, text.

<update table=”…” {key=”…”} {match=”…”}>

{<key>table key</key>}
{<match>index value</match>}
{<date attr=”…”>…</date>}
{<number attr=”…”>…</number>}
{<text attr=”…”>…</text>}
{<value>update command</value>}

</update>

EXAMPLES

SEE ALSO

Leave a Reply