Context:
The issue is the import maps the decisionDefinition id to the decisionInstance id resulting in only one instance document present.
Use the decisionInstanceId correctly and add a test that verifies multiple instances are imported correctly.
Problem:
- given:
- I have a engine running with one decision definition deployed
- for the decision definition there have been several decision instances started
- when:
- Optimize imports the engine data
- then:
- Elasticsearch contains only a single decision instance
- expected:
- Elasticsearch constains all the data from the engine including all started decision instances