A - Basics 4 - Group features and restricting value
Table of contents
Purpose
Purpose of this section is to introduce purpose and benefit of group rulesets.
Description
Following concepts are introducted first
Following steps are done in this section
Prior information about groups
Group rulesets
Purpose of a group ruleset is to enable a ruleset to be active in multiple projects. This potentially saves a good amount of time if there are multiple payment types where validation rules are needed and if the validation rules are shared between them. Modifying or creating a rule within group ruleset automatically applies the change to all validation projects where the ruleset is active
Group ruleset function is same as normal ruleset from validation point of view - person validating cannot know if a ruleset is a group ruleset or not.
Ruleset being a group ruleset does not automatically mean that it is active in multiple projects, it instead enables this possibility.
Linking and copying group rulesets
To activate a group ruleset to a validation project two different ways of doing it are possible: linking it or copying it.
When ruleset is linked, ruleset within the project remains to be a group ruleset. All changes done to group ruleset will automatically be activated in this ruleset - they are linked after all.
When ruleset is copied to a project, duplicate of group ruleset is made but it is not linked. This means that the ruleset which is copied will contain all the rules there are within the group ruleset but they exist as their own individual entities, no longer linked to the group after the copy is made. Therefore possible further changes to the group ruleset will not be active in the ruleset which was copied.
Global rulesets
XMLdation experts maintain certain common rules as global rulesets. As we want to make sure these rules are not accidentally changed by our clients, rules within them may not be changed. Otherwise they function on the same way as group rulesets.
Example of global rulesets are ISO 20022 business rules and CGI-MP working group related business rules
Instructions
Familiar modal opens. This time we can name the ruleset differently. Name of the ruleset should be unique if there are more than one person taking part of the training to keep these rulesets organised. Group rulesets will be visible to everyone having access to the group.
After this is done, the ruleset will change place as Studio will always show group rulesets before normal ones by default. We also see a new icon next to the ruleset
Indicating the ruleset indeed is a group ruleset. This ruleset is now also shown in the right-hand-side navigation
This time we can try out restricting element values. We'll do this via "value restrictions" option in the rule creation dropdown
After create rule is pressed, we can try out the validation to verify new rule works. It is worth noting here that both Studio and the validation service can be used, but if normal validation is used, project has to be complied and deployed before the change becomes active
, thus opening rule modal:
And then selecting the lock-icon
The reason for this is to prevent accidental modifications to group rulesets. To make sure user does indeed want to modify rules which potentially are active in multiple differnet validation pipes.
For this rule, we can now make changes. We could, for example, turn the rule into info and change the wording of message.
Thus removing it from the UI. However, we only unlinked the project and did not delete it. This means we can reactivate it later on in this project or in any other project.
Reactivating the ruleset is done by finding it from the right-hand-side navigation and dragging it to the main work-area. Two different options are given here:
- Drag here to copy
- Drag here to link
Differences of these are explained at the start of this page. In this case, we want to link this ruleset back to the project, so we'll drag it to the lower section of the area.
After doing this, we have the ruleset back in the project.
This concludes the main features when doing validation rules. In the next section we'll investigate other features of a project.