Overview
The Workflow Doctor accounts payable API is a .NET Core REST API that acts as a data store and middle-ware between ABBYY Flexicapture for Invoices and external client systems.
It is fully configured in Azure Dev Ops to support CI/CD which makes the process of on boarding a new client simple. Once a client has been linked up to the deployment group new releases are automatically published,
Onboarding a new client
- Login to Azure Dev Ops
- Navigate to the AccountsPayable repository
- Go to the Pipelines > Deployment groups section

- Click the AP API Installs group
- Click Register in the top right corner
- Check the box that says use a personal access token and copy the script to the clipboard
- Login to the client server on which you need to deploy the app
- Open Powershell as administrator and run the script which you copied to the clipboard. N for tags and install the service as the standard user
- Create the following foldersC:\wfd\web-api
- C:\wfd\web-api\live
- C:\wfd\web-api\pre-release
- C:\wfd\web-api#DeploymentBackups
- Ensure the NET Core hosting bundle is installed [
https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-2.2.2-windows-hosting-bundle-installer ](https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-2.2.2-windows-hosting-bundle-installer%C2%A0) - Open IIS
- Create a new site running on port 8080 called wfdPreRelease
- Go back to dev ops and navigate to releases. Select the Client Live Release release pipeline and press create release
- Select the latest build numbers from the drop down lists and press Create Release
- Once the release has completed go back to the client-server and rename appsettings.development.json to be appsettings.json. Edit as necessary
- Navigate to [
https://localhost:8080/wfdapi/swagger](https://localhost:8080/wfdapi/swagger) and ensure the swagger docs are shown
Debugging a deployment
If the API is not working on deployment follow these steps:
- Create a folder called logs within the C:\wfd\web-api\pre-release folder
- Update the web.config file so that the setting stdoutLogEnabled is set to true
- Open the logs folder, date-stamped text files will be created containing information regarding startup logs
Common Problems
Sometimes the Swagger XML files are not packaged with the deployment. If the files in the 'logs' folder are showing successful startup and the API is still not working ensure that the two below files are in the app folder
- WebApiDevelopment.xml
- WebApi.ViewModels.xml
ANCM Out of Process Failure
This is most commonly caused by the application pool user not having permissions. Try setting the app pool to run as a local admin.
Database
Database updates are handled within the application code using entity framework migrations.