1 Context
2 Result
3 Step by step guide
3.1 Create the screen
- 👋 Create a new screen using the ”TrainingDay5_Tempalte” and replace the following components and link them accordingly
- Screenname: “LowCodeRulesScreen_<yourName>”
- “EmployeeGrid ->Panel A
- “EmployeeDSO”
- “TrainingDay4_ExampleVacationForm” -> Panel B
- “VacationDSO”
- 👋 Join the VacationDSO and the EmployeeDSO with “EmpNum,EmpNum”
3.2 Create the vocabulary and the rulesheet
- 👋 Navigate to “Logicalize” -> “Rules” and select the tab “Vocabularies”
- 👋 Generate a new vocabulary by clicking the two small gear wheel icon in the panel header menu (generate dialog)
- 👋 In the search field “Screen” search for your screen and generate the Vocabulary with the button “Confirm”
- 💡Depending on your point of view, a Vocabulary represents different things and serves different purposes. For the rule modeler, the Vocabulary provides the basic elements of the rule language – the building blocks with which business rules are implemented in Corticon.
- 💡For a systems analyst or programmer, a vocabulary is an abstracted version of a data model that contains the objects used in those business rules implemented in Corticon.
- 💡In Build.One, the vocabulary provides an abstraction of all objects and ids in the screen. This allows you to access different fields and attributes.
- 👋 Navigate back to the “Rulesheets” tab and click on the plus icon in the panel header menu (Launch Grid Create Dialog)
- 👋 Select your generated Vocabulary
- 👋 Select “Confirm”
- 👋 Open the rule designer by clicking the “Key” of your rulesheet
3.3 Create the rules with the rules designer
1. Use this button to save your work in the Rules Designer. 2. Use this button to undo your active changes. 3. This button allows you to delete your rules and conditions. 4. Validates the logic of your rules. 5. This button allows you to check the completeness of your rules. 6. This button allows you to check if there are logical conflicts in the rule. 7. Use this button to perform checks 4, 5 and 6 one after the other. 8. Use this button to create and deploy your rules for the screen. The corresponding TS files are created and the bundles are set up. 9. This opens an overview of all the objects in this screen and you can drag and drop them into your rule structure. 10. You can choose to add a condition, an action or a message to your rule tree. 11. Use this button to add your element from step 10 to the rule tree. 12. Top node for the rules 13. Check conditions for the rules. For example, the value of a field should match a certain rule. 14. Based on this condition, this action should then be true or false. 15. Based on this condition, an appropriate message is output. 16. Rule 1 to be checked and executed 17. Rule 1 to be checked and executed
3.3.1 Create the first check condition
- 👋 Click on the button “Vocabulary”
- 💡 When you first open the Vocabulary dialogue box, it covers the entire screen. Simply select the button in the top right-hand corner to minimise it.
- 💡 A dialog with the sturcture of the screen opens up
- 👋 Open up the tree grid with the following path
- Screenname → entities → Screenname → Forms → VacationForm_Training_Part4
- 👋 Drag and drop the TrainingDay4_ExampleVacationForm.StartDate_value on the conditions (Point 13 above picture)
- 💡 Open up the Conditions in the Tree grid → your condition was added here
- 💡 Rule 0 → Is always empty because it is a default condition
- 👋 Close the vocabulary dialog
- 👋 Add to Rule 1 the value “ click on it and select “Save”
- 💡 With the “ we check if the field is empty
- Add to Rule 2 the value >1998-01-01 click on it and select “Save”
- 💡 With the value we check if there is a valid date after the current year (We are working on the Progress SportsDB, the test data is a bit old 😀)
3.3.2 Create the actions for the check condition
We defined the following actions
If the date is empty, as in rule 1 Then the start date, end date and button should not be displayed.
If the date is not blank as in rule 2 Then the start date, end date and button should be displayed.
- 👋 Click on the button “Vocabulary”
- 👋 Open up the tree grid with the following path
- Screenname → entities → Screenname → Forms → VacationForm_Training_Part4
- 👋 Drag and drop the following values to the Action in the tree grid
- TrainingDay4_ExampleVacationForm.SimpleSwatButton2__isVisible
- TrainingDay4_ExampleVacationForm.EndDate__isVisible
- TrainingDay4_ExampleVacationForm.StartDate__isVisible
- Add for all of the Actions in the Rule 1 field the Value F
- Add for all of the Actions in the Rule 2 field the Value T
If the condition from rule 2 is true, show all values. → Visible = True
- 👋 Click on the button “CheckAll” to validate, check the completion and check for conflicts
3.4 Deploy and test the rules
- 👋 Click on the button “Browser” in the Deploy section
- 👋 Refresh your chrome/firefox browser without cache
- 👋 Launch your screen to see the result