The Sale example implements a Sale business transaction
that is made up of four basic actions:
- Order entry
- Delivery
- Invoice
- Payment.
A Sale business transaction is started by a terminal-user selecting the Sale option from a menu of business transactions. This causes an instance
of the transaction to be created and its root activity to be started. The
root activity creates and runs, in sequence, four child activities that implement
the four actions of the business transaction:
- The Order activity obtains order data from the
user, and validates it.
- Successful completion of the Order activity causes the Delivery activity to be started.
- Completion of the Delivery activity causes the Invoice
activity to be started.
- When payment is received and recorded by the Payment
activity, the Sale business transaction is complete.
Figure 11 shows, in simplified form, data flows in the Sale
example application.
- Customer data (for example, an account number) collected after the terminal
user selects the Sale menu option is used as input to the Order
activity.
- Customer data collected by the Order activity is used as input to the
Delivery activity.
- The output data produced by the Delivery activity is used as input to
the Invoice activity.
- The output produced by the Invoice activity is used as input to the Payment
activity.
Note:
The first activity (Order) requires input from the terminal
user. For the purposes of this section, subsequent activities (Delivery, Invoice
and Payment) are assumed not to require any user involvement and are triggered
serially in the background after the Order activity has completed successfully.
In later sections, this assumption is changed to illustrate additional function.
Table 5 shows the CICS® transactions and programs that make
up the basic Sale application described in this section.
Table 5. Transactions and programs in the basic Sale application
Transid |
Program |
Comments |
MENU |
MNU001 |
Menu of business transactions |
-- |
SAL001 |
Creates and starts the Sale business transaction |
SALE |
SAL002 |
BTS root activity, manages the child activities
that comprise the Sale business transaction |
SORD |
ORD001 |
Order activity |
SDEL |
DEL001 |
Delivery activity |
SINV |
INV001 |
Invoice activity |
SPAY |
PAY001 |
Payment activity |
Notes:
- In later sections, the Sale example application is extended to illustrate
more advanced features of BTS, such as:
- Parallel activities
- User-related activities
- Compensation actions.
- For the sake of clarity, the basic example does not include any error
handling code. As explained in Checking the response from a child activity, in a real application,
after a parent has requested a child activity to be run it must issue a CHECK
ACTIVITY command to:
- Check the response from the child
- Check the completion status of the child
- Delete the child’s completion event, if the child has completed.
The uses of the CHECK ACTIVITY command are fully described later,
in Dealing with BTS errors and response codes.
[[ Contents Previous Page | Next Page Index ]]