Spuštění runu
- Správa runů
- spuštění nového runu
Text vypadá dobře, chce to jen zaměnit CLI za Admin UI a aktualizovat text.
Starting new Run of a Scenario consists of two parts. First you need to make sure you have the Scenario loaded and ready to start. Then you need to prepare the data the Scenario requires. Finally you can start a Run and make sure there are no problems.
If you don’t have the Scenario loaded you need to do that first. This only needs to be done once.
First make sure some scenario artifact includes the scenario. If not, place a new artifact into
ENV/scenarios/. Then you need to enable the scenario, set or update key enabled_scenarios in the
section runtime in the main configuration file. The value is a list of IDs of enabled scenarios,
add the scenario to the list.
[runtime]
enabled_scenarios=new_scenario,...
Finally apply the configuration, the scenario should be loaded and should appear in the list of
Scenarios. The list is available in the Admin UI or in the developer console via API
Runtime.list_scenarios() (note this call is rather verbose).
To start a Scenario you need to have the data the Scenario requires. Scenario provides a list of
topics it expects, it can be seen in Scenario detail in the Admin UI or in the developer console via
Runtime.list_scenarios() in :topics. Note you don’t have to have the topics of the same name,
but make sure the data are compatible.
For details refer to chapters about Acceptors and Normalizer.
Run can be started via API in the developer console. First open the developer console using the
script in your deployment - utils/console.sh. Then use the API
Runtime.start_run/1 to start a new Run.
Runtime.start_run([
scenario_id: "my_scenario",
start_from: ~U[2021-06-01T12:00:00Z] |> DateTime.to_unix(:millisecond),
output_actions_from: ~U[2021-06-08T12:00:00Z] |> DateTime.to_unix(:millisecond),
notifications_from: System.os_time(:millisecond),
input_topics: [%{logical_topic: "Data_1"}, %{logical_topic: "Data_2"}]
])
If the call returns {:ok, run_id} the Run was successfully started and the ID of the Run is
run_id.
After the Run is started you should be able to verify it’s doing what you want it to do. Follow steps outlined in the Diagnostics section to make sure all is working as expected.