Skip to content

SkillsFundingAgency/das-funding-apprenticeship-earnings

Repository files navigation

⛔Never push sensitive information such as client id's, secrets or keys into repositories including in the README file⛔

das-funding-apprenticeships-earnings

UK Government logo

Update these badges with the correct information for this project. These give the status of the project at a glance and also sign-post developers to the appropriate resources they will need to get up and running

Build Status Quality Gate Status Jira Project Confluence Project License

das-funding-apprenticeships-earnings is an Azure Durable Function which subscribes and publishes various events. Its purpose is to store and manage earnings records raised by the creation of new apprenticeships and updated via change of circumstances events.

How It Works

There are 2 applications within this repository, the Azure Durable Function and an InnerApi. The Durable Function responds to events, and the InnerApi responds to queries (e.g GET requests). As well as data being stored in the durable function under the logical object of an Apprenticeship, there is also a database that stores Earnings records for query purposes.

🚀 Installation

Pre-Requisites

  • A clone of this repository
  • A code editor that supports .Net6
  • Azure Storage Emulator (Azureite)
  • Sql Server DB

Config

Most of the application configuration is taken from the das-employer-config repository and the default values can be used in most cases. The config json will need to be added to the local Azure Storage instance with a a PartitionKey of LOCAL and a RowKey of SFA.DAS.Funding.ApprenticeshipEarnings_1.0.

{
  "ApplicationSettings":
  {
    "NServiceBusConnectionString":"UseLearningEndpoint=true",
    "NServiceBusLicense":"<LicenseKey>",
    "DbConnectionString":"Data Source=YOUR_COMPUTER;Database=SFA.DAS.Funding.ApprenticeshipEarnings.Database;Integrated Security=true;Trusted_Connection=True;Pooling=False;Connect Timeout=30;MultipleActiveResultSets=True"
  }
}

🔗 External Dependencies

  • Azure Storage Emulator (Azureite)
  • Sql Server DB

The innerApi can be queried directly via a tool such as postman. The durable function uses NServiceBus learning transport for local development to handle the events. More information can be found at https://docs.particular.net/transports/learning/