This object allows including blocks of objects that depend on a condition (True or False) for their execution.
When clicking the (Decision) button, the following screen is displayed.
The configuration fields on this screen are described below:
- Parameters (A) and (B):
It is a drop-down list field that loads all user-created interface fields. It also has a section called (Constants and Functions) with some specific functions and a section called (User Logged Id) with information about the logged in user.
- Operators: Type of comparison between fields as listed below:
Operator | Description |
---|---|
> | Greater than |
>= | Greater than or equal to |
= | Equal to |
<= | Less than or equal to |
< | Less than |
<> | Different |
- Constant: When one of the parameters (A or B) is a constant, it is in this field that the value of the constant must be informed. Constants can be numeric, alphanumeric, and date type.
Continuing with the examples from the previous topics (Abort and Message), we are going to increase the logic by adding a condition, so that only the admin user can delete the records from the interface, the other users will not have permission to delete the records.
When routing an object (Decision), the screen (DES006-ROUTING) is shown. This screen has two buttons used to configure which terminal (TRUE or FALSE) the connection should be made to. To make the connection in the terminal (False), click on the button (False condition). To make the connection in the terminal (True), click on the button (True condition).
Explaining the proposed example workflow:
This workflow is associated with the (Erase) button. When the end user clicks the (Erase) button on the interface, the workflow in the figure below will be executed.
The workflow always starts with the object (Start), so the first object to be executed in this case will be the object (Decision). This object will test if the user (Administrator) is different (<>) from the user logged into the system. If this test returns true, the objects (Message and Abort) will be executed. In case the test returns false, no other object will be executed, thus giving a normal sequence to the button event (Erase), which in turn will allow the record to be deleted.
Testing the proposed example workflow.
Post your comment on this topic.