Homepage | About EASA | Contact
Introduction | Session 1 | Session 2 | Session 3 | Session 4 | Session 5 | Session 6 | Session 7 | Session 8
Estimated completion time → 30 minutes.
EVENT PROCESSING provides a way to capture an event and then trigger an action.
EVENT PROCESSING helps our user interface to become dynamic and interactive.
Below are some use cases for EVENT PROCESSING,
In Session 3 we added two BUTTON's to the Tree now we add a Child ACTION to each BUTTON.
The first ACTION will read the StockData database using SQL statements.
read_StockData.txt contains the SQL to read the stock data from the database when button_Search_Stock_Data is pressed.
To parameterize the SQL query to include the user specified filters created in the previous sessions, we can modify the read_StockData.txt file with the Template Editor.
The Template Editor should open like this,
Each object reference (historically 'DOR') is a reference to the current value of the named object.
When the SQL query in read_StockData.txt is evaluated each object reference is replaced with that object's current value.
The Template Editor window should now look something like the following with the three object references shown in bold blue:
Let's create another DATABASE ACTION→DATABASE→READ that is triggered when the EASAP is opened.
This ACTION will read all the unique industry sector names from the database.
This list of sector names will populate the DATA VALIDATION under inputbox_Sector.
Text: uses the DISTINCT function to pull out only the single unique value from the Sector column.
Let's populate inputbox_Sector with the Sector_Choices LIST.
We have configured the EASAP to read data from the database, and now we need to process that data by revisiting the DATA PROCESSING branch.
count_Symbol will store number of stocks returned by the SQL query after a click on button_Search_Stock_Data.
Now that we've defined count_Symbol, we can add logic to button_Create_Report to be enabled only when the count_Symbol SCALAR is greater than 0.
In order to improve the formatting of some of the stock data read from the database, add a few LIST's to the data_processing_Stock_Analysis→LIST branch.
Add a submit MENU ACTION to button_Create_Report:
At this point, the stock data is ready for display within the user interface of the EASAP.
To display the results from read_StockData we use a TABULATED DATA to create a table and populate it with the stock data.
Parameter Name | Parameter Value |
---|---|
Column Titles: | Symbol, Company Name, Industry Name, S&P Index, Exchange, Price, Sector, Revenue ($MM) |
Columns: | Symbol, Company, Industry, SPIndex, Exchange, repeated_format_Price, Sector, repeated_format_Revenue |
Width: | 1010 |
Height: | 400 |
Let's add a LABEL to display the total number of stocks found by the SQL query by displaying the value of count_Symbol.
At this point, the EASAP Tree should look similar to the following:
After clicking on the Test Web Browser button (), the EASAP should look like this:
We have completed Session 5 and may proceed to the next session or take a break and exit out of EASAP Builder.
At this point, the application should query the database and allow filtering of results. All that remains is the report generation.
Introduction | Session 1 | Session 2 | Session 3 | Session 4 | Session 5 | Session 6 | Session 7 | Session 8