Publishing Engine Programmer's Guide > Arbortext Publishing Engine and its Components > Technical Overview of Arbortext Publishing Engine > Arbortext Publishing Engine as a Transaction Processor
  
Arbortext Publishing Engine as a Transaction Processor
Arbortext Publishing Engine groups a request it receives and the response it returns into a transaction. A transaction consists of a request, the eventual response to the request, information about the request (time submitted, time completed, client identity, and so on). A transaction can also include trace information (a configurable option) generated as the response was generated, such as an application log or intermediate files.
The Arbortext PE Request Manager creates a new transaction each time it receives an HTTP request. It assigns a unique integer called the transaction ID, provides a transaction name if one is supplied, and a temporary directory called the transaction directory, to the transaction. Then, it stores the request in the transaction directory. As Arbortext Publishing Engine processes the transaction, it adds information to the transaction directory, including, eventually, the transaction response. After Arbortext Publishing Engine has completed the transaction and returned the response to the client, it deletes the transaction directory.
There are two kinds of transactions:
immediate transaction
The client waits for its response until the transaction completes and the response is returned.
queued transaction
Arbortext PE Request Manager returns the transaction ID to the client and saves the transaction for processing at a later time. The client can submit requests, using the transaction ID, to determine whether the transaction has completed and to retrieve the transaction result.
As a transaction is received, executed, and completed, it passes through several transaction states that describe its condition.
initializing
The Arbortext PE server is receiving the request.
waiting
The transaction is waiting to be allocated to an Arbortext PE sub-process (for immediate requests).
queued
The transaction was placed in a queue and is waiting to be executed by the Queued Transaction Scheduler.
processing
The transaction is being executed by an Arbortext PE sub-process.
complete
The transaction is finished. A completed transaction can be completed successfully or completed with errors. Note that if the results is an error report rather than the expected document, the transaction is still considered complete.
A transaction can also expire while waiting for an Arbortext PE sub-process allocation (if it’s an immediate transaction).
cancelled
The transaction has been cancelled.
The transaction lifecycles are as follows:
An immediate request transaction follows the lifecycle:
Initializing ⇒ Waiting ⇒ Processing ⇒ Complete
A queued request transaction follows the lifecycle:
Initializing ⇒ Queued ⇒ Processing ⇒ Complete or Cancelled