Hi,
We are looking for the best way to save business data during a process and we don’t know which one to choose.
Here are some points to have in mind:
- Between steps we want to validate datas with business rules
- We still save informations in process variables but not business data
- During the process, forms data should not have any impact on production data.
- At the end of the process we persist process data (coming from the forms) in “production” state
Here are the 3 scenarios we have:
1. Persist datas in a WIP schema
Pros:
- No impact on production data
- Clear distinction between production and WIP data
Cons:
- Duplication of business rules validation
- 2 schemas to deal with
2. Persist datas in process variables
Pros:
- No impact on production data
- Clear distinction between production and WIP data
Cons:
- Duplication of business rules validation
- No relationnal objects (process variable only)
- What to do when a process changes ? Or the data structure used during this process ?
3. Persist datas in production schema with a WIP state
Pros:
- Business rules validation from the domain
- Relationnal structure between objects
Cons:
- Difficulties during modification process (impacts on production data)
- Difficulties when you need to rollback modifications or additions
- Difficulties when you need to do a request (always need to add a where clause on status)
Do you have any experience or recommandation on this subject ?