The next part of the template builds lists of input elements using database extraction functions. First, the template extracts from the database all the a-flow-line elements that have the subject activity (or its subactivities) as their target. This list is assigned to the variable
af_list
. Note that the database extraction function that extracts this list has its parameter,act
, enclosed in braces. Braces indicate a list of items; because this particular extraction function is a query function, the parameter must consist of a list. In this case, however, the “list” is only one activity ID, represented byact
.The template builds three separate lists of elements:
Each of these variables is assigned values through a database extraction function that uses the variable
af_list
as a parameter. In other words, once you have extracted all the a-flow-line elements related to the specified activity, you extract the conditions, events, and data-items that flow through them.