A workflow is an event that performs a series of actions when triggered. For example, when a user clicks the ‘New’ button (the event), ‘something’ must happen (the series of actions). Events are associated with user interface control buttons as shown below.
A workflow is made up of an event (which is what triggers the workflow) and the series of actions that are performed. The combination of the event and the series of actions is what defines a workflow.
A workflow runs when the user presses one of the buttons (New, Change, Save or Erase). These can be simple flows such as initializing and blocking fields, preventing a record from being deleted, showing warning messages, among others. However, it is possible to create more complex workflows that can perform multiple actions.
Choosing which of the buttons a workflow is associated with must take into account what you intend to do.
For example, if the objective is to initialize the value of some fields when the user creates a record, this task must be associated with the (New) button.
If the objective is to prevent a record from being deleted, this task must be associated with the (Erase) button.
If the objective is to prevent saved records from being changed, this task must be associated with the (Change) button.
If the objective is to validate the value of a field before saving the data, this task must be associated with the (Save) button.
Another very important point that must be understood is that each workflow is linked to an interface tab. To better explain this point, let’s use the interface below as an example. We can see that this interface has several tabs (D0, D1, … D8). Let’s suppose we want to define a workflow to initialize some of the fields on the tab (D0) when the user clicks the button (New). This workflow will only run when the user clicks the (New) button and the (D0) tab is selected. If we want to do the same for the tab (D1), we must create a workflow for the button (New) and the tab (D1). That is, a workflow only runs on the tab to which it is linked.
Workflows are created on the tab (Button Events Config), however, as explained above, you need to link the workflow to a certain tab. Do this by first selecting a record in the (Screen Config) tab and then going to the (Button Events Config) tab. The example below shows that the first step before creating a workflow is to define which tab the flow will be linked to. In this example the tab (D0) has been selected. Therefore, the created workflows will be associated with the tab (D0). You can create workflows for any tab, however you must select the tab before creating the workflow, thereby linking the workflow to the desired tab.
Post your comment on this topic.