BSA – Table Events

Tables are objects with their own methods and events, so the example below grab events from tables and process them. This is the same as adding a start label with the event name as the PLDFlow link will need to be connected to an Event and a Method and convert data between them. Event comes with parameters and so does Methods, so the PLDFlow will need to take the input event parameters and create the method parameters.

I could have done this in my previous example as well – taking the PLDFlow directly from the OK button, but this is your choice – sometimes it is convenient to use start labels. PLDFlow will allow you to select available events in the scope – if you drag from a Start symbol the selection is whatever is selected in the start symbol. If you drag from a component the selection is the exit events of that component. Notice that the line with Arrows are PLDFlow while the lines with “forks” are Data Relations. I will change colors to make it more obvious that they are different. Table is one of the few objects that can use both Data Relation and PLD Flow.

SQL Databases also support Triggers (same as events) and Stored Procedures etc. BSA will support these at some point allowing import and definition of those. But, this is not primarely a data modelling tool, so it’s a bit down on the list.

This creates a question – with table supporting events and methods as any other object – do I actually need the specialized Select, Fetch, Update and Delete?

This diagram have no input flow to Table – which is ok because Methods and Events are either Mandatory, Optional or Static. An Object with no Mandatory Methods do not need an input PLDFlow – that said it could benefit from a Timer connected to Select in this case.

Mandatory Methods/Events are those who MUST be used. The BSA Compiler will issue an error if these are missing. Optional means you can chose wherever to implement them or not, meaning they must have a default implementation. Static Events cannot be overrided by user – in this case you have decided that the event shall call a specific method. Only events can be Static.

As for Select, Fetch, Update and Delete – these also have a filter part, so yes I do need them.

Categories: BSA

Leave a Reply