New maker-checker flow change
Adding a new change to the possible maker-checker flows is accomplished through updategin code of backoffice-manager. When adding a new change for an entity that already has some changes we need to update several files mentioned in the list below. Examples of such changes can be seen in these PRs:
Client
Add a generated API call to a manager API that executes the change.
Controller
Update EntityChangeCreateDto
and ChangeDto
objects to allow FE to send appropriate request data.
Messaging
Update ChangeSnapshotProducer
to contain newly added part. To do so BackofficeChangeSnapshot
schema needs to be updated first.
Model
Update Change
to contain the new change data received in EntityChangeCreateDto.toModel()
method.
Service
Update EntityChangeServiceImpl
implementation to verify bank user rights (Access-control) and cases of mutually blocking changes.
Workflow
Activity
Update AuditLogActivityImpl
implementation to log new change data. Add a new activity method in EntityChangeActivity
and its implementation in EntityChangeActivityImpl
to call the method added in the client section.
Update EntityChangeWorkflowImpl
implementation to call the newly added activity.
Tests
Mock
Tests calling the generated API client require the creation of mocks in EntityManagerMock
file.
Service
When adding a new change we need to test its validation in EntityChangeServiceTest
.
Workflow
When testing new change logic we are testing calling correct activity in EntityChangeWorkflowTest
. Activity test in EntityWorkflowActivityTest
then checks the correct calling of generated API endpoint, activity tests require the use of created mocks.