Simulation Region Connector
The purpose of this region connector is to allow developers to debug their applications that integrate with EDDIE. It offers a few functionalities to send messages via EDDIE to the active outbound connectors.
DANGER
The simulation region connector should be turned off on production EDDIE instances

Configuration
To enable this region connector, the following configuration properties are required.
| Configuration Values | Description |
|---|---|
region-connector.sim.enabled | true or false, false per default. Enables the region connector if set to true |
region-connector.sim.scenarios | Sets the directory from which predefined scenarios should be loaded, prefix with classpath: to load the from the classpath. To load scenarios from the disk use a unix path, like /path/to/scenarios/. This should contain json files with the scenario. Can also be pointed to a single scenario file. Default is classpath:/scenarios/*.json. Wildcards are only supported when loading from classpath. |
region-connector.sim.enabled=true
region-connector.sim.scenarios=/path/to/scenarios/region-connector:
sim:
enabled: true
scenarios: /path/to/scenarios/REGION_CONNECTOR_SIM_ENABLED=true
REGION_CONNECTOR_SIM_SCENARIOS=/path/to/scenarios/Launch Simulation
The simulation region connector offers a UI to send custom permission market documents and validated historical data to the outbound connectors. This allows developers to send singular messages via EDDIE to their application and see the resulting changes. To do this, click "Launch Simulation" in the simulation region connector element. You will be forwarded to another page where you can send custom status updates for a permission request, as well as custom validated historical data messages. The validated historical data will be published on the CIM topic and the custom status updates on both CIM and agnostic topics.

Scenarios
The simulation region connector allows developers to run predefined scenarios, to see what kind of messages are produced at which point in the permission process model. The predefined scenarios are:
- External Termination Scenario: Runs through the whole permission process model including the external termination.
- Validated Historical Data Scenario: Runs through the permission process model, including fulfillment status. It also emits validated historical data after the accepted status.
- Failed To Externally Terminate Scenario: Runs through the whole permission process model including the external termination, where it at first fails to externally terminate the permission request.
- Unable To Send Scenario: Runs through the whole permission process model, including the failed to send status.
Creating your own Scenarios
It is possible to create your own scenarios and sending them to EDDIE to be executed. For the scenario syntax, see the example scenarios. The following shows how to send the scenarios to EDDIE.
### GET swagger docs
GET http://localhost:8080/region-connectors/sim/v3/api-docs
### GET predefined scenarios
GET http://localhost:8080/region-connectors/sim/scenarios
### POST run predefined scenario
@name = Validated Historical Data Scenario
@connectionId = id
@permissionId = 341ddb3c-1847-4b2d-be19-e6c379cfbd53
@dataNeedId = 9bd0668f-cc19-40a8-99db-dc2cb2802b17
POST http://localhost:8080/region-connectors/sim/scenarios/{{name}}/run
Content-Type: application/json
{
"connectionId": "{{connectionId}}",
"permissionId": "{{permissionId}}",
"dataNeedId": "{{dataNeedId}}"
}
### POST run scenario
POST http://localhost:8080/region-connectors/sim/scenarios/run
Content-Type: application/json
{
"metadata": {
"connectionId": "{{connectionId}}",
"permissionId": "{{permissionId}}",
"dataNeedId": "{{dataNeedId}}"
},
"scenario": {
"type": "Scenario",
"name": "Validated Historical Data Scenario",
"steps": [
{
"type": "StatusChangeStep",
"status": "CREATED",
"delayInSeconds": 0
},
{
"type": "StatusChangeStep",
"status": "VALIDATED",
"delayInSeconds": 0
},
{
"type": "StatusChangeStep",
"status": "SENT_TO_PERMISSION_ADMINISTRATOR",
"delayInSeconds": 0
},
{
"type": "StatusChangeStep",
"status": "ACCEPTED",
"delayInSeconds": 0
},
{
"type": "StatusChangeStep",
"status": "FULFILLED",
"delayInSeconds": 0
}
]
}
}