In order to know what to do in the if flow, we need to fetch the actions from the external database table we created earlier. To do this we need to add one external interface.
First return back to the composite.xml.
We need to add one database adapter that will implement the SELECT statement towards the table we created (SIMPLE_ACTION). We will search for actions based on location ( suggestion: you may later make this more generic to add features such as having special locations like “*” to contain default actions to execute always).
This should be familiar by now. Go back to composite.xml and drag-and-drop the database adapter to the most rightmost lane “External References”
Create a new connection by pressing the green +-button.
Next we’ll create the query. By default the first column of the table is the query key. We need to change this to be location_id. Go to First Argument part and select edit. This will allow you to change the id column to location_id as the query key.
Next change second argument to the parameter we just added. Click on parameter radio button on the second parameter part and location will be selected in the combo box (there are no other choices available as we do not have any other parameters).
Finally draw the line from GeoFenceEventProcessor to the newly added database adapter (ActionSetSvc).