forked from jsoto0025/VariaMosPLE
-
Notifications
You must be signed in to change notification settings - Fork 12
Create Restrictions
Jairo Alberto Soto Velasquez edited this page Apr 29, 2022
·
1 revision
The restrictions are grouped in a microservice called variamos_ms_restrictions.
To create new restrictions or modify existing ones
- Download the microservice variamos_ms_restrictions from this repository.
- Standardize in JSON format the constraint definition and configuration.
- Create an endpoint with the name of the restriction in the following folder
variamos_ms_restrictions/src/EntryPoints/restrictionEntryPoints.ts - Create a method to process the restriction in the following folder
variamos_ms_restrictions/src/Domain/Restriction/restrictionUseCases.ts - Code the logic required to process the constraint in the method created in step 4.
- Redeploy the microservice to the cloud.
Finally, tests must be performed to ensure that the microservice is working correctly and that the added code works with its respective configuration.
Note: You can see an example of how to do this by reviewing the code created for the unique name restriction.