Configuration and Execution#

Configuration#

Folders structure#

In order for RPS Files Processor to run correctly, the folder structure must be the following

root
β”œβ”€β”€ RPSFilesProcessor
β”‚   └── RPS Files Processor executable files
β”œβ”€β”€ RPSFilesProcessorConfigurations
β”‚   └── ProjectName
β”‚       β”œβ”€β”€ dataProcessors.json
β”‚       β”œβ”€β”€ instances.json
β”‚       β”œβ”€β”€ rightsContexts.json
β”‚       └── processingContexts.json
β”œβ”€β”€ RPSFilesProcessorData
β”‚   └── ProjectName
β”‚       β”œβ”€β”€ in
β”‚       β”‚    └── input files
β”‚       β”œβ”€β”€ out
β”‚       └── errors
└── RPSFilesProcessorExecution
    └── ProjectName
        └── appsettings.json

As many projects as needed can be created, each with there own configuration in its respective location. Default root location is C:\ but can be set differently. Input files are to be placed in root\RPSFilesProcessorData\ProjectName\in, folders out and errors will automatically be filled with output and error files during the execution.

appsettings.json#

The appsettings.json file is used for connection with RPS Engine and RPS Manager, beware of using the right HostName, ClientId, ClientSecret and IdentityServerHostName to ensure a successful connection between the RPS modules.

The appsettings.json also allows for configuration of the ChunkSize, Timeout and MaxDegreeOfParallelism for the execution.

Example of appsettings.json#

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "System": "Information",
      "Microsoft": "Information"
    }
  },
  "ConnectionStrings": {
    "MongoDatabaseInstance": "mongodb://127.0.0.1:27017/RPSFilesProcessor"
  },
  "RPS": {
    "Engine": {
      "HostName": "https://engine.rpsdev.net",
      "ChunkSize": 1000,
      "Timeout": "00:05:00",
      "MaxDegreeOfParallelism": 1,
      "ClientId": "b6aff204-0eb1-4055-8f81-3eaadasd744c",
      "ClientSecret": "83f75d2c213e4f6190abdsd33202439c31f7151f487cb778bdb4db303ab7",
      "IdentityServerHostName": "https://identity.rpsdev.net"
    }
  }
}

Files configuration#

Four additional files must be added to the configuration for the Files Processor to work: details on each of them can be found on instances.json, rightsContexts.json, processingContexts.json and dataProcessor.json.

Execution#

To execute RPS Files Processor open a new Command Prompt. From the folder containing the RPS Files Processor executable, execute the following command

dotnet RegData.RPS.Processors.FilesProcessor.dll execute {job_name} --appsettingsDirectory {appsettings_directory} --configurationDirectory {configuration_directory}

where {job_name} is the name defined in the dataProcessors.json file, in the example above, it is job_name_example1, {appsettings_directory} the absolute path to the appsettings.json files and {configuration_directory} the absolute path to the dataProcessors.json file. The execution can take up to a minute before showing information on screen. After the execution, you will see a result of the run, file by file, providing percentages of successes and failures.