Saga Configuration CLI
February 12, 2022 ยท View on GitHub
Command line interface for saga configuration.
Preparation
- Create a SagaConfigDefinitions class library containing a class that implements
ISagaConfigDefinition. - Flesh out the
CreateSagaConfigby returning a newSagaConfigurationDtowith steps that are aList<SagaStepDto>. - Add a json folder in which to place the saga definition JSON file.
Installation
- Install the sagaconfig CLI tool globally.
dotnet tool install -g EventDriven.Sagas.SagaConfig.CLI --version 1.0.0-beta1
Usage
- Navigate to the root of the SagaConfigDefinitions project.
cd <path>/SagaConfigDefinitions - Run the
sagaconfigcommand, passing required parameters.- Specify a Guid as the
-idparameter for the Saga Config Id. - Specify a relative path to the location of the SagaConfigDefinitions.dll file for the
-pparameter. - Specify the name of the json folder for the
-jparameter. - Omit the
-uriparameter to save a config JSON file without posting to the SagaConfig Service.
sagaconfig -id d89ffb1e-7481-4111-a4dd-ac5123217293 -p bin/Debug/net6.0 -j json- Include the
-uriparameter to save a config JSON file and post to the SagaConfig Service.- First run the SagaConfigService project.
sagaconfig -id d89ffb1e-7481-4111-a4dd-ac5123217293 -p bin/Debug/net6.0 -j json -uri http://localhost:5256/api/sagaconfig/ - Specify a Guid as the