Understanding the Configuration
The project contains three processes (Activator, Books, and Events) and two subprocesses (BooksDB and EventsDB).
- The Activator Process (Activator.bwp)
The BW Activator process is used to perform pre-processing and post- processing tasks when the application is started and stopped respectively.
This contains a process service with two operations: OnStartup and OnShutDown.
The OnStartup process creates the Books and Events tables and inserts data into Books.
- The Books Process (Books.bwp)
In this process, the Book REST service performs the post, get, put, delete operations. It posts one or more books to the bookstore and retrieves all the books from the bookstore. For the post operation, a sub process is called to add books to the database. The addBooks operation is implemented in the BooksDB subprocess. The Book REST service performs three operations: getting a book from the bookstore by ISBN, updating a book in the bookstore using ISBN, and deleting a specific book from the bookstore using ISBN. ISBN is passed as a parameter to these operations.
- The BooksDB subprocess (BooksDB.bwp)
The subprocess handles deletes, updates, retrievals of books from the database. The BooksPersist service implements following operations: adding books to database, getting all books from database, getting a book by ISBN, updating a book by ISBN, deleting a book by ISBN. Using BooksPersist/addBooks, books are added to the database.
- The Events Process (Events.bwp)
This process is similar to the Books process and is used to add, delete, update, and retrieve events.
- The EventsDB subprocess (EventsDB.bwp)
This process is similar to the BooksDB process and is used to add, delete, update, and retrieve events from the database.