Open Blokh opened 3 months ago
Latest commit: 1d56a23be0d57a285d32dbc41e5231266d444508
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The updates significantly enhance the risk management capabilities of the workflow service by expanding the data model with new fields, enums, and models for risk and rule processing. New services, repositories, and controllers provide comprehensive management functionality, while validation schemas ensure structured handling of operations. This structured approach promotes a robust, organized framework for managing compliance and risk assessment within the application.
File(s) | Change Summary |
---|---|
prisma/schema.prisma , prisma/migrations/.../migration.sql |
Introduced new fields, enums, and models for risk management, including RiskRulesPolicy , RiskRule , and RuleSet . Updated existing models and executed migrations. |
src/risk-rules/risk-rule-policy/... |
Added RiskRulePolicyModule , RiskRulePolicyService , and RiskRulePolicyRepository for managing risk rule policies. |
src/risk-rules/risk-rule/... |
Created RiskRuleModule , RiskRuleService , RiskRuleRepository , and RiskRuleController for managing risk rules. |
src/risk-rules/rule-set/... |
Developed RuleSetModule , RuleSetService , and RuleSetRepository for handling rule sets. |
src/rule-engine/core/rule-engine.ts |
Enhanced runRuleSet and RuleEngine to support RuleSetWithChildren for nested rule processing. |
src/rule-engine/risk-rule.service.ts , src/rule-engine/rule-engine.module.ts |
Updated findAll method for project-specific filtering and integrated RiskRulePolicyModule for expanded functionality. |
sequenceDiagram
participant Client
participant RiskRulePolicyController
participant RiskRulePolicyService
participant RiskRulePolicyRepository
participant Database
Client->>+RiskRulePolicyController: Create Policy Request
RiskRulePolicyController->>+RiskRulePolicyService: Call createRiskRulePolicy
RiskRulePolicyService->>+RiskRulePolicyRepository: Persist new policy
RiskRulePolicyRepository->>+Database: Insert policy record
Database-->>-RiskRulePolicyRepository: Policy record ID
RiskRulePolicyRepository-->>-RiskRulePolicyService: Policy record ID
RiskRulePolicyService-->>-RiskRulePolicyController: Policy record ID
RiskRulePolicyController-->>-Client: Response with Policy ID
Client->>+RiskRulePolicyController: Add Risk Rule to Policy Request
RiskRulePolicyController->>+RiskRulePolicyService: Call addRiskRuleToPolicy
RiskRulePolicyService->>+RiskRulePolicyRepository: Associate risk rule
RiskRulePolicyRepository->>+Database: Update policy with risk rule
Database-->>-RiskRulePolicyRepository: Update confirmation
RiskRulePolicyRepository-->>-RiskRulePolicyService: Association confirmation
RiskRulePolicyService-->>-RiskRulePolicyController: Association confirmation
RiskRulePolicyController-->>-Client: Response with association confirmation
In a garden of rules, new blooms arise,
With risks dancing 'neath the digital skies.
Policies sprout, and schemas align,
In this code-rich world, all things intertwine.
Rabbits hop through logic so bright,
Celebrating changes that feel just right!
π°π»β¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
BAL-2445
Summary by CodeRabbit
New Features
RiskRulePolicy
andRiskRuleSet
to manage database operations.RiskRulePolicyModule
,RiskRuleSetModule
, andRuleSetModule
for structuring risk rule services.Bug Fixes
RiskRulePlugin
to correctly assigndatabaseId
based onrulesSource
.Chores
Refactor
Documentation