Browse Source

Merge branch 'abpframework:dev' into patch-2

pull/25750/head
chandralk 3 months ago
committed by GitHub
parent
commit
4a718cfb96
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 20
      .github/workflows/auto-pr.yml
  2. 4
      Directory.Packages.props
  3. 4
      common.props
  4. 55
      docs/en/Blog-Posts/2026-07-06-ABP-Summer-Campaign/post.md
  5. 180
      docs/en/Blog-Posts/2026-07-07 v10_6_Preview/POST.md
  6. BIN
      docs/en/Blog-Posts/2026-07-07 v10_6_Preview/cover-image.png
  7. BIN
      docs/en/Blog-Posts/2026-07-07 v10_6_Preview/studio-switch-to-preview.png
  8. BIN
      docs/en/Blog-Posts/2026-07-07 v10_6_Preview/summer-sale.png
  9. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/gifs/designer-hybrid-flow.gif
  10. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/gifs/runtime-workflow.gif
  11. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/code-backlog-summary.png
  12. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/custom-endpoint-summary.png
  13. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-code-layer.png
  14. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-endpoint.png
  15. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-entity.png
  16. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-form.png
  17. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-page.png
  18. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-enum-status-modal.png
  19. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-enum-status-saved.png
  20. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-form-create-modal.png
  21. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-page-create-before-save.png
  22. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-review-template-properties.png
  23. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-runtime-entity.png
  24. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-vendor-application-properties.png
  25. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-vendor-escalation-save-modal.png
  26. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-form-documents.png
  27. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-grid-filtered.png
  28. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-review-rejected.png
  29. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-vendor-escalations.png
  30. BIN
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/cover.png
  31. 394
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/post.md
  32. 1
      docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/summary.md
  33. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-calendar-kanban-flow.gif
  34. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-custom-endpoint-flow.gif
  35. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-grid-form-flow.gif
  36. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-hero-loop.gif
  37. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-page-builder.gif
  38. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/abp-studio-lowcode-system.png
  39. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/admin-console-lowcode.png
  40. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/overview-dashboard.png
  41. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/sponsor-activation-form.png
  42. BIN
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/cover.png
  43. 225
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/post.md
  44. 1
      docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/summary.md
  45. 2
      docs/en/framework/api-development/auto-controllers.md
  46. 4
      docs/en/framework/architecture/domain-driven-design/unit-of-work.md
  47. 3
      docs/en/framework/infrastructure/artificial-intelligence/index.md
  48. 2
      docs/en/framework/infrastructure/audit-logging.md
  49. 69
      docs/en/framework/infrastructure/background-jobs/index.md
  50. 6
      docs/en/framework/ui/angular/quick-start.md
  51. 116
      docs/en/framework/ui/angular/release-notes/angular-22-typescript-6.md
  52. 2
      docs/en/framework/ui/react-native/index.md
  53. 2
      docs/en/modules/background-jobs.md
  54. 7
      docs/en/package-version-changes.md
  55. 193
      docs/en/release-info/migration-guides/abp-10-6-angular-22.md
  56. 237
      docs/en/release-info/migration-guides/abp-10-6.md
  57. 1
      docs/en/release-info/migration-guides/index.md
  58. 21
      docs/en/release-info/release-notes.md
  59. 70
      docs/en/release-info/road-map.md
  60. 74
      docs/en/samples/index.md
  61. 2
      docs/en/studio/overview.md
  62. 4
      docs/en/tutorials/mobile/index.md
  63. 2
      docs/en/tutorials/mobile/react-native/index.md
  64. 2
      framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Security/AbpComponentsClaimsCache.cs
  65. 5
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs
  66. 5
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs
  67. 6
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs
  68. 8
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs
  69. 1
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AbpAuditingOptions.cs
  70. 1
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs
  71. 155
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerOptions.cs
  72. 12
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs
  73. 66
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobCleanupWorker.cs
  74. 8
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs
  75. 71
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobNameFilter.cs
  76. 19
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobNameFilterMode.cs
  77. 353
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs
  78. 37
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerConfiguration.cs
  79. 131
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerManager.cs
  80. 27
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DedicatedWorkerDefinition.cs
  81. 26
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/IBackgroundJobStore.cs
  82. 23
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/IBackgroundJobWorker.cs
  83. 36
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/InMemoryBackgroundJobStore.cs
  84. 62
      framework/src/Volo.Abp.Http/Volo/Abp/Http/HttpMethodHelper.cs
  85. 6
      framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/CurrentPrincipalAccessorBase.cs
  86. 8
      framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/ThreadCurrentPrincipalAccessor.cs
  87. 14
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Auditing/AuditTestController_Tests.cs
  88. 11
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Tests.cs
  89. 11
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkPageFilter_Tests.cs
  90. 10
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestController.cs
  91. 8
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestPage.cshtml.cs
  92. 32
      framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests.cs
  93. 64
      framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_HttpMethod_Tests.cs
  94. 27
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpAutoLockNameWorkerTestModule.cs
  95. 23
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpBackgroundJobCleanupTestModule.cs
  96. 25
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerTestModule.cs
  97. 27
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpDuplicateLockNameTestModule.cs
  98. 27
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpDuplicateWorkerTestModule.cs
  99. 28
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpMultiWorkerTestModule.cs
  100. 29
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpSameJobNameTestModule.cs

20
.github/workflows/auto-pr.yml

@ -1,13 +1,13 @@
name: Merge branch dev with rel-10.5
name: Merge branch dev with rel-10.6
on:
push:
branches:
- rel-10.5
- rel-10.6
permissions:
contents: read
jobs:
merge-dev-with-rel-10-5:
merge-dev-with-rel-10-6:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
@ -18,14 +18,14 @@ jobs:
ref: dev
- name: Reset promotion branch
run: |
git fetch origin rel-10.5:rel-10.5
git reset --hard rel-10.5
git fetch origin rel-10.6:rel-10.6
git reset --hard rel-10.6
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
branch: auto-merge/rel-10-5/${{github.run_number}}
title: Merge branch dev with rel-10.5
body: This PR generated automatically to merge dev with rel-10.5. Please review the changed files before merging to prevent any errors that may occur.
branch: auto-merge/rel-10-6/${{github.run_number}}
title: Merge branch dev with rel-10.6
body: This PR generated automatically to merge dev with rel-10.6. Please review the changed files before merging to prevent any errors that may occur.
draft: true
token: ${{ github.token }}
- name: Merge Pull Request
@ -33,5 +33,5 @@ jobs:
GH_TOKEN: ${{ secrets.BOT_SECRET }}
run: |
gh pr ready
gh pr review auto-merge/rel-10-5/${{github.run_number}} --approve
gh pr merge auto-merge/rel-10-5/${{github.run_number}} --merge --auto --delete-branch
gh pr review auto-merge/rel-10-6/${{github.run_number}} --approve
gh pr merge auto-merge/rel-10-6/${{github.run_number}} --merge --auto --delete-branch

4
Directory.Packages.props

@ -123,7 +123,7 @@
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="8.19.1" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.19.1" />
<PackageVersion Include="Minio" Version="6.0.5" />
<PackageVersion Include="MongoDB.Driver" Version="3.9.0" />
<PackageVersion Include="MongoDB.Driver" Version="3.10.0" />
<PackageVersion Include="NEST" Version="7.17.5" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="Nito.AsyncEx.Context" Version="5.1.2" />
@ -169,7 +169,7 @@
<PackageVersion Include="Slugify.Core" Version="5.1.1" />
<PackageVersion Include="Spectre.Console" Version="0.51.1" />
<PackageVersion Include="StackExchange.Redis" Version="2.9.17" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.0.1" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.2.3" />
<PackageVersion Include="System.Collections.Immutable" Version="10.0.9" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Linq.Dynamic.Core" Version="1.6.7" />

4
common.props

@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>10.6.0-preview</Version>
<LeptonXVersion>5.6.0-preview</LeptonXVersion>
<Version>10.7.0-preview</Version>
<LeptonXVersion>5.7.0-preview</LeptonXVersion>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<PackageIconUrl>https://abp.io/assets/abp_nupkg.png</PackageIconUrl>
<PackageProjectUrl>https://abp.io/</PackageProjectUrl>

55
docs/en/Blog-Posts/2026-07-06-ABP-Summer-Campaign/post.md

@ -0,0 +1,55 @@
Summer is here, and so is one of the best times to start building with ABP.
From **July 6 to July 20**, we're offering exclusive summer savings on **ABP licenses and renewals**. Save **20% on new licenses** or **10% on license renewals**, and receive **up to $300 in AI credits** to power the **ABP AI Agent** in **ABP Studio**.
Whether you're starting a new project or upgrading your development workflow, this campaign helps you save on your license while accelerating development with AI.
### **What's Included?**
**During the campaign period, you'll receive:**
* **20% off new ABP licenses**
* **10% off license renewals**
* **Up to $300 in AI credits** for the **ABP AI Agent**
The AI credits can be used with the **ABP AI Agent** in **ABP Studio**, allowing you to automate repetitive development tasks and build applications faster.
### **Build Faster with the ABP AI Agent**
The ABP AI Agent is designed specifically for ABP developers. Rather than acting as a generic coding assistant, it understands your ABP solution and helps automate common development workflows.
With the included AI credits, you can:
* Generate application features with AI assistance
* Create entities, services, and UI components faster
* Run automated development workflows
* Generate database migrations and update projects
* Inspect exceptions and troubleshoot issues
* Execute development tasks directly from ABP Studio
The result is less time spent on repetitive work and more time focused on building your application's business value.
### **Why Choose ABP?**
ABP is a complete application development platform for building modern, maintainable, and scalable .NET applications.
With ABP, you can:
* Build enterprise-grade ASP.NET Core applications faster
* Follow Domain-Driven Design (DDD) and clean architecture principles
* Develop modular, reusable, and maintainable application modules
* Leverage built-in capabilities such as multi-tenancy, authentication, authorization, localization, auditing, and more
* Scale from modular monoliths to microservice architectures
* Boost developer productivity with ABP Studio and the ABP AI Agent
Instead of spending weeks building common infrastructure, your team can focus on delivering business value and shipping features faster.
## **Don't Miss This Limited-Time Offer**
This campaign is available **only between July 6 and July 20**.
Whether you're purchasing your first ABP license or renewing your existing one, now is the perfect time to save. Get **20% off new licenses** or **10% off renewals**, plus receive **up to $300 in AI credits** to accelerate development with the **ABP AI Agent**.
**Claim your summer discount before July 20 and start building faster with ABP.**
**Get your discount now:** [https://abp.io/pricing](https://abp.io/pricing)

180
docs/en/Blog-Posts/2026-07-07 v10_6_Preview/POST.md

@ -0,0 +1,180 @@
# ABP Platform 10.6 RC Has Been Released
We are happy to release [ABP](https://abp.io) version **10.6 RC** (Release Candidate). This blog post introduces the new features and important changes in this new version.
Try this version and provide feedback for a more stable version of ABP v10.6! Thanks to you in advance.
## Get Started with the 10.6 RC
You can check the [Get Started page](https://abp.io/get-started) to see how to get started with ABP. You can either download [ABP Studio](https://abp.io/get-started#abp-studio-tab) (**recommended**, if you prefer a user-friendly GUI application - desktop application) or use the [ABP CLI](https://abp.io/docs/latest/cli).
By default, ABP Studio uses stable versions to create solutions. Therefore, if you want to create a solution with a preview version, first you need to create a solution and then switch your solution to the preview version from the ABP Studio UI:
![studio-switch-to-preview](studio-switch-to-preview.png)
## Migration Guide
You can check the migration guide if you are upgrading from v10.5 or earlier: [ABP Version 10.6 Migration Guide](https://abp.io/docs/10.6/release-info/migration-guides/abp-10-6).
## What's New with ABP v10.6?
In this section, I will introduce some major features released in this version.
Here is a brief list of titles explained in the next sections:
- Background Jobs: Dedicated Workers, Parallel Execution, and Successful Job Retention
- API Definition and Proxy Improvements for Content Types and Multipart Uploads
- Angular UI: Upgrade to Angular 22
- Antiforgery and OpenIddict Security Improvements
- OpenIddict: Generate Access Token from the UI
- Dependency Updates
### Background Jobs: Dedicated Workers, Parallel Execution, and Successful Job Retention
ABP v10.6 adds three opt-in enhancements to the default background job worker. All of them are disabled by default, so existing applications keep the current behavior unless you enable them explicitly.
**Storing successful jobs**
By default, a job is deleted as soon as it runs successfully. You can now set `StoreSuccessfulJobs = true` to keep completed jobs in the store. A new `CompletionTime` column marks completed jobs, and a cleanup worker prunes them after `SuccessfulJobRetentionTime` (default: 7 days).
**Dedicated workers per job type**
`AddDedicatedWorker(...)` registers a worker that processes only the configured job argument types, each with its own distributed lock. The default worker continues handling all remaining job types.
**Parallel job execution**
Set `MaxParallelJobExecutionCount` greater than 1 to execute multiple jobs in the same poll cycle. In this mode, each job is claimed with its own distributed lock so different application instances can process different jobs concurrently without running the same job twice.
Example configuration:
```csharp
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.StoreSuccessfulJobs = true;
options.SuccessfulJobRetentionTime = TimeSpan.FromDays(30);
options.AddDedicatedWorker<EmailJobArgs, SmsJobArgs>("NotificationWorkerLock");
options.AddDedicatedWorker<ReportJobArgs>("ReportWorkerLock");
options.MaxParallelJobExecutionCount = 4;
});
```
These options are useful when you need better isolation between job types, higher throughput in clustered deployments, or an audit trail of successfully completed jobs.
> See the [Background Jobs](https://abp.io/docs/10.6/framework/infrastructure/background-jobs) documentation and [#25742](https://github.com/abpframework/abp/pull/25742) for details.
### API Definition and Proxy Improvements for Content Types and Multipart Uploads
ABP v10.6 improves API definition generation and client proxies for file upload scenarios and non-JSON response types.
The API definition now exposes response `ContentTypes` and an `IsRemoteStream` flag. C#, jQuery, and Angular proxies can use the declared media type instead of collapsing everything to `application/json` and `text/plain`.
For upload DTOs containing `IRemoteStreamContent`, generated Angular and jQuery proxies now forward `FormData` as multipart requests instead of silently dropping the file payload or trying to serialize the stream as JSON.
Server-side setup still follows the existing ABP pattern:
```csharp
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(UploadFileDto));
});
```
Angular client example after proxy regeneration:
```typescript
const fd = new FormData();
fd.append('Name', 'logo');
fd.append('File', fileInput.files[0], 'logo.png');
this.fileService.uploadFile(fd).subscribe(result => ...);
```
This closes long-standing gaps in generated proxies for stream-based uploads and improves support for text, blob, and custom response types.
> See [#25639](https://github.com/abpframework/abp/pull/25639) for details.
### Angular UI: Upgrade to Angular 22
ABP v10.6 upgrades the Angular UI stack to **Angular 22.0.x**.
This release also improves the locale loading mechanism with a fallback path, so culture resources load more reliably when optional locale files are missing or partially available.
If you maintain a custom Angular UI on top of ABP, plan for the Angular 22 upgrade together with your ABP package update and regenerate proxies after upgrading.
> See [#25690](https://github.com/abpframework/abp/pull/25690) and [#25734](https://github.com/abpframework/abp/pull/25734) for details.
### Antiforgery and OpenIddict Security Improvements
ABP v10.6 includes several security-focused fixes for mixed authentication scenarios.
**Antiforgery claim issuer normalization**
When an application serves a token-authenticated SPA and cookie-authenticated MVC pages on the same origin, antiforgery validation could fail because the user id claim issuer differed between JWT and cookie authentication schemes. ABP now normalizes the user id claim issuer while generating and validating antiforgery tokens.
This behavior is enabled by default through `AbpAntiForgeryOptions.NormalizeUserIdClaimIssuer`. Razor Pages antiforgery validation was also aligned with the same normalization logic, which fixes failures in modules such as Setting Management.
**Prevent OpenIddict `client_id` from leaking into the interactive auth cookie**
ABP fixed a case where an OpenIddict authorization request could stamp the requested `client_id` into the interactive authentication cookie during security-stamp refresh. That could corrupt audit logs and make later cookie-authenticated requests appear to belong to the OAuth client.
The fix strips `client_id` when the interactive cookie is refreshed. Tokens are unaffected, and cookies that were already corrupted self-heal on the next refresh.
**Forward the current access token for authenticated client requests**
`HttpContextAbpAccessTokenProvider` now forwards the incoming access token whenever the request is authenticated, including `client_credentials` requests. This prevents unnecessary fallback to configured identity clients in machine-to-machine scenarios.
> See [#25655](https://github.com/abpframework/abp/pull/25655), [#25669](https://github.com/abpframework/abp/pull/25669), [#25711](https://github.com/abpframework/abp/pull/25711), and [#25740](https://github.com/abpframework/abp/pull/25740) for details.
### OpenIddict: Generate Access Token from the UI
ABP Commercial v10.6 RC adds a **Generate Access Token** action to OpenIddict application management pages across MVC, Blazor, MudBlazor, and Angular UIs.
Administrators can request a token for an OpenIddict application directly from the UI. The backend forwards a `client_credentials` request to `/connect/token` and returns the generated access token to the caller.
This is especially useful for testing integrations, validating scopes, and troubleshooting machine-to-machine authentication without leaving the admin UI.
### Dependency Updates
ABP v10.6 RC includes several dependency and package updates:
- Angular packages upgraded to **22.0.x**
- `Microsoft.*` and `System.*` packages upgraded to **10.0.9**
- `Microsoft.Data.SqlClient` upgraded to **7.0.2**
- `Swashbuckle.AspNetCore` upgraded to **10.2.3**
> Check the [Package Version Changes](https://abp.io/docs/10.6/package-version-changes) document for all updates.
### Other Improvements and Enhancements
- **Permission management**: Skip dynamic permission initialization during migration runs to avoid noisy logs when the database is unavailable ([#25743](https://github.com/abpframework/abp/pull/25743)).
- **Security / principal access**: `ThreadCurrentPrincipalAccessor` now returns an anonymous principal instead of `null` in non-web contexts ([#25752](https://github.com/abpframework/abp/pull/25752)).
- **Angular proxy generation**: Array parameters are now generated as `readonly` in Angular proxies ([#25687](https://github.com/abpframework/abp/pull/25687)).
- **Date/time normalization**: Removed misleading warnings when normalizing `Unspecified` `DateTime` values near range boundaries ([#25703](https://github.com/abpframework/abp/pull/25703)).
- **AI Management**: Indexing is more resilient under memory pressure in the commercial module.
## Community News
### New ABP Community Articles
As always, exciting articles have been contributed by the ABP community. I will highlight some of them here:
- [ABP 10.5.0 Expands Blazor UI Options with MudBlazor Support](https://abp.io/community/articles/abp-10.5.0-expands-blazor-ui-options-with-mudblazor-support-03rzmlpm) by [Liming Ma](https://abp.io/community/members/maliming)
- [Angular 22 State Management: Signals, SignalStore, or NgRx?](https://abp.io/community/articles/angular-22-state-management-signals-signalstore-or-ngrx-yq8zg0nw) by [Sumeyye Kurtulus](https://abp.io/community/members/sumeyye.kurtulus)
- [Working with Dapr Workflows in the ABP Framework](https://abp.io/community/articles/working-with-dapr-workflows-in-the-abp-framework-6476or18) by [Engincan Veske](https://abp.io/community/members/EngincanV)
- [My Speaker's View of CONVEX Summit 2026](https://abp.io/community/articles/my-speakers-view-of-convex-summit-2026-ai-net-conference-3uk6ln1l) by [Alper Ebiçoğlu](https://abp.io/community/members/alper)
Thanks to the ABP Community for all the content they have published. You can also [post your ABP related (text or video) content](https://abp.io/community/posts/create) to the ABP Community.
### ABP Summer Campaign: Get Up To 20% Off + $300 in AI Credits
![summer-sale](summer-sale.png)
Summer is a great time to start building with ABP. From **July 6 to July 20**, we're offering exclusive summer savings on **ABP licenses and renewals**: **20% off new licenses**, **10% off renewals**, and **up to $300 in AI credits** for the **ABP AI Agent** in **ABP Studio**. Whether you're starting a new project or upgrading your development workflow, this limited-time offer helps you save on your license while accelerating development with AI.
> You can read the announcement here: [ABP Summer Campaign: Get Up To 20% Off + $300 in AI Credits](https://abp.io/community/announcements/abp-summer-campaign-get-up-to-20-off-300-in-ai-credits-r5lqtpg9).
## Conclusion
This version comes with some new features and a lot of enhancements to the existing features. You can see the [Road Map](https://abp.io/docs/10.6/release-info/road-map) documentation to learn about the release schedule and planned features for the next releases. Please try ABP v10.6 RC and provide feedback to help us release a more stable version.
Thanks for being a part of this community!

BIN
docs/en/Blog-Posts/2026-07-07 v10_6_Preview/cover-image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

BIN
docs/en/Blog-Posts/2026-07-07 v10_6_Preview/studio-switch-to-preview.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
docs/en/Blog-Posts/2026-07-07 v10_6_Preview/summer-sale.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/gifs/designer-hybrid-flow.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/gifs/runtime-workflow.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/code-backlog-summary.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/custom-endpoint-summary.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-code-layer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-endpoint.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-entity.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-form.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-devjson-page.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-enum-status-modal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-enum-status-saved.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-form-create-modal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-page-create-before-save.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-review-template-properties.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-runtime-entity.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-vendor-application-properties.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/designer-vendor-escalation-save-modal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-form-documents.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-grid-filtered.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-review-rejected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/assets/screenshots/runtime-vendor-escalations.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/cover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

394
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/post.md

@ -0,0 +1,394 @@
# Building a Vendor Onboarding Workflow with ABP Low-Code
Vendor onboarding usually starts with a few familiar steps.
A company sends its details, someone checks the documents, another person reviews the score, and the team either approves the vendor or asks for more information. After a while, the process turns into a mix of spreadsheets, uploaded files, status notes, and "who is waiting on this one?" messages.
In this article, we'll build that workflow with the [Low-Code System](https://abp.io/docs/latest/low-code/index). We'll model the data in the [Low-Code Designer](https://abp.io/docs/latest/low-code/designer), let the [React runtime](https://abp.io/docs/latest/low-code/react-runtime) render the page, and then add one [custom endpoint](https://abp.io/docs/latest/low-code/custom-endpoints) for a summary that does not belong to normal CRUD.
The example is an internal operations page where a team receives vendor applications, reviews compliance documents, tracks deadlines, and follows rejected or priority vendors from one place.
That is a good place to try ABP Low-Code, because the first version of the workflow is mostly data, screens, validation rules, and a few process-specific actions. You do not need to hand-write a React page only to list vendor applications, upload a compliance document, or show a rejection reason when the status is rejected.
We will start from an already running ABP React + EF Core application with Low-Code enabled, so the article can stay focused on the Admin Console, the Designer, and the runtime flow.
## What We Are Building
The workflow has one main record: `VendorApplication`.
A reviewer should be able to:
- Create a vendor application with company and contact details.
- Track whether the vendor is `Submitted`, `InReview`, `Approved`, or `Rejected`.
- Set the requested date and approval deadline.
- Mark priority vendors.
- Assign a category such as `Software`, `Services`, or `Hardware`.
- Upload a logo and a compliance document.
- Fill in a rejection reason only when the application is rejected.
- Filter the generated grid by status, requested date, priority, and category.
- Call a summary endpoint that returns counts for dashboard-like use.
We'll also touch two extra pieces around that main record. `VendorReviewTemplate` comes from C# so you can see how code-defined metadata appears in the Designer. Later, a `VendorEscalation` model is added while the Designer is switched to `Runtime JSON`. You could build the whole workflow with one entry point, but using these three entry points makes the hybrid model visible without turning the article into three separate implementations.
## A Quick Note on How Low-Code Fits Together
The Low-Code Designer is where you describe the model and the UI metadata. In this article we use four areas:
- `Data` for enums and entities.
- `Pages` for the generated grid route.
- `Forms` for the create/edit form layout.
- `Actions` for the custom HTTP endpoint.
The Designer stores metadata. The React runtime reads that metadata and renders the page at runtime. That is the important mental model: when we add a field to the entity, the field can become a grid column, a filter, a validation rule, or a form input depending on how we configure the metadata around it.
There is also one database detail to keep in mind. Metadata that comes from C# code or from `Dev JSON` is source-controlled application metadata. When it introduces or changes a persisted entity, run the normal EF Core migration and database update flow before using the generated runtime page. In the validated demo for this article I used SQLite, so the migration updated the local SQLite database. `Runtime JSON` is different: it is authored at runtime, so I do not run a C# migration in that section.
## Add a Code-Defined Review Template
Let's start with one model that does not come from the Designer.
In this workflow, vendor reviewers can use review templates. The template itself is not the center of the workflow, so I kept it focused on the review rules:
```csharp
[DynamicEnum]
public enum VendorReviewTemplateType
{
Standard = 0,
Security = 1,
Finance = 2
}
[DynamicEntity(DefaultDisplayPropertyName = nameof(Name))]
[DynamicEntityUI(DisplayName = "Vendor Review Templates")]
public class VendorReviewTemplate : DynamicEntityBase
{
[Required]
[StringLength(128)]
[DynamicPropertyUnique]
public string Name { get; set; }
public VendorReviewTemplateType TemplateType { get; set; }
public int MinimumComplianceScore { get; set; }
public bool RequiresDocumentReview { get; set; }
public string? Notes { get; set; }
}
```
Then include the entity in your EF Core DbContext. This is the part that makes the migration create a real backing table for the code-defined model:
```csharp
public DbSet<VendorReviewTemplate> VendorReviewTemplates { get; set; }
builder.Entity<VendorReviewTemplate>(b =>
{
b.ToTable(
VendorOnboardingLowCodeConsts.DbTablePrefix + "VendorReviewTemplates",
VendorOnboardingLowCodeConsts.DbSchema
);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
b.Property(x => x.Notes).HasMaxLength(512);
b.HasIndex(x => x.Name).IsUnique();
});
```
Because this model is defined in C#, treat it like the rest of your application schema changes: add the entity, add the DbSet/mapping, create/apply the EF Core migration, and then start the application.
After the app starts, open **Admin Console > Low-Code Designer > Data**. The model is visible there, but it is read-only because it was defined in code.
![Code-defined VendorReviewTemplate shown as read-only in the Low-Code Designer](assets/screenshots/designer-code-layer.png)
Open the **Properties** tab and you can see the fields that came from the C# class. They are available to the Low-Code System, but the Designer marks them as code-owned.
![The Properties tab for the code-defined VendorReviewTemplate entity](assets/screenshots/designer-review-template-properties.png)
That is useful in real projects. Some metadata can be shipped with the application, while the rest of the workflow can still be designed through the Admin Console.
## Create the Vendor Enums
Now move to the part we actually build in the Designer.
The animation below shows the Designer path in one pass. The next sections slow it down and explain the enum, entity, page, and form steps.
![Creating the Designer metadata for the vendor onboarding workflow](assets/gifs/designer-hybrid-flow.gif)
Open `Data > Enums` and create the status enum:
```text
VendorApplicationStatus
Submitted
InReview
Approved
Rejected
```
Before saving, the enum modal should contain the name and the four values:
![The VendorApplicationStatus enum creation modal before saving](assets/screenshots/designer-enum-status-modal.png)
Then create the category enum:
```text
VendorCategory
Software
Services
Hardware
```
The order of the status values matters for the custom endpoint later, because the script checks the enum values by their numeric indexes. In this example `Submitted` is `0`, `Approved` is `2`, and `Rejected` is `3`.
After saving, the enum detail page shows the numeric values that the runtime and scripts will use:
![The saved VendorApplicationStatus enum values in the Designer](assets/screenshots/designer-enum-status-saved.png)
## Create the VendorApplication Entity
Go to `Data > Entities` and create `VendorApplication`.
This is the model that drives the rest of the article. Add these fields:
| Field | Type | Configuration |
| --- | --- | --- |
| `CompanyName` | `String` | Required and unique |
| `ContactEmail` | `String` | Required, email validation |
| `Status` | `Enum` | `VendorApplicationStatus` |
| `RequestedOn` | `Date` | Application date |
| `ApprovalDeadline` | `Date` | Review deadline |
| `IsPriority` | `Boolean` | Priority flag |
| `Category` | `Enum` | `VendorCategory` |
| `ComplianceScore` | `Int` | Review score |
| `Logo` | `Image` | Logo upload |
| `ComplianceDocument` | `File` | Document upload |
| `RejectionReason` | `String` | Optional |
![VendorApplication entity definition in the Designer](assets/screenshots/designer-devjson-entity.png)
The **Properties** tab is where the entity becomes more than a name. The table shows the field types, enum bindings, and source layer. Scroll down and the upload-related fields are visible with their `Image` and `File` types:
![The VendorApplication properties table in the Designer](assets/screenshots/designer-vendor-application-properties.png)
There is no React code yet, but we already have a lot of behavior described: required fields, uniqueness, email validation, enum fields, upload fields, and the data shape that the runtime will use.
The `Image` and `File` types are worth calling out. They are not plain strings with a path. In the generated form they become upload controls, which is exactly what we need for vendor logos and compliance documents.
Since `VendorApplication` is authored in the `Dev JSON` layer, it also belongs to the source-controlled model. After saving the entity metadata, create/apply the EF Core migration before you open the generated page in the runtime. This is the step that creates the backing table for the low-code entity in the database.
## Generate a Grid Page
The reviewers need a page where they can work with applications, so go to `Pages` and create a `dataGrid` page named `vendor-onboarding`.
Bind it to `VendorApplication`.
Before saving the page, the modal connects the route name, title, icon, and entity:
![The vendor-onboarding data grid page modal before saving](assets/screenshots/designer-page-create-before-save.png)
After the page is created, set `RequestedOn` as the default sort field, keep it descending, adjust the icon if you want, and assign `vendor-application-form` as the create/edit form:
![The vendor-onboarding data grid page bound to VendorApplication](assets/screenshots/designer-devjson-page.png)
For the review workflow, keep the configured columns focused on the fields reviewers use most:
- Company name
- Status
- Requested date
- Priority
- Category
Then configure the filters you want reviewers to use most often. In this workflow, the important filters are company, status, requested date, priority, and category. Depending on the runtime defaults, the generated grid may still expose additional fields such as contact email; the workflow is still driven by the focused page metadata above.
Once the page is saved, the React runtime can resolve the route from the page metadata. The grid is generated from the entity and page configuration rather than from a hand-written React component.
## Build the Create/Edit Form
A grid is not enough. We also need a form that feels like the workflow.
Go to `Forms` and create `vendor-application-form` for `VendorApplication`. Split the fields into three tabs:
![The vendor-application-form creation modal before saving](assets/screenshots/designer-form-create-modal.png)
- **Company**: `CompanyName`, `ContactEmail`, `Category`, `IsPriority`
- **Review**: `Status`, `RequestedOn`, `ApprovalDeadline`, `ComplianceScore`, `RejectionReason`
- **Documents**: `Logo`, `ComplianceDocument`
Now add the conditional behavior for `RejectionReason`. In this demo I used two complementary rules: one rule shows the field when `Status = Rejected`, and the other hides it for non-rejected statuses.
![The vendor-application-form with tabs and a conditional rule](assets/screenshots/designer-devjson-form.png)
This is one of the places where Low-Code becomes more than "generate a CRUD page". The runtime does more than render a static form; it evaluates the rule while the user edits the record.
## Apply the Migration Before Opening the Runtime
Before opening the generated page, apply the database migration for the `Dev JSON` changes. We used `Dev JSON` for `VendorApplication`, so the Designer wrote source-controlled descriptor files under `_Dynamic`. The entity shape is now part of the application model, and the database needs the matching backing table before the React runtime can save records.
That is why `Dev JSON` is a good fit during development: the metadata files and the EF Core migration can be reviewed, committed, and reproduced in another environment. If the same entity had been created in the `Runtime JSON` layer, you would not create a C# migration for that runtime edit; the metadata change would be stored in the database instead. In practice, use `Dev JSON` for development-time, source-controlled changes, and use `Runtime JSON` when you want production-time changes to be managed from the Admin Console and persisted in the database.
## Try It in the React Runtime
Open the generated `vendor-onboarding` page in the React runtime and create a vendor application.
On the `Documents` tab, the `Logo` and `ComplianceDocument` fields are rendered as upload fields:
![The generated Documents tab rendering image and file upload fields](assets/screenshots/runtime-form-documents.png)
Now edit a record and change the status to `Rejected`. The `RejectionReason` field becomes available on the `Review` tab:
![The Review tab showing the conditional RejectionReason field](assets/screenshots/runtime-review-rejected.png)
After saving a few records, use the generated filters to narrow the list to rejected vendors. Depending on the runtime configuration, the filter panel can expose more fields than the small set you configured for the workflow; here we only use the `Status = Rejected` filter:
![The generated grid filtered by Status = Rejected](assets/screenshots/runtime-grid-filtered.png)
The short animation below gives a quick pass through the same runtime states: upload fields, the conditional rejection reason, and the filtered grid.
![Generated upload fields, conditional review field, and grid filters in the React runtime](assets/gifs/runtime-workflow.gif)
At this point we have a working page, form, validation, uploads, and filters. The important part is that all of it came from the metadata we configured in the Designer.
## Add a Custom Summary Endpoint
Generated CRUD is enough for day-to-day record editing, but teams often need one operation that is specific to their process.
For vendor onboarding, a summary endpoint is a good example:
```text
GET /api/custom/vendor-onboarding/summary
```
In the Designer, open `Actions` and create a custom HTTP action with that route. The script can use the [Scripting API](https://abp.io/docs/latest/low-code/scripting-api) to query the same `VendorApplication` data that the generated grid uses.
![The custom HTTP action configured under Actions in the Designer](assets/screenshots/designer-devjson-endpoint.png)
Here is the script used in the demo:
```js
var entityName = 'Acme.VendorOnboardingLowCode.Procurement.VendorApplication';
var vendorQuery = await db.query(entityName);
var totalVendors = await db.count(entityName);
var submittedVendors = await vendorQuery.where(x => x.Status === 0).count();
var approvedVendors = await vendorQuery.where(x => x.Status === 2).count();
var today = query.today || new Date().toISOString().slice(0, 10);
var overdueReviews = await vendorQuery
.where(x => x.ApprovalDeadline != null && x.ApprovalDeadline < today && x.Status !== 2)
.count();
return ok({
totalVendors: totalVendors,
submittedVendors: submittedVendors,
approvedVendors: approvedVendors,
overdueReviews: overdueReviews,
evaluatedOn: today
});
```
Use the entity name shown in your Designer. In the screenshots, it is `Acme.VendorOnboardingLowCode.Procurement.VendorApplication`.
When the endpoint runs, it returns the current counts from the low-code records:
![The JSON response of the custom summary endpoint](assets/screenshots/custom-endpoint-summary.png)
That is the bridge I like here. The page and form stay metadata-driven, but the process-specific summary is a short script exposed as a custom endpoint.
## Add One Runtime Model
Now switch the Designer layer to `Runtime JSON` and add one more entity: `VendorEscalation`.
This model represents the items that need extra attention. It could have been created in the same place as `VendorApplication`; I am adding it here only to show that runtime-authored metadata participates in the same Low-Code System.
Unlike the code and `Dev JSON` examples above, this runtime-authored model is not part of the source-controlled migration flow in this walkthrough.
The create modal is the same Designer experience, but the selected layer is now `Runtime JSON`:
![The VendorEscalation entity creation modal in the Runtime JSON layer](assets/screenshots/designer-vendor-escalation-save-modal.png)
![The VendorEscalation entity authored in the Runtime JSON layer](assets/screenshots/designer-runtime-entity.png)
Create a data grid page for it and open it in the React runtime:
![The runtime-generated Vendor Escalations page](assets/screenshots/runtime-vendor-escalations.png)
From the user's point of view, it behaves like the first generated page. From the metadata point of view, we have now seen code-defined metadata, Designer-authored metadata, and runtime-authored metadata in the same application.
## Read the Same Data from ABP Code
The last bridge is application code.
Sometimes the generated page is not the only consumer. You may want a typed application service, a scheduled job, or another API to read the same low-code records. The code below shows the idea by returning a backlog summary:
```csharp
private readonly IRepository<DynamicEntity, Guid> _vendorApplicationRepository;
private readonly IAsyncQueryableExecuter _queryableExecuter;
public async Task<VendorBacklogDto> GetBacklogAsync()
{
var entityDescriptor = DynamicModelManager.Instance.Find(
"Acme.VendorOnboardingLowCode.Procurement.VendorApplication"
);
if (entityDescriptor == null)
{
throw new UserFriendlyException("VendorApplication model was not found.");
}
var query = await _vendorApplicationRepository
.SetEntityName(entityDescriptor.Name)
.GetQueryableAsync();
var today = DateOnly.FromDateTime(Clock.Now);
var priorityQuery = query.Where(vendor =>
vendor.Data["IsPriority"] != null &&
(bool?)vendor.Data["IsPriority"] == true);
var nextPriorityVendor = await _queryableExecuter.FirstOrDefaultAsync(
priorityQuery.OrderByDescending(vendor =>
(DateOnly?)vendor.Data["RequestedOn"]));
return new VendorBacklogDto
{
TotalVendors = checked((int)await _queryableExecuter.LongCountAsync(query)),
PriorityVendors = checked((int)await _queryableExecuter.LongCountAsync(priorityQuery)),
RejectedVendors = checked((int)await _queryableExecuter.LongCountAsync(
query.Where(vendor =>
vendor.Data["Status"] != null &&
(int?)vendor.Data["Status"] == 3))),
OverdueReviews = checked((int)await _queryableExecuter.LongCountAsync(
query.Where(vendor =>
vendor.Data["ApprovalDeadline"] != null &&
(DateOnly?)vendor.Data["ApprovalDeadline"] < today &&
vendor.Data["Status"] != null &&
(int?)vendor.Data["Status"] != 2))),
NextPriorityVendor = nextPriorityVendor?.GetData<string>("CompanyName")
};
}
```
![The typed backlog summary returned by the application service](assets/screenshots/code-backlog-summary.png)
The important detail is that the aggregate operations stay on `IQueryable`; the code does not load every vendor into memory just to count them. This is not a replacement for the generated page. It is the other direction: use the generated page for the admin experience, then read the same records from normal ABP code when another part of the application needs them.
## Going Further
The workflow we built is intentionally focused, but the same shape can grow in a few directions:
- Add permissions around the generated pages and custom endpoint.
- Add more form rules for review-specific fields.
- Add an approval notification after a vendor is accepted.
- Add a scheduled job that checks overdue applications.
- Build a dashboard widget on top of the summary endpoint.
The main pattern stays the same: model the data in the Low-Code Designer, let the React runtime render the operational page, and add code or scripting only for the parts that are specific to your business process.
## Conclusion
ABP Low-Code is useful when the first version of a business workflow is mostly metadata: entities, fields, filters, forms, validation, uploads, and a few custom actions.
In this vendor onboarding example, the `VendorApplication` model gave us a generated grid and form, the runtime handled upload fields and conditional UI, and a custom endpoint added the summary that CRUD would not provide by itself. We also saw that low-code metadata can come from the Designer, from runtime JSON, or from C# code when you need that bridge.
That is the part worth remembering: you can start with a working admin experience quickly, then extend the workflow where the generated behavior stops being enough.
### Further Reading
- [Low-Code System Overview](https://abp.io/docs/latest/low-code/index)
- [Low-Code Designer](https://abp.io/docs/latest/low-code/designer)
- [React Runtime](https://abp.io/docs/latest/low-code/react-runtime)
- [Custom Endpoints](https://abp.io/docs/latest/low-code/custom-endpoints)
- [Scripting API](https://abp.io/docs/latest/low-code/scripting-api)

1
docs/en/Community-Articles/2026-07-07-building-a-vendor-onboarding-workflow-with-abp-low-code/summary.md

@ -0,0 +1 @@
Build a vendor onboarding workflow with ABP Low-Code: model vendor applications in the Designer, let the React runtime render the grid and form, then add a custom endpoint and a typed ABP code bridge for process-level counts.

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-calendar-kanban-flow.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-custom-endpoint-flow.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-grid-form-flow.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-hero-loop.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/gifs/eventflow-page-builder.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/abp-studio-lowcode-system.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/admin-console-lowcode.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/overview-dashboard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/assets/screenshots/sponsor-activation-form.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/cover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

225
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/post.md

@ -0,0 +1,225 @@
# Introducing ABP Low-Code: Build Real ABP Apps in Minutes
**Create runtime-managed pages, generated React screens, code-first C# entities, and Script API extensions without leaving the ABP application model.**
![ABP Low-Code runtime loop — grids, forms, calendars, and pipelines inside one ABP app](assets/gifs/eventflow-hero-loop.gif)
> **Want to try the same path?** Start from ABP Studio, enable the Low-Code runtime and designer, define pages in the Admin Console, and see them resolve inside the running ABP app.
---
## ABP Low-Code at a glance
| Runtime authoring | Generated screens | ABP-native extensibility | One application model |
| :---: | :---: | :---: | :---: |
| Define and update pages in the Admin Console | Grid, Form, Calendar, Kanban, Gallery, Dashboard | Code-first entities, Script API actions, and C# query paths | Runtime metadata, generated UI, and application code stay together |
---
## Built into the ABP Platform
Low-code is most useful when speed does not create a separate stack to maintain later.
That is where many low-code products start to strain. They move quickly at the beginning, then force a second implementation track when the app needs permissions, auditability, custom logic, or tighter integration with existing application code.
ABP Low-Code takes a different path. It runs **inside the ABP Platform**, so runtime-managed pages are part of an application foundation that already includes identity, permissions, audit logging, APIs, and code-level extensibility.
---
## Edit at runtime. See it in the app.
In the Low-Code Designer, you update a runtime-managed page. A few seconds later, the same application surface is visible in the live app. No rebuild loop. No parallel front-end implementation. No "we will wire it later" gap between authoring and runtime.
ABP Low-Code shortens the cycle from model change to running screen while keeping the output grounded in the same ABP application.
![ABP Low-Code designer workspace for a runtime page](assets/screenshots/admin-console-lowcode.png)
> **What this shows:** authoring and runtime are connected. Pages are defined in the designer and resolved in the running application.
---
## CRUD is table stakes
If low-code only saves you from drawing a table and a form, it is not enough. Business applications need richer operational surfaces.
In the generated app, the `Events` screen ships with search, actions, filters, and form-driven editing. The form structure already understands tabs, relations, validation, and business-shaped input instead of leaving you with a blank shell to finish by hand.
![Generated event grid and generated event form](assets/gifs/eventflow-grid-form-flow.gif)
The point is not just generated CRUD. It is generated CRUD that already looks like the operational screens teams maintain in real applications.
---
## One model, multiple operational screens
Business users do not think in one view. Operators want a calendar for scheduling, a kanban board for workflow, a grid for bulk operations, a gallery when media matters, and a dashboard when they need the state of the business at a glance.
ABP Low-Code keeps those surfaces attached to the same underlying model. The same `Session` model can appear as a **calendar** for planning and a **kanban pipeline** for operational flow. The same generated app can also include a **speaker gallery** and an **overview dashboard** for metrics.
![The same runtime model shown as calendar and kanban views](assets/gifs/eventflow-calendar-kanban-flow.gif)
![Overview dashboard in the live runtime app](assets/screenshots/overview-dashboard.png)
This is where ABP Low-Code starts to feel less like a form generator and more like a runtime application layer: one model, many working screens, no second implementation track for each view type.
---
## When low-code needs code
The real differentiator is not that ABP Low-Code can go fast. It is that **speed does not require isolation from the application foundation**.
When generated CRUD is not enough, you extend the same app instead of throwing the low-code layer away.
ABP Low-Code exposes a server-side **Script API** inside the same application model. That scripting surface can back:
- **Custom endpoints** when the UI needs an API-shaped response.
- **Interceptors** when create or update commands need validation or mutation.
- **Event handlers** when logic should react to runtime events.
- **Background jobs** when work should continue asynchronously.
- **Background workers** when operational logic should run on a schedule.
In this article, the visible proof happens to be `GET /api/custom/eventflow/highlights`. The GIF shows an endpoint because it is the easiest proof surface to read. But the broader point is that endpoints are only one consumer of the same low-code scripting layer.
That hybrid model matters in both directions:
- **Code-first ABP entities can be surfaced in low-code flows and runtime pages.**
- **Low-code-managed data and screens stay reachable from Script API actions, application services, repository queries, and custom endpoints.**
- **Teams do not lose architectural control just because they gained a faster authoring layer.**
![Endpoint result and runtime dashboard reading the same numbers](assets/gifs/eventflow-custom-endpoint-flow.gif)
The actual capability is the shared ABP application model behind it: script when runtime logic is enough, C# when typed application services and repository queries are the better fit.
This is the difference between "low-code as a shortcut" and "low-code as part of your application platform."
---
## From code-first entity to generated page
The first direction is code-first to low-code. A **code-first** `SponsorActivation` entity checked into the ASP.NET Core project can still become a working runtime page without forking into a separate low-code-only model.
The code-first entity carries the same metadata that ABP Low-Code uses to generate the page:
```csharp
[DynamicEntity(DefaultDisplayPropertyName = nameof(CompanyName))]
[DynamicEntityUI("Sponsor Activations")]
[DynamicEntityAttachments("application/pdf", "image/*", MaxFileCount = 4)]
public class SponsorActivation : DynamicEntityBase
{
[Required]
[DynamicPropertyUI(DisplayName = "Sponsor")]
public string CompanyName { get; private set; }
[Required]
[EmailAddress]
[DynamicPropertyUI(DisplayName = "Contact Email")]
public string ContactEmail { get; private set; }
public SponsorActivationStatus Status { get; set; }
[DynamicForeignKey("EventFlow.Events.Event", "Title")]
public Guid? EventId { get; set; }
[DynamicForeignKey("Volo.Abp.Identity.IdentityUser", nameof(IdentityUser.UserName), ForeignAccess.View)]
public Guid? OwnerUserId { get; set; }
[DynamicPropertyType(EntityPropertyType.Money)]
public decimal ActivationBudget { get; set; }
[DynamicPropertyImageOptions("image/png", "image/jpeg")]
public string? BrandLogo { get; set; }
[DynamicPropertyFileOptions("application/pdf", ".pptx", ".docx")]
public string? ActivationBrief { get; set; }
}
```
That class lives as normal C# source, gets migrated like the rest of the application, and is seeded with real records so the runtime page does not open as an empty shell.
Inside the designer, selecting the `SponsorActivation` entity auto-generates the page identity, binds the grid to the entity, and lands on a real runtime route at `/dynamic/sponsor-activation`. The generated surface includes sponsor, email, event lookup, owner lookup, budget, image, and file fields directly from the C# model.
![ABP Low-Code selecting the SponsorActivation C# entity, generating the page, and opening the resulting runtime surface](assets/gifs/eventflow-page-builder.gif)
![Generated SponsorActivation form showing lookups, budget, image, and file fields coming directly from the C# entity](assets/screenshots/sponsor-activation-form.png)
That is the distinction that matters: code-first ABP entities can move through low-code without becoming throwaway artifacts, and low-code-generated surfaces remain part of the same application story.
---
## Low-code data stays reachable from C#
The bridge also works in the other direction. A normal ABP application service can query a low-code model through `IRepository<DynamicEntity, Guid>`, apply real filters, and combine that result with code-first aggregates.
The service behind the endpoint in the previous section looks like this:
```csharp
public async Task<EventFlowLowCodeProofDto> GetHybridSummaryAsync()
{
var liveSessionQuery = (await _dynamicEntityRepository
.SetEntityName("EventFlow.Events.Session")
.GetQueryableAsync())
.Where("int(it[\"Status\"]) == @0", 2);
var publicSessionQuery = liveSessionQuery
.Where("bool(it[\"IsPublic\"]) == @0", true);
var sponsorQuery = (await _sponsorActivationRepository.GetQueryableAsync())
.Where(activation =>
activation.Status == SponsorActivationStatus.Approved ||
activation.Status == SponsorActivationStatus.Live);
var liveSessionCount = await AsyncExecuter.CountAsync(liveSessionQuery);
var publicSessionCount = await AsyncExecuter.CountAsync(publicSessionQuery);
var activeSponsorActivationCount = await AsyncExecuter.CountAsync(sponsorQuery);
return new EventFlowLowCodeProofDto
{
LiveSessionCount = liveSessionCount,
PublicSessionCount = publicSessionCount,
ActiveSponsorActivationCount = activeSponsorActivationCount
};
}
```
Here, low-code-managed `Session` rows are filtered from C# with real `Where(...)` clauses, then combined with the typed `SponsorActivation` repository. The endpoint and dashboard are just one presentation surface for that shared ABP query path.
That is the ABP difference: low-code data stays reachable from code, and code-first entities stay reachable from low-code.
---
## Why ABP Low-Code matters
The value is not novelty. It is a faster way to build real business applications without separating speed from the application foundation.
- **Speed without replatforming.** Runtime-managed screens reduce delivery time without moving the team onto a separate application stack.
- **Governance without friction.** Permissions, identity, auditability, and ABP platform foundations stay part of the story from day one.
- **Extensibility without rewrite pressure.** When custom behavior shows up, the same application can be extended instead of replacing the low-code output.
That is the core ABP Low-Code promise: faster delivery, still inside the application model you can extend.
---
## Try it yourself
The public starting point for ABP Low-Code is **ABP Studio**.
![ABP Studio new solution wizard with the Low-Code runtime and designer option enabled](assets/screenshots/abp-studio-lowcode-system.png)
1. Open **ABP Studio** and create a new solution.
2. In the solution wizard, enable **Include Low-Code runtime and designer**.
3. Complete the wizard, then run the generated backend and React UI from the solution.
4. Sign in with the administrator account created for that solution.
5. Open **Admin Console** to define runtime-managed entities, forms, pages, permissions, endpoints, and script actions.
6. Switch to the application side to see those changes resolve live in the running app.
---
## Further reading
- [ABP Low-Code Designer Documentation](https://abp.io/docs/latest/low-code/designer)
- [ABP Low-Code Configuration & Fluent API](https://abp.io/docs/latest/low-code/fluent-api)
- [ABP Low-Code Scripting API](https://abp.io/docs/latest/low-code/scripting-api)
- [ABP Low-Code Script Actions](https://abp.io/docs/latest/low-code/script-actions)
- [ABP Low-Code Interceptors](https://abp.io/docs/latest/low-code/interceptors)
- [ABP Studio Documentation](https://abp.io/docs/latest/studio)
- [Get Started with ABP: Creating a Layered Web Application](https://abp.io/docs/latest/get-started/layered-web-application)

1
docs/en/Community-Articles/2026-07-07-introducing-abp-low-code/summary.md

@ -0,0 +1 @@
Discover how ABP Low-Code blends runtime page building with code-first entities, C# queries, and extensible application logic.

2
docs/en/framework/api-development/auto-controllers.md

@ -62,6 +62,8 @@ ABP uses a naming convention while determining the HTTP method for a service met
If you need to customize HTTP method for a particular method, then you can use one of the standard ASP.NET Core attributes ([HttpPost], [HttpGet], [HttpPut]... etc.). This requires to add [Microsoft.AspNetCore.Mvc.Core](https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.Core) nuget package to your project that contains the service.
The naming convention doesn't map the HTTP QUERY method (a safe method that carries its parameters in the request body, useful when a GET request would have too many query string parameters). If you want to expose an action as a QUERY endpoint, use the `[AcceptVerbs("QUERY")]` attribute explicitly. Such an action is treated as a safe method, so it is not audited and doesn't start a transactional unit of work by default, just like a GET request. However, unlike a GET request, a QUERY request still requires the anti-forgery token because it carries a request body. This is consistent with ASP.NET Core, which doesn't treat QUERY as an anti-forgery exempt method.
### Route
Route is calculated based on some conventions:

4
docs/en/framework/architecture/domain-driven-design/unit-of-work.md

@ -38,10 +38,10 @@ All of these are automatically handled by the ABP.
While the section above explains the UOW as it is database transaction, actually a UOW doesn't have to be transactional. By default;
* **HTTP GET** requests don't start a transactional UOW. They still starts a UOW, but **doesn't create a database transaction**.
* **HTTP GET** and **HTTP QUERY** requests don't start a transactional UOW. They still start a UOW, but **don't create a database transaction**.
* All other HTTP request types start a UOW with a database transaction, if database level transactions are supported by the underlying database provider.
This is because an HTTP GET request doesn't (and shouldn't) make any change in the database. You can change this behavior using the options explained below.
This is because they are safe HTTP methods that don't (and shouldn't) make any change in the database. You can change this behavior using the options explained below.
## Default Options

3
docs/en/framework/infrastructure/artificial-intelligence/index.md

@ -10,6 +10,8 @@ ABP Framework provides integration for AI capabilities to your application by us
ABP introduces a concept called **AI Workspace**. A workspace allows you to configure isolated AI configurations for a named scope. You can then resolve AI services for a specific workspace when you need to use them.
If you want to see AI-assisted delivery used on a real application, take a look at [Hanova & Habitly](../../../samples/index.md#hanova--habitly), which were built with the ABP Studio AI Agent.
> ABP Framework can work with any AI library or framework that supports .NET development. However, the AI integration features explained in the following documents provide a modular and standard way to work with AI, which allows ABP developers to create reusable modules and components with AI capabilities in a standard way.
## Installation
@ -37,4 +39,3 @@ Check the following documentation to learn how to use these libraries with the A
- [ABP Microsoft.Extensions.AI integration](./microsoft-extensions-ai.md)
- [ABP Microsoft.Agents.AI (Agent Framework) integration](./microsoft-agent-framework.md)
- [ABP Microsoft.SemanticKernel integration](./microsoft-semantic-kernel.md)

2
docs/en/framework/infrastructure/audit-logging.md

@ -48,7 +48,7 @@ Here, a list of the options you can configure:
* `IsEnabledForAnonymousUsers` (default: `true`): If you want to write audit logs only for the authenticated users, set this to `false`. If you save audit logs for anonymous users, you will see `null` for `UserId` values for these users.
* `AlwaysLogOnException` (default: `true`): If you set to true, it always saves the audit log on an exception/error case without checking other options (except `IsEnabled`, which completely disables the audit logging).
* `IsEnabledForIntegrationService` (default: `false`): Audit Logging is disabled for [integration services](../api-development/integration-services.md) by default. Set this property as `true` to enable it.
* `IsEnabledForGetRequests` (default: `false`): HTTP GET requests should not make any change in the database normally and audit log system doesn't save audit log objects for GET request. Set this to `true` to enable it also for the GET requests.
* `IsEnabledForGetRequests` (default: `false`): Safe HTTP methods (GET, HEAD and QUERY) should not make any change in the database normally and the audit log system doesn't save audit log objects for these requests. Set this to `true` to enable it also for the safe requests.
* `DisableLogActionInfo` (default: `false`):If you set to true, Will no longer log `AuditLogActionInfo`.
* `ApplicationName`: If multiple applications are saving audit logs into a single database, set this property to your application name, so you can distinguish the logs of different applications. If you don't set, it will set from the `IApplicationInfoAccessor.ApplicationName` value, which is the entry assembly name by default.
* `IgnoredTypes`: A list of `Type`s to be ignored for audit logging. If this is an entity type, changes for this type of entities will not be saved. This list is also used while serializing the action parameters.

69
docs/en/framework/infrastructure/background-jobs/index.md

@ -225,7 +225,7 @@ ABP includes a simple `IBackgroundJobManager` implementation that;
- **Retries** job execution until the job **successfully runs** or **timeouts**. Default timeout is 2 days for a job. Logs all exceptions.
- **Deletes** a job from the store (database) when it's successfully executed. If it's timed out, it sets it as **abandoned** and leaves it in the database.
- **Increasingly waits between retries** for a job. It waits 1 minute for the first retry, 2 minutes for the second retry, 4 minutes for the third retry and so on.
- **Polls** the store for jobs in fixed intervals. It queries jobs, ordering by priority (asc) and then by try count (asc).
- **Polls** the store for jobs in fixed intervals. It queries jobs, ordering by priority (desc) and then by try count (asc).
> `Volo.Abp.BackgroundJobs` nuget package contains the default background job manager and it is installed to the startup templates by default.
@ -248,11 +248,76 @@ public class MyModule : AbpModule
````
* `JobPollPeriod` is used to determine the interval between two job polling operations. Default is 5000 ms (5 seconds).
* `MaxJobFetchCount` is used to determine the maximum job count to fetch in a single polling operation. Default is 1000.
* `MaxJobFetchCount` is used to determine the maximum job count to fetch in a single polling operation. It is also used as the batch size for the retention cleanup deletions. Default is 1000.
* `DefaultFirstWaitDuration` is used to determine the duration to wait before the first retry. Default is 60 seconds.
* `DefaultTimeout` is used to determine the timeout duration for a job. Default is 172800 seconds (2 days).
* `DefaultWaitFactor` is used to determine the factor to increase the wait duration between retries. Default is 2.0.
* `DistributedLockName` is used to determine the distributed lock name to use. Default is `AbpBackgroundJobWorker`.
* `StoreSuccessfulJobs` is used to determine whether to keep successfully completed jobs in the store instead of deleting them. Default is `false`. See the *Storing Successful Jobs* section.
* `SuccessfulJobRetentionTime` is used to determine how long a kept job is retained before the cleanup deletes it. Default is 7 days. Set to `null` to keep completed jobs forever. Only relevant when `StoreSuccessfulJobs` is enabled.
* `CleanSuccessfulJobsPeriod` is used to determine the interval between cleanup runs that delete expired completed jobs. Default is 3600000 ms (1 hour).
* `CleanupDistributedLockName` is used to determine the distributed lock name for the cleanup worker. Default is `AbpBackgroundJobCleanup`.
* `MaxParallelJobExecutionCount` is used to determine the maximum number of jobs a worker executes in parallel within one poll cycle. Default is 1. See the *Parallel Job Execution* section.
* `PerJobDistributedLockPrefix` is used to determine the prefix of the per-job distributed lock name used when `MaxParallelJobExecutionCount` is greater than 1. Default is `AbpBackgroundJob:`.
### Storing Successful Jobs
By default, the background job manager deletes a job from the store as soon as it runs successfully. If you want to keep completed jobs (for auditing or history), enable `StoreSuccessfulJobs`:
````csharp
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.StoreSuccessfulJobs = true;
options.SuccessfulJobRetentionTime = TimeSpan.FromDays(30); //null to keep forever
});
````
When enabled, a successful job is not deleted; instead its `CompletionTime` is set and it stays in the store. Completed jobs are excluded from the waiting jobs query, so they are not executed again. A cleanup worker periodically deletes completed jobs older than `SuccessfulJobRetentionTime`.
> **Note:** The `IBackgroundJobStore` interface has new overloads (a `GetWaitingJobsAsync` overload that takes a job name filter and a `DeleteAsync` overload for cleanup). If you have a custom `IBackgroundJobStore` implementation, you must implement them for your code to compile. The built-in stores already implement them.
### Dedicated Workers per Job Type
By default, a single worker processes all job types. If you want to process certain job types separately (for example, slow or high-volume jobs), you can register dedicated workers, each handling only the specified job argument types with its own distributed lock:
````csharp
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.AddDedicatedWorker<EmailJobArgs, SmsJobArgs>("NotificationWorkerLock");
options.AddDedicatedWorker<ReportJobArgs>("ReportWorkerLock");
});
````
Each dedicated worker processes only its configured job types. An additional default worker is automatically started to process all the remaining job types. In sequential mode, each worker (including the default one) runs independently under its own distributed lock (see *Parallel Job Execution* for how this changes when running jobs in parallel).
If you don't want to specify a lock name, use the overloads without the `lockName` parameter; a stable, length-bounded lock name is then derived from the job argument types:
````csharp
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.AddDedicatedWorker<EmailJobArgs, SmsJobArgs>();
options.AddDedicatedWorker<ReportJobArgs>();
});
````
> **Note:** Each job type can be handled by only one dedicated worker, and each worker must have a unique lock name; `AddDedicatedWorker` throws if this is violated. Dedicated workers require an `IBackgroundJobStore` that can filter jobs by name (the built-in stores can).
### Parallel Job Execution
By default, a worker executes waiting jobs one by one under a single worker-level distributed lock, so only one job runs at a time across all application instances. If you want to execute multiple jobs concurrently, set `MaxParallelJobExecutionCount` to a value greater than 1:
````csharp
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.MaxParallelJobExecutionCount = 4;
});
````
When it is greater than 1, the worker-level lock is not used. Instead, each job is claimed with its own distributed lock, so multiple application instances can execute different jobs at the same time. With a properly configured distributed lock provider, a job is not executed by more than one instance at a time.
`MaxParallelJobExecutionCount` is a per-worker, per-poll-cycle limit — it is not a cluster-wide limit. A worker first fetches up to `MaxJobFetchCount` waiting jobs, then executes up to `MaxParallelJobExecutionCount` of them in parallel, so a single worker runs up to `min(MaxJobFetchCount, MaxParallelJobExecutionCount)` jobs per cycle; keep `MaxJobFetchCount` at least as large as `MaxParallelJobExecutionCount` to avoid capping the parallelism. When you also configure dedicated workers, each worker runs its own timer and claims up to `MaxParallelJobExecutionCount` jobs, so the effective concurrency is up to (number of workers) × `MaxParallelJobExecutionCount` per application instance, and up to (number of application instances) × (number of workers) × `MaxParallelJobExecutionCount` across the whole cluster.
> **Important:** Configure `MaxParallelJobExecutionCount` and `PerJobDistributedLockPrefix` consistently across all application instances. Mixing sequential (worker lock) and parallel (per-job lock) instances removes the common mutual exclusion, and a different prefix produces a different per-job lock name for the same job — either case may let the same job run on more than one instance. As with the sequential mode, configure a real [distributed lock](../distributed-locking.md) provider for clustered deployments.
### Data Store

6
docs/en/framework/ui/angular/quick-start.md

@ -1,19 +1,19 @@
```json
//[doc-seo]
{
"Description": "Learn how to set up your development environment for ABP Angular 21.x with this quick start guide, ensuring a smooth development experience."
"Description": "Learn how to set up your development environment for ABP Angular 22.0.x with this quick start guide, ensuring a smooth development experience."
}
```
# ABP Angular Quick Start
**In this version ABP uses Angular [21.2.x](https://github.com/angular/angular/tree/21.2.x) version. You don't have to install Angular CLI globally**
**In this version ABP uses Angular [22.0.x](https://github.com/angular/angular/tree/22.0.x) version. You don't have to install Angular CLI globally**
## How to Prepare Development Environment
Please follow the steps below to prepare your development environment for Angular.
1. **Install Node.js:** Please visit [Node.js downloads page](https://nodejs.org/en/download/) and download proper Node.js `v20.19+` installer for your OS. An alternative is to install [NVM](https://github.com/nvm-sh/nvm) and use it to have multiple versions of Node.js in your operating system.
1. **Install Node.js:** Please visit [Node.js downloads page](https://nodejs.org/en/download/) and download proper Node.js `^22.22.3 || ^24.15.0 || ^26.0.0` installer for your OS. An alternative is to install [NVM](https://github.com/nvm-sh/nvm) and use it to have multiple versions of Node.js in your operating system.
2. **[Optional] Install Yarn:** You may install Yarn v1.22+ (not v2) following the instructions on [the installation page](https://classic.yarnpkg.com/en/docs/install). Yarn v1 delivers an arguably better developer experience compared to npm v10 and below. You may skip this step and work with npm, which is built-in in Node.js, instead.
3. **[Optional] Install VS Code:** [VS Code](https://code.visualstudio.com/) is a free, open-source IDE which works seamlessly with TypeScript. Although you can use any IDE including Visual Studio or Rider, VS Code will most likely deliver the best developer experience when it comes to Angular projects. ABP project templates even contain plugin recommendations for VS Code users, which VS Code will ask you to install when you open the Angular project folder. Here is a list of recommended extensions:
- [Angular Language Service](https://marketplace.visualstudio.com/items?itemName=angular.ng-template)

116
docs/en/framework/ui/angular/release-notes/angular-22-typescript-6.md

@ -0,0 +1,116 @@
```json
//[doc-seo]
{
"Description": "Upgrade your ABP solutions to Angular version 22.0.x"
}
```
# Release Notes: Angular 22 and TypeScript 6 Upgrade
## Overview
This release updates ABP Angular UI applications to:
* Angular `22.x`
* TypeScript `6.x`
This upgrade aligns ABP projects with the latest Angular ecosystem and provides access to the newest framework improvements while ensuring long-term maintainability and support.
## What's Changed
### 1. Frontend Stack Upgrades
The core frontend stack has been updated:
* `@angular/*` packages have been upgraded to version 22
* `typescript` has been upgraded to version 6
* ABP and ABP Commercial npm packages must be upgraded to the corresponding ABP release line (version 10.6)
### 2. Change Detection Behavior
Angular 22 introduces updated change detection behavior.
* Components without explicit change detection configuration now follow OnPush-style behavior by default
* Some existing pages may no longer update automatically after asynchronous operations
* UI state should be managed using Angular Signals or the `async` pipe where appropriate
### 3. Stricter Type and Template Checks
Angular 22 and TypeScript 6 introduce additional compile-time validations.
* More template and type-related issues may be reported during builds
* Existing assumptions around nullable values and optional properties may require additional guards or type refinements
* Applications with strict template checking enabled may require code updates
### 4. Upload Progress Handling
Applications that rely on file upload progress events may require additional HTTP client configuration.
* Browser-side HTTP configuration may need `withXhr()` enabled to ensure upload progress events are emitted correctly
### 5. Chart Update Behavior
Chart components may require additional updates when used with asynchronous data sources.
* Under OnPush-style change detection, chart updates may not be detected automatically
* Consider using Signals for chart data bindings
* Calling `reinit()` after asynchronous data updates may be necessary in some scenarios
## Required Actions
### 1. Upgrade Related Packages Together
Keep Angular, TypeScript, ABP, and ABP Commercial packages on compatible versions.
To use Angular 22:
* Angular: `22.x`
* TypeScript: `6.x`
* ABP Framework: `10.6.x`
### 2. Review UI State Management
Review pages that depend on asynchronous state updates, including:
* List and table data
* Loading and busy indicators
* Modal dialog state
* Dashboard and chart data
Consider migrating these scenarios to Angular Signals or the `async` pipe.
### 3. Apply a Temporary TypeScript Compatibility Setting (If Needed)
If your project uses `downlevelIteration`, you may temporarily add the following configuration:
```json
{
"ignoreDeprecations": "6.0"
}
```
This can help ease the migration process while addressing TypeScript 6 deprecation warnings.
### 4. Perform Regression Testing
We recommend validating all critical application flows after upgrading, including:
* Authentication and account management pages
* CRUD list and detail pages
* Permission and feature management dialogs
* File upload workflows
* Dashboard and chart components
## Areas to Validate Carefully
Pay particular attention to the following scenarios:
* Busy or loading indicators not updating correctly
* Modal open/close state inconsistencies
* List pages not refreshing after asynchronous operations
* Upload progress events not being emitted
* Charts rendering without data after API responses
## References
* Detailed migration guide: [Upgrade ABP to 10.6](../../../../release-info/migration-guides/abp-10-6-angular-22.md)

2
docs/en/framework/ui/react-native/index.md

@ -69,6 +69,8 @@ abp new MyCompanyName.MyProjectName -csf -u <angular or mvc> -m react-native
This command creates a solution containing an **Angular** or **MVC** project (depending on your choice), a **.NET Core** project, and a **React Native** project.
If you want to see the modern React Native template as a finished product, the [Habitly sample](../../../samples/index.md#hanova--habitly) is a good reference point.
## Run the Application
You can choose how you want to run the mobile app:

2
docs/en/modules/background-jobs.md

@ -33,6 +33,8 @@ Following custom repositories are defined for this module:
- `IBackgroundJobRepository`
> `IBackgroundJobRepository` supports filtering the waiting jobs for dedicated workers and cleaning up retained completed jobs. See the *Dedicated Workers per Job Type* and *Storing Successful Jobs* sections of the [background jobs](../framework/infrastructure/background-jobs) document.
### Database providers
#### Common

7
docs/en/package-version-changes.md

@ -64,6 +64,7 @@
| Microsoft.IdentityModel.JsonWebTokens | 8.16.0 | 8.19.1 | #25706 |
| Microsoft.IdentityModel.Protocols.OpenIdConnect | 8.16.0 | 8.19.1 | #25706 |
| Microsoft.IdentityModel.Tokens | 8.16.0 | 8.19.1 | #25706 |
| MongoDB.Driver | 3.9.0 | 3.10.0 | #25773 |
| System.Collections.Immutable | 10.0.7 | 10.0.9 | #25706 |
| System.IdentityModel.Tokens.Jwt | 8.16.0 | 8.19.1 | #25706 |
| System.Management | 10.0.7 | 10.0.9 | #25706 |
@ -73,6 +74,12 @@
| System.Text.Encodings.Web | 10.0.7 | 10.0.9 | #25706 |
| System.Text.Json | 10.0.7 | 10.0.9 | #25706 |
## 10.5.1
| Package | Old Version | New Version | PR |
|---------|-------------|-------------|-----|
| Swashbuckle.AspNetCore | 10.0.1 | 10.2.3 | #25759 |
## 10.5.0-rc.4
| Package | Old Version | New Version | PR |

193
docs/en/release-info/migration-guides/abp-10-6-angular-22.md

@ -0,0 +1,193 @@
```json
//[doc-seo]
{
"Description": "Upgrade your ABP solutions to Angular version 22.0.x"
}
```
# Angular 22 and ABP 10.6 Upgrade Guide
This guide explains how to upgrade ABP Angular applications to **Angular 22** and **TypeScript 6**.
## 1. Target Versions
Update all frontend dependencies together to maintain compatibility:
- `@angular/*` → `~22.0.0`
- `typescript` → `~6.0.0`
- `@abp/*` → corresponding ABP version (10.6)
- `@volo/*`, `@volosoft/*` (if applicable) → corresponding ABP version (10.6)
- `angular-oauth2-oidc` (if applicable) → `~22.0.0`
Avoid mixing Angular 21 and Angular 22 packages within the same workspace.
## 2. Prerequisites
Before starting the upgrade:
1. Use a Node.js version supported by Angular 22.
2. Ensure your backend ABP version is compatible with the frontend package versions you plan to install.
3. Commit or back up your current project state.
## 3. Upgrade Process
1. Update package versions in `package.json`.
2. Run the Angular or Nx migration commands applicable to your project.
3. Remove existing installation artifacts:
- Delete `node_modules`
- Delete the lock file (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`)
4. Reinstall all dependencies.
5. Build the application and resolve any compilation or template errors.
## 4. Required Changes
### 4.1 TypeScript 6 Deprecation Handling
Projects that still use `downlevelIteration: true` may encounter TypeScript 6 deprecation diagnostics.
Add the following temporary setting to your root `tsconfig` file (and library production configurations if required):
```json
{
"compilerOptions": {
"downlevelIteration": true,
"ignoreDeprecations": "6.0"
}
}
```
As a long-term solution, remove `downlevelIteration` when your target runtime environment no longer requires it.
### 4.2 Updated Change Detection Behavior
Angular 22 introduces updated change detection behavior for components that do not explicitly configure a change detection strategy.
Common symptoms include:
- Loading indicators not updating
- Modal busy states not clearing
- Lists or charts not refreshing after asynchronous operations
Recommended approaches:
1. Use `signal()` for component state.
2. Use `toSignal()` when consuming observable streams.
3. Use the `async` pipe for observable-based UI state.
4. Use `ChangeDetectionStrategy.Eager` only as a temporary compatibility measure for legacy components.
### 4.3 ABP List Pages (`ListService`)
When working with `ListService`, prefer converting observable results to signals instead of manually subscribing.
```typescript
readonly data = toSignal(
this.list.hookToQuery(query => this.service.getList(query)),
{ initialValue: { items: [], totalCount: 0 } },
);
```
Update template bindings accordingly:
- `data.items` → `data().items`
- `data.totalCount` → `data().totalCount`
### 4.4 Modals and Loading States
For components such as `abp-modal`, `abp-button`, and permission or feature management dialogs, maintain state using signals.
```typescript
readonly isModalVisible = signal(false);
readonly modalBusy = signal(false);
```
```html
<abp-button [loading]="modalBusy()" />
<abp-modal
[visible]="isModalVisible()"
(visibleChange)="isModalVisible.set($event)"
[busy]="modalBusy()"
/>
```
If you use `*abpReplaceableTemplate`, pass signal values through `inputs.value` and update state through the corresponding event callbacks.
### 4.5 Template Type Checking
Angular 22 enables `strictTemplates` by default.
Resolve template typing issues where possible, or temporarily disable strict template checking:
```json
{
"angularCompilerOptions": {
"strictTemplates": false
}
}
```
Common adjustments include:
- Updating optional chaining (`?.`) and null coalescing (`??`) usage
- Guarding optional form references before binding
- Resolving duplicate input or output bindings
### 4.6 Upload Progress Events
Applications that rely on upload progress events should include the XHR backend in browser-side HTTP configuration:
```typescript
provideHttpClient(withFetch(), withXhr());
```
Do not enable the XHR backend in server-side rendering (SSR) bootstrap code.
### 4.7 Chart Components (`abp-chart`)
If charts do not update after asynchronous data loading:
- Store chart data in a signal
- Bind chart inputs using signal values (for example, `[data]="chartData()"`)
- Call `reinit()` after assigning new data rather than relying solely on `refresh()`
## 5. Custom or Forked UI Modules
If your project contains customized copies of ABP modules such as Identity, Tenant Management, Account, or CMS Kit:
1. Compare your implementation with the updated package versions.
2. Apply the recommended signal-based state management patterns.
3. Re-test CRUD pages, permission dialogs, feature dialogs, and account-related workflows.
## 6. Validation Checklist
After completing the upgrade, verify that:
- Dependencies are installed correctly without duplicate Angular versions
- The application builds successfully
- Unit tests pass (if applicable)
- Login, registration, and password recovery workflows function correctly
- CRUD list pages refresh as expected
- Modal loading and busy states behave correctly
- Permission and feature dialogs open and close correctly
- Upload progress events work as expected (if applicable)
- Dashboard charts render correctly after data is loaded
## 7. Troubleshooting
| Symptom | Likely Cause | Resolution |
| ----------------------------------------------------------------- | ----------------------------------------- | ----------------------------------------------------------- |
| Form type conflicts (`AbstractControl`, etc.) | Multiple Angular versions installed | Align package versions and perform a clean reinstall |
| TypeScript deprecation errors related to `downlevelIteration` | TypeScript 6 diagnostics | Add `ignoreDeprecations: "6.0"` temporarily |
| Errors involving optional configuration or environment properties | Stricter type checking | Add null checks and optional chaining where appropriate |
| DTO or library compilation issues | Type incompatibilities in DTO definitions | Prefer interfaces and optional properties where appropriate |
| Upload progress events are not emitted | Missing XHR backend configuration | Add `withXhr()` to browser-side HTTP configuration |
| Charts remain empty after data loads | State changes are not being detected | Use signals and call `reinit()` after updating chart data |
## 8. Summary
When upgrading to Angular 22, focus on the following areas:
1. Upgrade Angular, TypeScript, ABP, and commercial packages together.
2. Update UI state management to use signals, `toSignal()`, or the `async` pipe where appropriate.
3. Resolve TypeScript 6 and template type-checking issues.
4. Validate critical application workflows, including modals, list pages, uploads, and chart components.

237
docs/en/release-info/migration-guides/abp-10-6.md

@ -0,0 +1,237 @@
```json
//[doc-seo]
{
"Description": "Upgrade your ABP solutions from v10.5 to v10.6 with this migration guide covering important behavior and integration changes."
}
```
# ABP Version 10.6 Migration Guide
This document is a guide for upgrading ABP v10.5 solutions to ABP v10.6. There are some important changes that may require action in specific application scenarios.
> **Package Version Changes:** Before upgrading, review the [Package Version Changes](../../package-version-changes.md) document to see version changes on dependent NuGet and NPM packages and align your project with ABP's internal package versions.
## Open-Source (Framework)
This version contains the following changes on the open-source side:
### Background Jobs Infrastructure Extensions
**Who is affected**
- Applications using the default background job worker and wanting dedicated workers, parallel execution, or successful job retention.
- Applications with a custom `IBackgroundJobStore` implementation.
- Applications using the Background Jobs module with EF Core and enabling successful job retention.
**What changed**
- ABP adds opt-in support for:
- storing successfully completed jobs (`StoreSuccessfulJobs`)
- dedicated workers per job argument type (`AddDedicatedWorker(...)`)
- parallel job execution (`MaxParallelJobExecutionCount`)
- `IBackgroundJobStore`, `IBackgroundJobWorker`, and related infrastructure gained new members.
- EF Core stores add a `CompletionTime` column to background job records for retention scenarios.
- All new runtime features are disabled by default.
**What to do**
No action is required if you do not enable the new options and do not maintain a custom background job store.
If you maintain a custom `IBackgroundJobStore`, implement the new interface members so your solution compiles.
If you enable `StoreSuccessfulJobs`, add/review the EF Core migration for the `CompletionTime` column and configure retention options explicitly:
```csharp
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.StoreSuccessfulJobs = true;
options.SuccessfulJobRetentionTime = TimeSpan.FromDays(7);
});
```
If you enable dedicated workers or parallel execution, configure the options consistently across all application instances and use a real distributed lock provider in clustered deployments.
> See the [Background Jobs](../../framework/infrastructure/background-jobs/index.md) document and [#25742](https://github.com/abpframework/abp/pull/25742) for details.
### API Definition and Proxy Generation for Uploads and Content Types
**Who is affected**
- Applications using generated Angular, jQuery, or C# proxies for upload endpoints.
- Applications returning non-JSON response types from application services.
- Applications that customized generated upload proxy signatures.
**What changed**
- API definition now exposes response `ContentTypes` and `IsRemoteStream`.
- Generated Angular and jQuery proxies forward upload DTOs containing `IRemoteStreamContent` as multipart `FormData`.
- Generated Angular upload method signatures may collapse the upload argument to `FormData`.
- `RestService` now unwraps ABP error envelopes more consistently for text and blob response modes.
**What to do**
- Keep upload DTO types in `FormBodyBindingIgnoredTypes` as before.
- Regenerate client proxies after upgrading.
- Update custom client code that assumed upload proxies accepted the original DTO type instead of `FormData`.
- Re-test file upload flows in Angular, MVC/jQuery, and C# client integrations.
> See [#25639](https://github.com/abpframework/abp/pull/25639) for details.
### Angular 22 Upgrade
**Who is affected**
- Applications using the ABP Angular UI.
- Applications with custom Angular code, third-party Angular libraries, or CI pipelines pinned to Angular 21.
**What changed**
- ABP Angular packages and templates now target **Angular 22.0.x**.
- Locale loading was improved with a fallback mechanism for missing or partial locale resources.
**What to do**
- Upgrade your Angular application dependencies together with ABP NPM packages.
- Follow the official Angular update guidance for your current Angular version.
- Re-run UI tests and rebuild custom Angular libraries after the upgrade.
- Regenerate Angular proxies after upgrading backend packages.
> See [#25690](https://github.com/abpframework/abp/pull/25690) and [#25734](https://github.com/abpframework/abp/pull/25734) for details.
### Antiforgery User Id Claim Issuer Normalization
**Who is affected**
- Applications that serve a token-authenticated SPA and cookie-authenticated MVC/Razor Pages on the same origin.
- Applications using Razor Pages modules such as Setting Management with antiforgery-protected POST handlers.
**What changed**
- ABP normalizes the user id claim issuer while generating and validating antiforgery tokens.
- Razor Pages now use ABP's antiforgery validation path instead of only the built-in ASP.NET Core filter.
- The behavior is enabled by default through `AbpAntiForgeryOptions.NormalizeUserIdClaimIssuer`.
**What to do**
- Re-test SPA + MVC mixed authentication flows, especially pages that POST immediately on load.
- If you implemented custom antiforgery logic that depends on the raw claim issuer, review it after upgrading.
- Disable the behavior only if you intentionally rely on the previous issuer-specific antiforgery identity:
```csharp
Configure<AbpAntiForgeryOptions>(options =>
{
options.NormalizeUserIdClaimIssuer = false;
});
```
> See [#25655](https://github.com/abpframework/abp/pull/25655) and [#25669](https://github.com/abpframework/abp/pull/25669) for details.
### OpenIddict Interactive Cookie `client_id` Fix
**Who is affected**
- Applications using OpenIddict authorization-code flows together with interactive cookie authentication.
- Applications relying on audit logs or current-client resolution from cookie-authenticated requests.
**What changed**
- ABP removes `client_id` from the interactive authentication cookie when the cookie principal is refreshed.
- Access tokens are unaffected.
- Cookies that were already corrupted self-heal on the next refresh.
**What to do**
No action is required. Re-test authorization, account, and audit-log scenarios if you previously observed intermittent incorrect `ClientId` values in cookie-authenticated requests.
> See [#25711](https://github.com/abpframework/abp/pull/25711) for details.
### Access Token Forwarding for Authenticated Client Requests
**Who is affected**
- Applications using `HttpContextAbpAccessTokenProvider`.
- Machine-to-machine integrations that authenticate with `client_credentials` and then call other protected APIs from the same request pipeline.
**What changed**
- The provider now forwards the incoming access token whenever the request is authenticated, not only when there is an interactive user.
- `client_credentials` requests no longer fall back to configured identity clients in that scenario.
**What to do**
- Re-test service-to-service calls that rely on the current HTTP context access token.
- Verify downstream API authorization when the caller authenticates as a client rather than a user.
> See [#25740](https://github.com/abpframework/abp/pull/25740) for details.
### Thread Current Principal Accessor Behavior
**Who is affected**
- Background jobs, hosted services, and other non-web code that reads `ICurrentPrincipalAccessor.Principal`.
- Code that explicitly checks for `null` principals in non-web contexts.
**What changed**
- `ThreadCurrentPrincipalAccessor` now returns an anonymous `ClaimsPrincipal` instead of `null` when `Thread.CurrentPrincipal` is not set.
**What to do**
- Re-test background jobs and hosted services that branch on `Principal == null`.
- Prefer checking authentication/identity state through claims or ABP's current user/client abstractions instead of relying on a `null` principal.
> See [#25752](https://github.com/abpframework/abp/pull/25752) for details.
### Dependency Updates
**Who is affected**
- Applications that pin ABP transitive dependencies directly.
- Applications using `Microsoft.Data.SqlClient`, Swashbuckle, or Angular with fixed versions.
**What changed**
- `Microsoft.*` and `System.*` packages were upgraded to **10.0.9**.
- `Microsoft.Data.SqlClient` was upgraded to **7.0.2**.
- `Swashbuckle.AspNetCore` was upgraded to **10.2.3**.
- ABP Angular packages were upgraded to **Angular 22.0.x**.
**What to do**
- Review your direct package references and align them with ABP's package versions where needed.
- Rebuild and run database/integration tests if you directly use `Microsoft.Data.SqlClient`.
- Re-test Swagger/OpenAPI integration if you customized Swashbuckle configuration.
## Pro
There are no explicitly marked breaking changes on the PRO side in this release scope. However, check the following if they apply to your application.
### OpenIddict Generate Access Token UI
**Who is affected**
- Applications using OpenIddict application management UIs in ABP Commercial.
**What changed**
- Administrators can generate access tokens for OpenIddict applications from MVC, Blazor, MudBlazor, and Angular UIs.
- The backend forwards `client_credentials` requests to `/connect/token`.
**What to do**
- Re-test OpenIddict application administration pages after upgrading.
- Review who can access the new token-generation action in your authorization setup.
### AI Management Indexing Resilience
**Who is affected**
- Applications using the AI Management module with document indexing enabled.
**What changed**
- Indexing is more resilient under memory pressure.
**What to do**
- Re-test document indexing on large datasets or memory-constrained environments after upgrading.

1
docs/en/release-info/migration-guides/index.md

@ -9,6 +9,7 @@
The following documents explain how to migrate your existing ABP applications. We write migration documents only if you need to take an action while upgrading your solution. Otherwise, you can easily upgrade your solution using the [abp update command](../upgrading.md).
- [10.5 to 10.6](abp-10-6.md)
- [10.4 to 10.5](abp-10-5.md)
- [10.3 to 10.4](abp-10-4.md)
- [10.x to 10.3](abp-10-3.md)

21
docs/en/release-info/release-notes.md

@ -1,7 +1,7 @@
```json
//[doc-seo]
{
"Description": "Explore the latest ABP Framework release notes, highlighting major features and enhancements for each version, including migration guidance."
"Description": "Explore the latest ABP Framework release notes, highlighting major features and enhancements for each version, including migration guidance."
}
```
@ -14,9 +14,19 @@ Also see the following notes about ABP releases:
- [ABP Studio release notes](../studio/release-notes.md)
- [Change logs for ABP pro packages](https://abp.io/pro-releases)
## 10.6 (2026-07-07)
See the detailed **[blog post / announcement](https://abp.io/community/announcements/announcing-abp-10-6-release-candidate-reoq6kzw)** for the v10.6 release.
- Background Jobs: Dedicated Workers, Parallel Execution, and Successful Job Retention
- API Definition and Proxy Improvements for Content Types and Multipart Uploads
- Angular UI: Angular has been upgraded to version 22. For a complete list of changes, including breaking changes, migration steps, and package updates, see the **[Angular Release Notes for v10.6](./../framework/ui/angular/release-notes/angular-22-typescript-6.md)**.
- Antiforgery and OpenIddict Security Improvements
- OpenIddict: Generate Access Token from the UI
## 10.5 (2026-06-30)
See the detailed **[blog post / announcement](https://abp.io/community/articles/announcing-abp-10-5-release-candidate-k6oxdfle)** for the v10.5 release.
See the detailed **[blog post / announcement](https://abp.io/community/announcements/announcing-abp-10-5-stable-release-2u589bsc)** for the v10.5 release.
- S3-Compatible Blob Storage Support
- OpenIddict: Default Scope Fallback Options
@ -46,7 +56,7 @@ See the detailed **[blog post / announcement](https://abp.io/community/announcem
- Event Bus: String-Based Event Publishing with Dynamic Payload
- Background Jobs/Workers: String-Based Publishing with Dynamic Payload
- API Definition Endpoint: Descriptions and Documentation Support
- Entity Cache: New Batch APIs (`FindMany`* / `GetMany*`)
- Entity Cache: New Batch APIs (`FindMany`_ / `GetMany_`)
- Angular: User/Tenant Sharing and Tenant Switch Experience
- Angular: Upgrade to 21.2 + TypeScript 5.9
- Introducing the `Volo.Abp.LuckyPenny.AutoMapper` Provider
@ -457,7 +467,7 @@ See the detailed **blog post / announcement** for the v2.8 release: [https://abp
## 2.7 (2020-05-07)
See the detailed **blog post / announcement** for the v2.7 release: [https://abp.io/blog/ABP-Framework-v2_7_0-Has-Been-Released](https://abp.io/blog/ABP-Framework-v2_7_0-Has-Been-Released)
See the detailed **blog post / announcement** for the v2.7 release: [https://abp.io/blog/ABP-Framework-v2_7_0-Has-Been-Released](https://abp.io/blog/ABP-Framework-v2_7_0-Has-Been-Released)
- New module: **Text template management** (with angular and mvc UI - document is [coming](../modules/text-template-management.md)).
- **Dynamically add properties** to current entities of the depended modules (see [module entity extensions](../framework/architecture/modularity/extending/module-entity-extensions.md))
@ -468,9 +478,8 @@ See the detailed **blog post / announcement** for the v2.7 release: [https://ab
- **Optimize database migrations** & seed code for multi-tenant multi-database systems.
- ABP Suite: Make **menu item active** on navigation menu when selected.
- ABP Suite: Improve **enum usage** while creating new entities.
- Bug fixes in the [Lepton Theme](https://abp.io/themes), [ABP Suite](https://abp.io/tools/suite) and other modules.
- Bug fixes in the [Lepton Theme](https://abp.io/themes), [ABP Suite](https://abp.io/tools/suite) and other modules.
## See Also
- [Road map](road-map.md)

70
docs/en/release-info/road-map.md

@ -1,7 +1,7 @@
```json
//[doc-seo]
{
"Description": "Explore the ABP Platform Road Map for insights on upcoming features, release schedules, and improvements in version 10.5, planned for June 2026."
"Description": "Explore the ABP Platform Road Map for insights on upcoming features, release schedules, and improvements in version 10.7, planned for August 2026."
}
```
@ -11,28 +11,29 @@ This document provides a road map, release schedule, and planned features for th
## Next Versions
### v10.6
### v10.7
The next planned version will be 10.6, which is scheduled to be released as a stable version in July 2026. We will be mostly working on the following topics:
The next planned version will be 10.7, which is scheduled to be released as a stable version in August 2026. Based on the currently open issues and pull requests across the ABP ecosystem, we will be mostly working on the following topics:
* Framework
* Token verification improvements with refresh token support and distributed locking
* Angular UI fixes and proxy generation improvements
* Better handling for extra properties, object mapping and auditing edge cases
* Hybrid UI / page embedding infrastructure
* Upgrading 3rd-party dependencies and evaluating replacements where needed
* General bug fixing and improvements in core framework packages
* Cookie authentication: refresh token support and distributed locking ([#25011](https://github.com/abpframework/abp/issues/25011))
* jQuery 4.x upgrade, or removing jQuery as a dependency ([#25123](https://github.com/abpframework/abp/issues/25123))
* AI agent skills distributed as versioned plugins ([#25712](https://github.com/abpframework/abp/issues/25712))
* Hybrid UI / page embedding infrastructure ([#23102](https://github.com/abpframework/abp/issues/23102), [#23161](https://github.com/abpframework/abp/issues/23161))
* Microsoft Agent Framework migration and native agent skills support ([#24310](https://github.com/abpframework/abp/issues/24310), [#25194](https://github.com/abpframework/abp/issues/25194))
* Better ExtraProperties mapping for EF Core ([#23546](https://github.com/abpframework/abp/issues/23546))
* Upgrading 3rd-party dependencies and general bug fixing in core framework packages
* ABP Suite
* Improvements on generated codes for nullability
* Improvements on master-detail page design (making it more compact)
* Replace the templating system with Scriban while preserving backward compatibility
* Support for additional property types like `DateTimeOffset`, `TimeSpan` and numeric enums
* Display names and ordering for properties and navigation properties
* Filter on inherited properties and namespace-based UI foldering
* Low-Code system integration
* Better support for additional property types like `DateTimeOffset`, `TimeSpan` and numeric enum scenarios
* Improvements for generated file upload, navigation property and display-name experiences
* Improvements on generated code nullability, master-detail pages and file upload experiences
* ABP Studio
* AI Coding Agent and MCP integration
* Modern solution wizard improvements and low-code support
* Low-Code platform integration
* Theme Builder: live preview, project integration and import/export
* Linux support and packaging improvements
* Better React / React Native / Thin UI template experience
@ -41,11 +42,12 @@ The next planned version will be 10.6, which is scheduled to be released as a st
* Terminal, browser and built-in developer productivity enhancements
* Application Modules
* AI Management: chat history, multi-tenancy and tenant-scoped workspace capabilities
* AI Management: chat history
* AI Management: multi-tenancy and tenant-scoped workspace capabilities
* RAG: Cloudflare `/crawl` endpoint as a data source
* New module: Chat with your data
* Low-Code designer and low-code platform integrations
* CMS Kit and public website improvements
* Payment module e-mail notification improvements
* CMS Kit and public website improvements
* UI/UX improvements on existing application modules
* Updating existing tutorials & documents (with other UI & DB options)
@ -61,42 +63,46 @@ The *Next Versions* section above shows the main focus of the planned versions.
The ABP framework is [open source](https://github.com/abpframework/abp) and free for everyone. You can see its [public backlog](https://github.com/abpframework/abp/milestone/2). Here are some of the selected backlog items and longer-term topics:
* [#23102](https://github.com/abpframework/abp/issues/23102) / ABP Hybrid UI System: Re-using module UIs in different technologies
* [#23161](https://github.com/abpframework/abp/issues/23161) / Page Embedding Feature (aka Hybrid UI)
* [#25123](https://github.com/abpframework/abp/issues/25123) / Upgrade jQuery to 4.x, or consider removing it as dependency
* [#24742](https://github.com/abpframework/abp/issues/24742) / Add Support for LiteDB as a Database Provider
* [#24442](https://github.com/abpframework/abp/issues/24442) / Add Couchbase EF Core Provider Integration
* [#17093](https://github.com/abpframework/abp/issues/17093) / MVC UI: decouple jQuery
* [#24310](https://github.com/abpframework/abp/issues/24310) / Migrate Volo.Abp.AI Semantic Kernel to Microsoft Agent Framework
* [#25194](https://github.com/abpframework/abp/issues/25194) / Integrate Microsoft.Agents.AI for native Agent Skills support
* [#23575](https://github.com/abpframework/abp/issues/23575) / Support list/enumerable of complex types for ABP dynamic/static C# proxies on GET requests
* [#23546](https://github.com/abpframework/abp/issues/23546) / Better ExtraProperties mapping for EF Core
* [#23935](https://github.com/abpframework/abp/issues/23935) / Hybrid Cache Support for EntityCache
* [#22931](https://github.com/abpframework/abp/issues/22931) / Angular - Support dynamic URLs for breadcrumbs
* [#25032](https://github.com/abpframework/abp/issues/25032) / Guidance and infrastructure considerations for gRPC-based scenarios
* [#2882](https://github.com/abpframework/abp/issues/2882) / Providing a gRPC integration infrastructure
* [#57](https://github.com/abpframework/abp/issues/57) / Built-in CQRS infrastructure
* [#24742](https://github.com/abpframework/abp/issues/24742) / Add Support for LiteDB as a Database Provider
* [#24442](https://github.com/abpframework/abp/issues/24442) / Add Couchbase EF Core Provider Integration
* [#2882](https://github.com/abpframework/abp/issues/2882) / ABP gRPC Integration
* [#57](https://github.com/abpframework/abp/issues/57) / CQRS infrastructure
* [#58](https://github.com/abpframework/abp/issues/58) / Content localization system (multilingual entities)
* [#4223](https://github.com/abpframework/abp/issues/4223) / WebHook system
* [#162](https://github.com/abpframework/abp/issues/162) / Azure ElasticDB integration for multitenancy
* [#2296](https://github.com/abpframework/abp/issues/2296) / Feature toggling infrastructure
* [#4223](https://github.com/abpframework/abp/issues/4223) / WebHook System
* [#162](https://github.com/abpframework/abp/issues/162) / Azure ElasticDB Integration for multitenancy
* [#2296](https://github.com/abpframework/abp/issues/2296) / Implementing Feature Toggle
* [#15932](https://github.com/abpframework/abp/issues/15932) / Introduce ABP Diagnostics Module
* [#16744](https://github.com/abpframework/abp/issues/16744) / State Management API
* [#119](https://github.com/abpframework/abp/issues/119) / REST API versioning improvements
* [#2087](https://github.com/abpframework/abp/issues/2087) / RavenDB database support
* [#119](https://github.com/abpframework/abp/issues/119) / REST API Versioning Improvements
* [#2087](https://github.com/abpframework/abp/issues/2087) / Add RavenDB Database support
### Application Modules / UI Themes
ABP Platform provides many (free and commercial) [pre-built application modules](../modules/index.md) and modern [UI themes](../ui-themes/index.md). In every release, many enhancements and bugfixes are delivered for these modules and themes. Important backlog topics currently include:
* AI Management module: chat history, multi-tenancy, tenant workspaces and operational hardening
* CMS Kit module: media gallery and richer public website capabilities
* New module: Chat with your data
* RAG with external data sources such as website crawling
* Payment module: richer notifications and invoice-oriented scenarios
* CMS Kit: Meta information for SEO
* Audit logging UI: filter redesign and UX improvements
* Identity Pro: richer filtering and organization-unit UX improvements
* LeptonX and existing UIs: new layouts, styles and usability refinements
* New module ideas: Chat with your data, AI Search, user notification and dynamic dashboard
### ABP Studio
[ABP Studio](../studio/index.md) is a cross-platform desktop application for ABP and .NET developers to simplify and automate daily tasks of developers. It has a community (free) edition as well as commercial capabilities. Here are some of the important planned features and active backlog topics for the next ABP Studio versions:
* Low-Code: ABP Studio Integration
* Theme builder for LeptonX, including live preview, management UI and project integration
* Analyze user solutions to explore entities, domain services, application services, pages and other fundamental objects
* AI agent/browser capabilities and developer-assistant experiences
@ -107,16 +113,14 @@ ABP Platform provides many (free and commercial) [pre-built application modules]
* More options while creating new solutions, modules and services
* Better environment-variable, deployment and Kubernetes experiences
* Compare changes on startup templates when a new ABP version is published
* Rapid application development and low-code oriented features
* ABP support integration and better diagnostics/error experiences
### ABP Suite
[ABP Suite](../suite/index.md) is a GUI application that is mainly used to generate CRUD-style pages in your application. You define your entity and it can generate all the code from the database to the UI. Here are some of the important planned features for the next ABP Suite versions:
* Replace the current templating system with Scriban while preserving backward compatibility
* Better nullability support in generated code
* MudBlazor support
* Replacing the current templating system with a text engine while preserving backward compatibility
* Support for additional property types like `DateTimeOffset` and `TimeSpan`
* Handle image properties for entities (in addition to file properties, which are already supported)
* Allow to define display names and better ordering for properties and navigation properties

74
docs/en/samples/index.md

@ -1,7 +1,7 @@
```json
//[doc-seo]
{
"Description": "Explore a variety of ABP Framework samples, complete with live demos, source code, and tutorials to enhance your development skills!"
"Description": "Explore a variety of ABP Framework samples, complete with live demos, source code, and tutorials to enhance your development skills!"
}
```
@ -13,8 +13,8 @@ This document provides a list of samples built with ABP. Each sample is briefly
A reference application built with ABP. It implements the Domain Driven Design with multiple application layers.
* [Live demo](https://www.openeventhub.com/)
* [Source code](https://github.com/abpframework/eventhub)
- [Live demo](https://www.openeventhub.com/)
- [Source code](https://github.com/abpframework/eventhub)
![samples-event-hub](../images/samples-eventhub.png)
@ -25,7 +25,7 @@ A reference application built with ABP. It implements the Domain Driven Design w
Reference microservice solution built with ABP and .NET.
* [Source code](https://github.com/abpframework/eShopOnAbp)
- [Source code](https://github.com/abpframework/eShopOnAbp)
![eshoponabp](../images/samples-eshoponabp.png)
@ -33,8 +33,8 @@ Reference microservice solution built with ABP and .NET.
A minimal example website built with the [CMS Kit module](../modules/cms-kit/index.md).
* [Live demo](https://cms-kit-demo.abpdemo.com/)
* [Source code](https://github.com/abpframework/cms-kit-demo)
- [Live demo](https://cms-kit-demo.abpdemo.com/)
- [Source code](https://github.com/abpframework/cms-kit-demo)
![samples-cms-kit](../images/samples-cms-kit.png)
@ -42,8 +42,8 @@ A minimal example website built with the [CMS Kit module](../modules/cms-kit/ind
A middle-size CRM application built with ABP.
* [Live demo](http://easycrm.abp.io/)
* [Click here](easy-crm.md) to see the details and download the source code.
- [Live demo](http://easycrm.abp.io/)
- [Click here](easy-crm.md) to see the details and download the source code.
![samples-easy-crm](../images/samples-easycrm.png)
@ -51,20 +51,20 @@ A middle-size CRM application built with ABP.
A simple CRUD application to show basic principles of developing an application with ABP. The same sample was implemented with different technologies and different modules:
* **Book Store: Razor Pages UI & Entity Framework Core**
* [Tutorial](../tutorials/book-store/part-01.md?UI=MVC&DB=EF)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Download source code (with PRO modules) *](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-mvc-ef)
* **Book Store: Blazor UI & Entity Framework Core**
* [Tutorial](../tutorials/book-store/part-01.md?UI=Blazor&DB=EF)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Download source code (with PRO modules) *](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-blazor-efcore)
* **Book Store: Angular UI & MongoDB**
* [Tutorial](../tutorials/book-store/part-01.md?UI=NG&DB=Mongo)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)
* [Download source code (with PRO modules) *](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-angular-mongodb)
* **Book Store: Modular application (Razor Pages UI & EF Core)**
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Modular)
- **Book Store: Razor Pages UI & Entity Framework Core**
- [Tutorial](../tutorials/book-store/part-01.md?UI=MVC&DB=EF)
- [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
- [Download source code (with PRO modules) \*](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-mvc-ef)
- **Book Store: Blazor UI & Entity Framework Core**
- [Tutorial](../tutorials/book-store/part-01.md?UI=Blazor&DB=EF)
- [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
- [Download source code (with PRO modules) \*](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-blazor-efcore)
- **Book Store: Angular UI & MongoDB**
- [Tutorial](../tutorials/book-store/part-01.md?UI=NG&DB=Mongo)
- [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)
- [Download source code (with PRO modules) \*](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-angular-mongodb)
- **Book Store: Modular application (Razor Pages UI & EF Core)**
- [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Modular)
If you want to create the BookStore application and generate CRUD pages automatically with ABP Suite, please refer to the [Book Store Application (with ABP Suite) tutorial](../tutorials/book-store-with-abp-suite/part-01.md). Also, you can follow the [Mobile Application Development Tutorials](../tutorials/mobile/index.md), if you want to implement the CRUD operations for [MAUI](../tutorials/mobile/maui/index.md) & [React Native](../tutorials/mobile/react-native/index.md) mobile applications.
@ -74,9 +74,9 @@ If you want to create the BookStore application and generate CRUD pages automati
A modular monolith application that demonstrates how to create, compose, and communicate between application modules to build a modular web application:
* **ModularCRM: Razor Pages UI & Entity Framework Core**
* [Tutorial](../tutorials/modular-crm/part-01.md?UI=MVC&DB=EF)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/ModularCRM)
- **ModularCRM: Razor Pages UI & Entity Framework Core**
- [Tutorial](../tutorials/modular-crm/part-01.md?UI=MVC&DB=EF)
- [Source code](https://github.com/abpframework/abp-samples/tree/master/ModularCRM)
## CloudCrm
@ -84,13 +84,27 @@ A modular monolith application that demonstrates how to create, compose, and com
A microservice solution that shows how to start a new microservice solution, create services and communicate between these services. It's a reference tutorial to learn to use these services from a web application through an API gateway and automatically generate CRUD pages using the ABP Suite tool:
* **CloudCRM: Razor Pages UI & Entity Framework Core**
* [Tutorial](../tutorials/microservice/part-01.md?UI=MVC&DB=EF)
* [Download source code](https://abp.io/api/download/samples/cloud-crm-mvc-ef)
- **CloudCRM: Razor Pages UI & Entity Framework Core**
- [Tutorial](../tutorials/microservice/part-01.md?UI=MVC&DB=EF)
- [Download source code](https://abp.io/api/download/samples/cloud-crm-mvc-ef)
## Hanova & Habitly
> This sample application is available exclusively to users with an [ABP Business license or higher](https://abp.io/pricing).
Hanova and Habitly are production-ready sample applications generated from the ABP Studio templates using React and React Native. Their features were built using the [ABP Studio AI Agent](https://abp.io/docs/latest/studio/ai-agent), demonstrating how AI can accelerate the development of real-world applications.
- **[Hanova Source Code](https://abp.io/api/download/samples/Hanova)**
- **[Habitly Source Code](https://abp.io/api/download/samples/reactnative-efcore-psql-habitly)**
To learn more, see:
- [How the ABP AI Agent helps build production-ready applications](https://abp.io/community/articles/template-in-product-out-building-hanova-with-the-abp-ai-hcntpk3j#gsc.tab=0)
- [How we modernized React Native application development](https://abp.io/community/articles/new-abp-modern-react-native-template-rxjiyrpb#gsc.tab=0)
## Other Samples
ABP Platform provides many sample applications demonstrating various use cases and integrations. You can:
* Browse all sample applications in the [abp-samples repository](https://github.com/abpframework/abp-samples).
* Read detailed articles and tutorials in the [ABP Community](https://abp.io/community), which are shared by ABP Community & Contributors.
- Browse all sample applications in the [abp-samples repository](https://github.com/abpframework/abp-samples).
- Read detailed articles and tutorials in the [ABP Community](https://abp.io/community), which are shared by ABP Community & Contributors.

2
docs/en/studio/overview.md

@ -112,6 +112,8 @@ Key features of the AI Agent include:
- **Attachments**: Attach supported files or images to provide task-specific context.
- **Studio Integration**: Use enabled Studio tools for build, monitoring, applications, containers, tasks, proxies, migrations, and Git-related workflows.
For a production example of this workflow in action, see the [Hanova & Habitly samples](../samples/index.md#hanova--habitly).
> **Note**: Review the Privacy Notice available in the AI Agent panel to understand how your data is handled.
For the technical AI Agent reference, see [ABP Studio: AI Agent](./ai-agent.md).

4
docs/en/tutorials/mobile/index.md

@ -11,6 +11,8 @@
Mobile application development tutorials are designed for developers who have completed [the web development part of the tutorial](../book-store/index.md) and wish to continue building the mobile version of the application.
The React Native track follows the modernized ABP mobile template, and the [Habitly sample](../../samples/index.md#hanova--habitly) shows that stack in a production-ready app.
## Tutorials
You can choose between two mobile applications: [**.NET MAUI**](../../framework/ui/maui/index.md) or [**React Native**](../../framework/ui/react-native/index.md). Choose your framework and continue building your mobile application!
@ -30,4 +32,4 @@ The .NET MAUI tutorial walks you through creating a mobile version of your books
The React Native tutorial provides instructions for building the bookstore app using JavaScript.
* [React Native - Mobile Application Tutorial](./react-native/index.md)
* [Source Code](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-react-native-mongodb)
* [Source Code](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-react-native-mongodb)

2
docs/en/tutorials/mobile/react-native/index.md

@ -18,6 +18,8 @@ The React Native mobile option is _available for_ **_Team_** _or higher licenses
- The mobile template was modernized in 2026: it now uses **NativeWind v4** (Tailwind CSS for React Native) for styling, **Bottom Tab navigation** by default, and the **Redux Toolkit** store with hook-based access (`useSelector` / `useDispatch`). The `connectToRedux` HOC, the `DrawerNavigator`, and the legacy `DataList`/`AbpSelect` components from earlier versions no longer ship with the template — this tutorial walks through building the new equivalents.
- Before starting, please make sure that the [React Native Development Environment](../../../framework/ui/react-native/index.md) is ready on your machine.
If you'd like to inspect a complete implementation first, [Habitly](../../../samples/index.md#hanova--habitly) is the production-ready mobile sample that follows this modern template direction.
## Running the Application
Before implementing UI changes, run the `Acme.BookStore` mobile application and verify that login works:

2
framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Security/AbpComponentsClaimsCache.cs

@ -8,7 +8,7 @@ namespace Volo.Abp.AspNetCore.Components.Web.Security;
public class AbpComponentsClaimsCache : IScopedDependency
{
public ClaimsPrincipal Principal { get; private set; } = default!;
public ClaimsPrincipal Principal { get; private set; } = new ClaimsPrincipal(new ClaimsIdentity());
private readonly AuthenticationStateProvider? _authenticationStateProvider;

5
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs

@ -1,5 +1,4 @@
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Abstractions;
@ -7,6 +6,7 @@ using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Filters;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http;
using Volo.Abp.Threading;
using Volo.Abp.Uow;
@ -81,7 +81,8 @@ public class AbpUowActionFilter : IAsyncActionFilter, IAbpFilter, ITransientDepe
{
var abpUnitOfWorkDefaultOptions = context.GetRequiredService<IOptions<AbpUnitOfWorkDefaultOptions>>().Value;
options.IsTransactional = abpUnitOfWorkDefaultOptions.CalculateIsTransactional(
autoValue: !string.Equals(context.HttpContext.Request.Method, HttpMethod.Get.Method, StringComparison.OrdinalIgnoreCase)
autoValue: !(HttpMethodHelper.IsGet(context.HttpContext.Request.Method)
|| HttpMethodHelper.IsQuery(context.HttpContext.Request.Method))
);
}

5
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs

@ -1,5 +1,4 @@
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Abstractions;
@ -7,6 +6,7 @@ using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Filters;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http;
using Volo.Abp.Threading;
using Volo.Abp.Uow;
@ -86,7 +86,8 @@ public class AbpUowPageFilter : IAsyncPageFilter, IAbpFilter, ITransientDependen
{
var abpUnitOfWorkDefaultOptions = context.GetRequiredService<IOptions<AbpUnitOfWorkDefaultOptions>>().Value;
options.IsTransactional = abpUnitOfWorkDefaultOptions.CalculateIsTransactional(
autoValue: !string.Equals(context.HttpContext.Request.Method, HttpMethod.Get.Method, StringComparison.OrdinalIgnoreCase)
autoValue: !(HttpMethodHelper.IsGet(context.HttpContext.Request.Method)
|| HttpMethodHelper.IsQuery(context.HttpContext.Request.Method))
);
}

6
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs

@ -7,6 +7,7 @@ using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Middleware;
using Volo.Abp.Auditing;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http;
using Volo.Abp.Uow;
using Volo.Abp.Users;
@ -135,8 +136,9 @@ public class AbpAuditingMiddleware : AbpMiddlewareBase, ITransientDependency
}
if (!AuditingOptions.IsEnabledForGetRequests &&
(string.Equals(httpContext.Request.Method, HttpMethods.Get, StringComparison.OrdinalIgnoreCase) ||
string.Equals(httpContext.Request.Method, HttpMethods.Head, StringComparison.OrdinalIgnoreCase)))
(HttpMethodHelper.IsGet(httpContext.Request.Method) ||
HttpMethodHelper.IsHead(httpContext.Request.Method) ||
HttpMethodHelper.IsQuery(httpContext.Request.Method)))
{
return false;
}

8
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs

@ -1,8 +1,8 @@
using System;
using System.Net.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http;
using Volo.Abp.Uow;
namespace Volo.Abp.AspNetCore.Uow;
@ -37,10 +37,8 @@ public class AspNetCoreUnitOfWorkTransactionBehaviourProvider : IUnitOfWorkTrans
}
}
return !string.Equals(
httpContext.Request.Method,
HttpMethod.Get.Method, StringComparison.OrdinalIgnoreCase
);
var method = httpContext.Request.Method;
return !(HttpMethodHelper.IsGet(method) || HttpMethodHelper.IsQuery(method));
}
}

1
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AbpAuditingOptions.cs

@ -62,6 +62,7 @@ public class AbpAuditingOptions
//TODO: Move this to asp.net core layer or convert it to a more dynamic strategy?
/// <summary>
/// Default: false.
/// When false, safe methods (GET, HEAD and QUERY) are excluded from audit logging.
/// </summary>
public bool IsEnabledForGetRequests { get; set; }

1
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs

@ -193,6 +193,7 @@ public class AuditingInterceptor : AbpInterceptor, ITransientDependency
if (!options.IsEnabledForGetRequests &&
(string.Equals(auditLogInfo.HttpMethod, "Get", StringComparison.OrdinalIgnoreCase) ||
string.Equals(auditLogInfo.HttpMethod, "Head", StringComparison.OrdinalIgnoreCase) ||
string.Equals(auditLogInfo.HttpMethod, "Query", StringComparison.OrdinalIgnoreCase) ||
invocation.Method.Name.StartsWith("Get", StringComparison.OrdinalIgnoreCase)))
{
return false;

155
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerOptions.cs

@ -1,4 +1,8 @@
namespace Volo.Abp.BackgroundJobs;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Volo.Abp.BackgroundJobs;
public class AbpBackgroundJobWorkerOptions
{
@ -15,6 +19,7 @@ public class AbpBackgroundJobWorkerOptions
/// <summary>
/// Maximum count of jobs to fetch from data store in one loop.
/// Also used as the batch size for the retention cleanup deletions (see <see cref="BackgroundJobCleanupWorker"/>).
/// Default: 1000.
/// </summary>
public int MaxJobFetchCount { get; set; }
@ -42,7 +47,61 @@ public class AbpBackgroundJobWorkerOptions
/// Distributed lock name for the worker.
/// Default value: "AbpBackgroundJobWorker".
/// </summary>
public string DistributedLockName { get; set; }
public string DistributedLockName { get; set; }
/// <summary>
/// When set to true, a successfully completed job is kept (its <see cref="BackgroundJobInfo.CompletionTime"/> is set)
/// instead of being deleted, so it can be used for auditing/history. Completed jobs are excluded from the
/// waiting jobs query and are removed by the retention cleanup (see <see cref="SuccessfulJobRetentionTime"/>).
/// Default value: false (successful jobs are deleted).
/// </summary>
public bool StoreSuccessfulJobs { get; set; }
/// <summary>
/// How long a kept (successfully completed) job is retained before the cleanup deletes it.
/// Only relevant when <see cref="StoreSuccessfulJobs"/> is true. Set to null to keep them forever (no automatic cleanup).
/// Default value: 7 days.
/// </summary>
public TimeSpan? SuccessfulJobRetentionTime { get; set; }
/// <summary>
/// Interval (as milliseconds) between cleanup runs that delete retained successful jobs older than <see cref="SuccessfulJobRetentionTime"/>.
/// Default value: 3,600,000 (1 hour).
/// </summary>
public int CleanSuccessfulJobsPeriod { get; set; }
/// <summary>
/// Distributed lock name for the cleanup worker.
/// Default value: "AbpBackgroundJobCleanup".
/// </summary>
public string CleanupDistributedLockName { get; set; }
/// <summary>
/// Dedicated workers, each processing only the configured job types with its own distributed lock.
/// When this list is not empty, an additional default worker is started that processes all
/// other job types. When it is empty, a single default worker processes all job types (the default behavior).
/// Use <see cref="AddDedicatedWorker(string, Type[])"/> to add a dedicated worker.
/// </summary>
public List<BackgroundJobWorkerConfiguration> WorkerConfigurations { get; }
/// <summary>
/// Maximum number of jobs that a single worker executes in parallel within one poll cycle.
/// When it is 1 (default), jobs are executed sequentially under a single worker distributed lock
/// (the default behavior). When greater than 1, the worker distributed lock is not used; instead
/// each job is claimed with its own distributed lock so multiple application instances can execute
/// different jobs concurrently.
/// This value should be configured consistently across all application instances: mixing sequential
/// (worker lock) and parallel (per-job lock) instances removes the common mutual exclusion and may
/// let the same job run on more than one instance.
/// Default value: 1.
/// </summary>
public int MaxParallelJobExecutionCount { get; set; }
/// <summary>
/// Prefix of the per-job distributed lock name used when <see cref="MaxParallelJobExecutionCount"/> is greater than 1.
/// Default value: "AbpBackgroundJob:".
/// </summary>
public string PerJobDistributedLockPrefix { get; set; }
public AbpBackgroundJobWorkerOptions()
{
@ -52,5 +111,97 @@ public class AbpBackgroundJobWorkerOptions
DefaultTimeout = 172800;
DefaultWaitFactor = 2.0;
DistributedLockName = "AbpBackgroundJobWorker";
WorkerConfigurations = new List<BackgroundJobWorkerConfiguration>();
MaxParallelJobExecutionCount = 1;
PerJobDistributedLockPrefix = "AbpBackgroundJob:";
SuccessfulJobRetentionTime = TimeSpan.FromDays(7);
CleanSuccessfulJobsPeriod = 3600000;
CleanupDistributedLockName = "AbpBackgroundJobCleanup";
}
/// <summary>
/// Adds a dedicated worker that processes only the given job argument types.
/// </summary>
/// <param name="lockName">A unique distributed lock name for this worker.</param>
/// <param name="jobArgsTypes">The job argument types handled exclusively by this worker.</param>
public AbpBackgroundJobWorkerOptions AddDedicatedWorker(string lockName, params Type[] jobArgsTypes)
{
Check.NotNullOrEmpty(jobArgsTypes, nameof(jobArgsTypes));
var configuration = new BackgroundJobWorkerConfiguration(lockName, jobArgsTypes.Distinct().ToArray());
var duplicateType = configuration.JobArgsTypes.FirstOrDefault(
type => WorkerConfigurations.Any(c => c.JobArgsTypes.Contains(type)));
if (duplicateType != null)
{
throw new AbpException(
$"The background job args type '{duplicateType.FullName}' is already assigned to a dedicated worker. " +
$"Each job type can be handled by only one dedicated worker.");
}
if (lockName == DistributedLockName || WorkerConfigurations.Any(c => c.LockName == lockName))
{
throw new AbpException(
$"The distributed lock name '{lockName}' is already used by another background job worker. " +
$"Each worker must have a unique lock name.");
}
WorkerConfigurations.Add(configuration);
return this;
}
public AbpBackgroundJobWorkerOptions AddDedicatedWorker<TArgs>(string lockName)
{
return AddDedicatedWorker(lockName, typeof(TArgs));
}
public AbpBackgroundJobWorkerOptions AddDedicatedWorker<TArgs1, TArgs2>(string lockName)
{
return AddDedicatedWorker(lockName, typeof(TArgs1), typeof(TArgs2));
}
public AbpBackgroundJobWorkerOptions AddDedicatedWorker<TArgs1, TArgs2, TArgs3>(string lockName)
{
return AddDedicatedWorker(lockName, typeof(TArgs1), typeof(TArgs2), typeof(TArgs3));
}
/// <summary>
/// Adds a dedicated worker with a lock name derived from the given job argument type names.
/// Use the <c>AddDedicatedWorker(string lockName, ...)</c> overloads to set an explicit lock name.
/// </summary>
/// <param name="jobArgsTypes">The job argument types handled exclusively by this worker.</param>
public AbpBackgroundJobWorkerOptions AddDedicatedWorker(params Type[] jobArgsTypes)
{
return AddDedicatedWorker(GetDedicatedWorkerLockName(jobArgsTypes), jobArgsTypes);
}
public AbpBackgroundJobWorkerOptions AddDedicatedWorker<TArgs>()
{
return AddDedicatedWorker(typeof(TArgs));
}
public AbpBackgroundJobWorkerOptions AddDedicatedWorker<TArgs1, TArgs2>()
{
return AddDedicatedWorker(typeof(TArgs1), typeof(TArgs2));
}
public AbpBackgroundJobWorkerOptions AddDedicatedWorker<TArgs1, TArgs2, TArgs3>()
{
return AddDedicatedWorker(typeof(TArgs1), typeof(TArgs2), typeof(TArgs3));
}
protected virtual string GetDedicatedWorkerLockName(Type[] jobArgsTypes)
{
Check.NotNullOrEmpty(jobArgsTypes, nameof(jobArgsTypes));
if (jobArgsTypes.Any(t => t == null))
{
throw new ArgumentException("Job args types cannot contain null.", nameof(jobArgsTypes));
}
// Hash the (stable, sorted) full type names so the derived lock name stays short and within the
// length limits of distributed lock providers (e.g. SQL Server sp_getapplock is limited to 255 chars).
var key = string.Join(",", jobArgsTypes.Select(t => t.FullName).Distinct().OrderBy(n => n, StringComparer.Ordinal));
return "AbpBackgroundJobDedicatedWorker:" + key.ToMd5();
}
}

12
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs

@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.BackgroundWorkers;
@ -23,9 +23,15 @@ public class AbpBackgroundJobsModule : AbpModule
{
public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
{
if (context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobOptions>>().Value.IsJobExecutionEnabled)
// The manager decides (based on options) whether and which workers to run.
await context.AddBackgroundWorkerAsync<BackgroundJobWorkerManager>();
// Only register the cleanup worker when it has something to do (retained successful jobs).
var jobOptions = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobOptions>>().Value;
var workerOptions = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobWorkerOptions>>().Value;
if (jobOptions.IsJobExecutionEnabled && workerOptions.StoreSuccessfulJobs && workerOptions.SuccessfulJobRetentionTime != null)
{
await context.AddBackgroundWorkerAsync<IBackgroundJobWorker>();
await context.AddBackgroundWorkerAsync<BackgroundJobCleanupWorker>();
}
}

66
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobCleanupWorker.cs

@ -0,0 +1,66 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.DistributedLocking;
using Volo.Abp.Threading;
using Volo.Abp.Timing;
namespace Volo.Abp.BackgroundJobs;
/// <summary>
/// Periodically deletes retained successfully completed jobs older than
/// <see cref="AbpBackgroundJobWorkerOptions.SuccessfulJobRetentionTime"/>.
/// Only relevant when <see cref="AbpBackgroundJobWorkerOptions.StoreSuccessfulJobs"/> is enabled.
/// </summary>
public class BackgroundJobCleanupWorker : AsyncPeriodicBackgroundWorkerBase
{
protected AbpBackgroundJobOptions JobOptions { get; }
protected AbpBackgroundJobWorkerOptions WorkerOptions { get; }
protected IAbpDistributedLock DistributedLock { get; }
public BackgroundJobCleanupWorker(
AbpAsyncTimer timer,
IServiceScopeFactory serviceScopeFactory,
IOptions<AbpBackgroundJobOptions> jobOptions,
IOptions<AbpBackgroundJobWorkerOptions> workerOptions,
IAbpDistributedLock distributedLock)
: base(timer, serviceScopeFactory)
{
JobOptions = jobOptions.Value;
WorkerOptions = workerOptions.Value;
DistributedLock = distributedLock;
Timer.Period = WorkerOptions.CleanSuccessfulJobsPeriod;
}
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
if (!JobOptions.IsJobExecutionEnabled ||
!WorkerOptions.StoreSuccessfulJobs ||
WorkerOptions.SuccessfulJobRetentionTime == null)
{
return;
}
var store = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobStore>();
var clock = workerContext.ServiceProvider.GetRequiredService<IClock>();
var completedBefore = clock.Now.Subtract(WorkerOptions.SuccessfulJobRetentionTime.Value);
await using (var handle = await DistributedLock.TryAcquireAsync(WorkerOptions.CleanupDistributedLockName, cancellationToken: StoppingToken))
{
if (handle == null)
{
return;
}
int deletedCount;
do
{
deletedCount = await store.DeleteAsync(WorkerOptions.ApplicationName, completedBefore, WorkerOptions.MaxJobFetchCount, StoppingToken);
}
while (deletedCount > 0 && deletedCount >= WorkerOptions.MaxJobFetchCount && !StoppingToken.IsCancellationRequested);
}
}
}

8
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs

@ -50,6 +50,14 @@ public class BackgroundJobInfo
/// </summary>
public virtual bool IsAbandoned { get; set; }
/// <summary>
/// The time this job was completed successfully.
/// When set, the job is kept as history and excluded from the waiting jobs query.
/// It is only set when <see cref="AbpBackgroundJobWorkerOptions.StoreSuccessfulJobs"/> is enabled;
/// otherwise successfully completed jobs are deleted.
/// </summary>
public virtual DateTime? CompletionTime { get; set; }
/// <summary>
/// Priority of this job.
/// </summary>

71
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobNameFilter.cs

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Volo.Abp.BackgroundJobs;
/// <summary>
/// Filters the waiting jobs of a background job worker by job name.
/// A worker is exactly one of: no filter (<see cref="None"/>), include-only (a dedicated worker) or
/// exclude-only (the default worker in a multi-worker setup) — the two can never be combined.
/// </summary>
public class BackgroundJobNameFilter
{
/// <summary>
/// A filter that matches every job name.
/// </summary>
public static BackgroundJobNameFilter None { get; } = new(BackgroundJobNameFilterMode.None);
public BackgroundJobNameFilterMode Mode { get; }
public IReadOnlyList<string> JobNames { get; }
public BackgroundJobNameFilter(BackgroundJobNameFilterMode mode, IReadOnlyList<string>? jobNames = null)
{
if (!Enum.IsDefined(typeof(BackgroundJobNameFilterMode), mode))
{
throw new ArgumentException($"Invalid background job name filter mode: {mode}", nameof(mode));
}
var names = jobNames?.Where(x => !x.IsNullOrWhiteSpace()).Distinct(StringComparer.Ordinal).ToList() ?? new List<string>();
if (mode == BackgroundJobNameFilterMode.None && names.Count > 0)
{
throw new ArgumentException("Job names must be empty when the filter mode is None.", nameof(jobNames));
}
if (mode != BackgroundJobNameFilterMode.None && names.Count == 0)
{
throw new ArgumentException("Job names cannot be empty when the filter mode is Include or Exclude.", nameof(jobNames));
}
Mode = mode;
JobNames = names.AsReadOnly();
}
public static BackgroundJobNameFilter Include(IReadOnlyList<string> jobNames)
{
return new BackgroundJobNameFilter(BackgroundJobNameFilterMode.Include, jobNames);
}
public static BackgroundJobNameFilter Exclude(IReadOnlyList<string> jobNames)
{
return new BackgroundJobNameFilter(BackgroundJobNameFilterMode.Exclude, jobNames);
}
/// <summary>
/// Whether the given job name passes this filter, using an ordinal (case-sensitive) comparison for the
/// in-memory eligibility re-check. The persistent stores translate <see cref="Mode"/> and
/// <see cref="JobNames"/> into a database query instead, so their filtering follows the database collation.
/// Job names are expected to be unique beyond case (they are derived from the type name by default).
/// </summary>
public virtual bool IsMatch(string jobName)
{
return Mode switch
{
BackgroundJobNameFilterMode.Include => JobNames.Contains(jobName, StringComparer.Ordinal),
BackgroundJobNameFilterMode.Exclude => !JobNames.Contains(jobName, StringComparer.Ordinal),
_ => true
};
}
}

19
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobNameFilterMode.cs

@ -0,0 +1,19 @@
namespace Volo.Abp.BackgroundJobs;
public enum BackgroundJobNameFilterMode : byte
{
/// <summary>
/// No filter; all job names match.
/// </summary>
None = 0,
/// <summary>
/// Only the job names in the filter match.
/// </summary>
Include = 1,
/// <summary>
/// All job names except those in the filter match.
/// </summary>
Exclude = 2
}

353
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs

@ -1,17 +1,22 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DistributedLocking;
using Volo.Abp.ExceptionHandling;
using Volo.Abp.Threading;
using Volo.Abp.Timing;
namespace Volo.Abp.BackgroundJobs;
public class BackgroundJobWorker : AsyncPeriodicBackgroundWorkerBase, IBackgroundJobWorker
public class BackgroundJobWorker : IBackgroundJobWorker, ITransientDependency
{
protected AbpBackgroundJobOptions JobOptions { get; }
@ -19,95 +24,321 @@ public class BackgroundJobWorker : AsyncPeriodicBackgroundWorkerBase, IBackgroun
protected IAbpDistributedLock DistributedLock { get; }
protected IServiceScopeFactory ServiceScopeFactory { get; }
protected AbpAsyncTimer Timer { get; }
public ILogger<BackgroundJobWorker> Logger { get; set; }
protected string DistributedLockName { get; set; } = default!;
protected BackgroundJobNameFilter JobNameFilter { get; set; } = BackgroundJobNameFilter.None;
protected CancellationTokenSource StoppingTokenSource { get; }
protected CancellationToken StoppingToken { get; }
public BackgroundJobWorker(
AbpAsyncTimer timer,
IOptions<AbpBackgroundJobOptions> jobOptions,
IOptions<AbpBackgroundJobWorkerOptions> workerOptions,
IServiceScopeFactory serviceScopeFactory,
IAbpDistributedLock distributedLock)
: base(
timer,
serviceScopeFactory)
{
Timer = timer;
DistributedLock = distributedLock;
ServiceScopeFactory = serviceScopeFactory;
WorkerOptions = workerOptions.Value;
JobOptions = jobOptions.Value;
Logger = NullLogger<BackgroundJobWorker>.Instance;
Timer.Period = WorkerOptions.JobPollPeriod;
Timer.Elapsed = TimerOnElapsed;
StoppingTokenSource = new CancellationTokenSource();
StoppingToken = StoppingTokenSource.Token;
}
public virtual Task StartAsync(
string? distributedLockName = null,
BackgroundJobNameFilter? jobNameFilter = null,
CancellationToken cancellationToken = default)
{
DistributedLockName = distributedLockName ?? WorkerOptions.DistributedLockName;
JobNameFilter = jobNameFilter ?? BackgroundJobNameFilter.None;
Timer.Start(cancellationToken);
return Task.CompletedTask;
}
public virtual Task StopAsync(CancellationToken cancellationToken = default)
{
StoppingTokenSource.Cancel();
Timer.Stop(cancellationToken);
StoppingTokenSource.Dispose();
return Task.CompletedTask;
}
private async Task TimerOnElapsed(AbpAsyncTimer timer)
{
await RunAsync();
}
protected virtual async Task RunAsync()
{
using var scope = ServiceScopeFactory.CreateScope();
try
{
var workerContext = new PeriodicBackgroundWorkerContext(scope.ServiceProvider, StoppingToken);
if (WorkerOptions.MaxParallelJobExecutionCount > 1)
{
await ExecuteJobsInParallelAsync(workerContext);
}
else
{
await ExecuteJobsWithWorkerLockAsync(workerContext);
}
}
catch (Exception ex)
{
await scope.ServiceProvider
.GetRequiredService<IExceptionNotifier>()
.NotifyAsync(new ExceptionNotificationContext(ex));
Logger.LogException(ex);
}
}
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
protected virtual async Task ExecuteJobsWithWorkerLockAsync(PeriodicBackgroundWorkerContext workerContext)
{
await using (var handler = await DistributedLock.TryAcquireAsync(WorkerOptions.DistributedLockName, cancellationToken: StoppingToken))
await using (var handler = await DistributedLock.TryAcquireAsync(DistributedLockName, cancellationToken: StoppingToken))
{
if (handler != null)
{
var store = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobStore>();
await ExecuteWaitingJobsAsync(workerContext);
}
else
{
await WaitForNextTryAsync();
}
}
}
protected virtual async Task ExecuteWaitingJobsAsync(PeriodicBackgroundWorkerContext workerContext)
{
var store = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobStore>();
var waitingJobs = await GetWaitingJobsAsync(workerContext, store);
var waitingJobs = await store.GetWaitingJobsAsync(WorkerOptions.ApplicationName, WorkerOptions.MaxJobFetchCount);
if (!waitingJobs.Any())
{
return;
}
if (!waitingJobs.Any())
var jobExecuter = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobExecuter>();
var clock = workerContext.ServiceProvider.GetRequiredService<IClock>();
var serializer = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobSerializer>();
foreach (var jobInfo in waitingJobs)
{
await TryExecuteJobAsync(workerContext, store, jobInfo, jobExecuter, clock, serializer);
}
}
/// <summary>
/// Executes waiting jobs in parallel across application instances, up to
/// <see cref="AbpBackgroundJobWorkerOptions.MaxParallelJobExecutionCount"/> jobs per cycle.
/// </summary>
protected virtual async Task ExecuteJobsInParallelAsync(PeriodicBackgroundWorkerContext workerContext)
{
var store = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobStore>();
var waitingJobs = await GetWaitingJobsAsync(workerContext, store);
if (!waitingJobs.Any())
{
return;
}
var runningTasks = new List<Task>();
// Await already-started jobs even if acquiring a lock for a later job throws,
// so no claimed job is left running detached from this cycle.
try
{
foreach (var jobInfo in waitingJobs)
{
if (runningTasks.Count >= WorkerOptions.MaxParallelJobExecutionCount || StoppingToken.IsCancellationRequested)
{
return;
break;
}
var jobExecuter = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobExecuter>();
var clock = workerContext.ServiceProvider.GetRequiredService<IClock>();
var serializer = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobSerializer>();
foreach (var jobInfo in waitingJobs)
var handle = await DistributedLock.TryAcquireAsync(GetPerJobDistributedLockName(jobInfo), cancellationToken: StoppingToken);
if (handle == null)
{
jobInfo.TryCount++;
jobInfo.LastTryTime = clock.Now;
try
{
var jobConfiguration = JobOptions.GetJob(jobInfo.JobName);
var jobArgs = serializer.Deserialize(jobInfo.JobArgs, jobConfiguration.ArgsType);
var context = new JobExecutionContext(
workerContext.ServiceProvider,
jobConfiguration.JobType,
jobArgs,
workerContext.CancellationToken);
try
{
await jobExecuter.ExecuteAsync(context);
await store.DeleteAsync(jobInfo.Id);
}
catch (BackgroundJobExecutionException)
{
var nextTryTime = CalculateNextTryTime(jobInfo, clock);
if (nextTryTime.HasValue)
{
jobInfo.NextTryTime = nextTryTime.Value;
}
else
{
jobInfo.IsAbandoned = true;
}
await TryUpdateAsync(store, jobInfo);
}
}
catch (Exception ex)
{
Logger.LogException(ex);
jobInfo.IsAbandoned = true;
await TryUpdateAsync(store, jobInfo);
}
// Another instance is already processing this job.
continue;
}
runningTasks.Add(ExecuteClaimedJobAsync(jobInfo, handle));
}
else
}
finally
{
await Task.WhenAll(runningTasks);
}
}
protected virtual async Task ExecuteClaimedJobAsync(BackgroundJobInfo jobInfo, IAbpDistributedLockHandle handle)
{
await using (handle)
{
// Each concurrently executed job runs in its own service scope so that scoped services
// (e.g. the DbContext and the unit of work) are not shared across parallel jobs.
using var scope = ServiceScopeFactory.CreateScope();
try
{
try
var workerContext = new PeriodicBackgroundWorkerContext(scope.ServiceProvider, StoppingToken);
var store = scope.ServiceProvider.GetRequiredService<IBackgroundJobStore>();
var clock = scope.ServiceProvider.GetRequiredService<IClock>();
// Re-read under the lock: another instance may have completed, abandoned or rescheduled this job
// between fetching the waiting list and acquiring the per-job lock.
var currentJobInfo = await store.FindAsync(jobInfo.Id);
if (!IsJobEligible(currentJobInfo, clock))
{
await Task.Delay(WorkerOptions.JobPollPeriod * 12, StoppingToken);
return;
}
catch (TaskCanceledException) { }
var jobExecuter = scope.ServiceProvider.GetRequiredService<IBackgroundJobExecuter>();
var serializer = scope.ServiceProvider.GetRequiredService<IBackgroundJobSerializer>();
await TryExecuteJobAsync(workerContext, store, currentJobInfo, jobExecuter, clock, serializer);
}
catch (Exception ex)
{
await scope.ServiceProvider
.GetRequiredService<IExceptionNotifier>()
.NotifyAsync(new ExceptionNotificationContext(ex));
Logger.LogException(ex);
}
}
}
protected virtual bool IsJobEligible(BackgroundJobInfo? jobInfo, IClock clock)
{
return jobInfo != null &&
jobInfo.ApplicationName == WorkerOptions.ApplicationName &&
!jobInfo.IsAbandoned &&
jobInfo.CompletionTime == null &&
jobInfo.NextTryTime <= clock.Now &&
JobNameFilter.IsMatch(jobInfo.JobName);
}
protected virtual string GetPerJobDistributedLockName(BackgroundJobInfo jobInfo)
{
return WorkerOptions.PerJobDistributedLockPrefix + jobInfo.Id;
}
protected virtual async Task<List<BackgroundJobInfo>> GetWaitingJobsAsync(
PeriodicBackgroundWorkerContext workerContext,
IBackgroundJobStore store)
{
return await store.GetWaitingJobsAsync(
WorkerOptions.ApplicationName,
WorkerOptions.MaxJobFetchCount,
JobNameFilter);
}
protected virtual async Task TryExecuteJobAsync(
PeriodicBackgroundWorkerContext workerContext,
IBackgroundJobStore store,
BackgroundJobInfo jobInfo,
IBackgroundJobExecuter jobExecuter,
IClock clock,
IBackgroundJobSerializer serializer)
{
jobInfo.TryCount++;
jobInfo.LastTryTime = clock.Now;
try
{
var jobConfiguration = JobOptions.GetJob(jobInfo.JobName);
var jobArgs = serializer.Deserialize(jobInfo.JobArgs, jobConfiguration.ArgsType);
var context = new JobExecutionContext(
workerContext.ServiceProvider,
jobConfiguration.JobType,
jobArgs,
workerContext.CancellationToken);
try
{
await jobExecuter.ExecuteAsync(context);
await HandleJobSuccessAsync(store, jobInfo, clock);
}
catch (BackgroundJobExecutionException)
{
await HandleJobFailureAsync(store, jobInfo, clock);
}
}
catch (Exception ex)
{
await HandleJobErrorAsync(store, jobInfo, ex);
}
}
protected virtual async Task HandleJobSuccessAsync(IBackgroundJobStore store, BackgroundJobInfo jobInfo, IClock clock)
{
if (WorkerOptions.StoreSuccessfulJobs)
{
// Keep the job as history: mark it completed instead of deleting. It is then excluded from the
// waiting jobs query and removed later by the retention cleanup.
jobInfo.CompletionTime = clock.Now;
await store.UpdateAsync(jobInfo);
}
else
{
await store.DeleteAsync(jobInfo.Id);
}
}
protected virtual async Task HandleJobFailureAsync(IBackgroundJobStore store, BackgroundJobInfo jobInfo, IClock clock)
{
var nextTryTime = CalculateNextTryTime(jobInfo, clock);
if (nextTryTime.HasValue)
{
jobInfo.NextTryTime = nextTryTime.Value;
}
else
{
jobInfo.IsAbandoned = true;
}
await TryUpdateAsync(store, jobInfo);
}
protected virtual async Task HandleJobErrorAsync(IBackgroundJobStore store, BackgroundJobInfo jobInfo, Exception ex)
{
Logger.LogException(ex);
jobInfo.IsAbandoned = true;
await TryUpdateAsync(store, jobInfo);
}
protected virtual async Task WaitForNextTryAsync()
{
try
{
await Task.Delay(WorkerOptions.JobPollPeriod * 12, StoppingToken);
}
catch (TaskCanceledException) { }
}
protected virtual async Task TryUpdateAsync(IBackgroundJobStore store, BackgroundJobInfo jobInfo)

37
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerConfiguration.cs

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Volo.Abp.BackgroundJobs;
/// <summary>
/// Configuration of a dedicated <see cref="BackgroundJobWorker"/> that processes only specific job types.
/// </summary>
public class BackgroundJobWorkerConfiguration
{
/// <summary>
/// A unique distributed lock name for this worker. It must be different from the names used by other workers.
/// It is used to serialize the worker across application instances when
/// <see cref="AbpBackgroundJobWorkerOptions.MaxParallelJobExecutionCount"/> is 1; in parallel mode
/// (greater than 1) jobs are claimed with per-job locks instead and this lock is not acquired.
/// </summary>
public string LockName { get; }
/// <summary>
/// The job argument types that are processed exclusively by this worker.
/// </summary>
public IReadOnlyList<Type> JobArgsTypes { get; }
public BackgroundJobWorkerConfiguration(string lockName, params Type[] jobArgsTypes)
{
LockName = Check.NotNullOrWhiteSpace(lockName, nameof(lockName));
Check.NotNullOrEmpty(jobArgsTypes, nameof(jobArgsTypes));
if (jobArgsTypes.Any(t => t == null))
{
throw new ArgumentException("Job args types cannot contain null.", nameof(jobArgsTypes));
}
JobArgsTypes = jobArgsTypes.ToList();
}
}

131
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerManager.cs

@ -0,0 +1,131 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.BackgroundWorkers;
namespace Volo.Abp.BackgroundJobs;
/// <summary>
/// Owns and controls the background job workers.
/// When no <see cref="AbpBackgroundJobWorkerOptions.WorkerConfigurations"/> is configured, a single
/// default worker processes all jobs. Otherwise, one dedicated worker is started per configuration
/// (each with its own distributed lock and job-type filter) plus a default worker for the remaining jobs.
/// The workers are resolved from DI, so a replaced <see cref="IBackgroundJobWorker"/> is respected.
/// </summary>
public class BackgroundJobWorkerManager : IBackgroundWorker
{
protected AbpBackgroundJobOptions JobOptions { get; }
protected AbpBackgroundJobWorkerOptions WorkerOptions { get; }
protected IServiceProvider ServiceProvider { get; }
protected List<IBackgroundJobWorker> Workers { get; }
public BackgroundJobWorkerManager(
IOptions<AbpBackgroundJobOptions> jobOptions,
IOptions<AbpBackgroundJobWorkerOptions> workerOptions,
IServiceProvider serviceProvider)
{
JobOptions = jobOptions.Value;
WorkerOptions = workerOptions.Value;
ServiceProvider = serviceProvider;
Workers = new List<IBackgroundJobWorker>();
}
public virtual async Task StartAsync(CancellationToken cancellationToken = default)
{
if (!JobOptions.IsJobExecutionEnabled)
{
return;
}
if (!WorkerOptions.WorkerConfigurations.Any())
{
await StartWorkerAsync(cancellationToken: cancellationToken);
return;
}
// AddDedicatedWorker already rejects duplicate job types and lock names eagerly. This is the backstop
// for what can only be known here: two different args types that resolve to the same job name.
// Validate all configurations first, so a misconfiguration does not leave already-started workers running.
var dedicatedWorkers = new List<DedicatedWorkerDefinition>();
var allDedicatedJobNames = new List<string>();
// The default worker uses WorkerOptions.DistributedLockName, so dedicated workers must not reuse it.
var lockNames = new List<string> { WorkerOptions.DistributedLockName };
foreach (var configuration in WorkerOptions.WorkerConfigurations)
{
var jobNames = configuration.JobArgsTypes
.Select(GetJobName)
.Distinct()
.ToList();
var alreadyConfigured = jobNames.Intersect(allDedicatedJobNames).ToList();
if (alreadyConfigured.Any())
{
throw new AbpException(
$"The following background job(s) are configured for more than one dedicated worker: {string.Join(", ", alreadyConfigured)}. " +
$"Each job type can be handled by only one dedicated worker.");
}
if (lockNames.Contains(configuration.LockName))
{
throw new AbpException(
$"The distributed lock name '{configuration.LockName}' is used by more than one background job worker " +
$"(the default worker uses '{WorkerOptions.DistributedLockName}'). Each worker must have a unique lock name to run independently.");
}
lockNames.Add(configuration.LockName);
allDedicatedJobNames.AddRange(jobNames);
dedicatedWorkers.Add(new DedicatedWorkerDefinition(configuration.LockName, jobNames));
}
foreach (var dedicatedWorker in dedicatedWorkers)
{
await StartWorkerAsync(dedicatedWorker.LockName, BackgroundJobNameFilter.Include(dedicatedWorker.JobNames), cancellationToken);
}
// Default worker processes every job that is not handled by a dedicated worker.
await StartWorkerAsync(null, BackgroundJobNameFilter.Exclude(allDedicatedJobNames), cancellationToken);
}
protected virtual string GetJobName(Type argsType)
{
try
{
return JobOptions.GetJob(argsType).JobName;
}
catch (AbpException ex)
{
throw new AbpException(
$"No background job is registered for the args type '{argsType.FullName}' configured via AddDedicatedWorker. " +
$"Register the job before configuring a dedicated worker for it.", ex);
}
}
protected virtual async Task StartWorkerAsync(
string? distributedLockName = null,
BackgroundJobNameFilter? jobNameFilter = null,
CancellationToken cancellationToken = default)
{
var worker = ServiceProvider.GetRequiredService<IBackgroundJobWorker>();
await worker.StartAsync(distributedLockName, jobNameFilter, cancellationToken);
Workers.Add(worker);
}
public virtual async Task StopAsync(CancellationToken cancellationToken = default)
{
foreach (var worker in Workers)
{
await worker.StopAsync(cancellationToken);
}
Workers.Clear();
}
}

27
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DedicatedWorkerDefinition.cs

@ -0,0 +1,27 @@
using System.Collections.Generic;
namespace Volo.Abp.BackgroundJobs;
/// <summary>
/// A validated, ready-to-start dedicated worker: the distributed lock name it runs under and the
/// resolved job names it is responsible for. Built by <see cref="BackgroundJobWorkerManager"/> from a
/// <see cref="BackgroundJobWorkerConfiguration"/> after all configurations have been validated.
/// </summary>
public class DedicatedWorkerDefinition
{
/// <summary>
/// The distributed lock name this worker runs under.
/// </summary>
public string LockName { get; }
/// <summary>
/// The resolved job names this worker is responsible for.
/// </summary>
public IReadOnlyList<string> JobNames { get; }
public DedicatedWorkerDefinition(string lockName, IReadOnlyList<string> jobNames)
{
LockName = lockName;
JobNames = jobNames;
}
}

26
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/IBackgroundJobStore.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Volo.Abp.BackgroundJobs;
@ -24,7 +25,7 @@ public interface IBackgroundJobStore
/// <summary>
/// Gets waiting jobs. It should get jobs based on these:
/// Conditions: ApplicationName is applicationName And !IsAbandoned And NextTryTime &lt;= Clock.Now.
/// Conditions: ApplicationName is applicationName And !IsAbandoned And CompletionTime == null And NextTryTime &lt;= Clock.Now.
/// Order by: Priority DESC, TryCount ASC, NextTryTime ASC.
/// Maximum result: <paramref name="maxResultCount"/>.
/// </summary>
@ -32,12 +33,35 @@ public interface IBackgroundJobStore
/// <param name="maxResultCount">Maximum result count.</param>
Task<List<BackgroundJobInfo>> GetWaitingJobsAsync(string? applicationName, int maxResultCount);
/// <summary>
/// Gets waiting jobs (see <see cref="GetWaitingJobsAsync(string, int)"/>), additionally filtered by job name
/// according to <paramref name="jobNameFilter"/>.
/// </summary>
/// <param name="applicationName">Application name.</param>
/// <param name="maxResultCount">Maximum result count.</param>
/// <param name="jobNameFilter">Job name filter. When null, no job name filter is applied.</param>
Task<List<BackgroundJobInfo>> GetWaitingJobsAsync(
string? applicationName,
int maxResultCount,
BackgroundJobNameFilter? jobNameFilter);
/// <summary>
/// Deletes a job.
/// </summary>
/// <param name="jobId">The Job Unique Identifier.</param>
Task DeleteAsync(Guid jobId);
/// <summary>
/// Deletes successfully completed jobs (<see cref="BackgroundJobInfo.CompletionTime"/> is set) of the given
/// application that completed before <paramref name="completedBefore"/>. Used by the retention cleanup.
/// </summary>
/// <returns>The number of deleted jobs.</returns>
Task<int> DeleteAsync(
string? applicationName,
DateTime completedBefore,
int maxResultCount,
CancellationToken cancellationToken = default);
/// <summary>
/// Updates a job.
/// </summary>

23
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/IBackgroundJobWorker.cs

@ -1,8 +1,27 @@
using Volo.Abp.BackgroundWorkers;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Volo.Abp.BackgroundJobs;
public interface IBackgroundJobWorker : IBackgroundWorker
/// <summary>
/// A background job worker that polls and executes waiting jobs.
/// Instances are created, configured and started by <see cref="BackgroundJobWorkerManager"/>.
/// </summary>
public interface IBackgroundJobWorker
{
/// <summary>
/// Starts this worker.
/// </summary>
/// <param name="distributedLockName">
/// Distributed lock name for this worker. When null, <see cref="AbpBackgroundJobWorkerOptions.DistributedLockName"/> is used.
/// </param>
/// <param name="jobNameFilter">Filters the jobs this worker processes by name. When null, all jobs are processed.</param>
/// <param name="cancellationToken">Cancellation token.</param>
Task StartAsync(
string? distributedLockName = null,
BackgroundJobNameFilter? jobNameFilter = null,
CancellationToken cancellationToken = default);
Task StopAsync(CancellationToken cancellationToken = default);
}

36
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/InMemoryBackgroundJobStore.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Timing;
@ -37,9 +38,20 @@ public class InMemoryBackgroundJobStore : IBackgroundJobStore, ISingletonDepende
public virtual Task<List<BackgroundJobInfo>> GetWaitingJobsAsync(string? applicationName, int maxResultCount)
{
return GetWaitingJobsAsync(applicationName, maxResultCount, null);
}
public virtual Task<List<BackgroundJobInfo>> GetWaitingJobsAsync(
string? applicationName,
int maxResultCount,
BackgroundJobNameFilter? jobNameFilter)
{
var filter = jobNameFilter ?? BackgroundJobNameFilter.None;
var waitingJobs = _jobs.Values
.Where(t => t.ApplicationName == applicationName)
.Where(t => !t.IsAbandoned && t.NextTryTime <= Clock.Now)
.Where(t => !t.IsAbandoned && t.CompletionTime == null && t.NextTryTime <= Clock.Now)
.Where(t => filter.IsMatch(t.JobName))
.OrderByDescending(t => t.Priority)
.ThenBy(t => t.TryCount)
.ThenBy(t => t.NextTryTime)
@ -57,6 +69,28 @@ public class InMemoryBackgroundJobStore : IBackgroundJobStore, ISingletonDepende
return Task.CompletedTask;
}
public virtual Task<int> DeleteAsync(
string? applicationName,
DateTime completedBefore,
int maxResultCount,
CancellationToken cancellationToken = default)
{
var idsToDelete = _jobs.Values
.Where(t => t.ApplicationName == applicationName)
.Where(t => t.CompletionTime != null && t.CompletionTime < completedBefore)
.OrderBy(t => t.CompletionTime)
.Take(maxResultCount)
.Select(t => t.Id)
.ToList();
foreach (var id in idsToDelete)
{
_jobs.TryRemove(id, out _);
}
return Task.FromResult(idsToDelete.Count);
}
public virtual Task UpdateAsync(BackgroundJobInfo jobInfo)
{
if (jobInfo.IsAbandoned)

62
framework/src/Volo.Abp.Http/Volo/Abp/Http/HttpMethodHelper.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
@ -8,15 +8,25 @@ namespace Volo.Abp.Http;
public static class HttpMethodHelper
{
public const string DefaultHttpVerb = "POST";
public const string Get = "GET";
public const string Post = "POST";
public const string Put = "PUT";
public const string Delete = "DELETE";
public const string Patch = "PATCH";
public const string Head = "HEAD";
public const string Options = "OPTIONS";
public const string Trace = "TRACE";
public const string Query = "QUERY";
public const string DefaultHttpVerb = Post;
public static Dictionary<string, string[]> ConventionalPrefixes { get; set; } = new Dictionary<string, string[]>
{
{"GET", new[] {"GetList", "GetAll", "Get"}},
{"PUT", new[] {"Put", "Update"}},
{"DELETE", new[] {"Delete", "Remove"}},
{"POST", new[] {"Create", "Add", "Insert", "Post"}},
{"PATCH", new[] {"Patch"}}
{Get, new[] {"GetList", "GetAll", "Get"}},
{Put, new[] {"Put", "Update"}},
{Delete, new[] {"Delete", "Remove"}},
{Post, new[] {"Create", "Add", "Insert", "Post"}},
{Patch, new[] {"Patch"}}
};
public static string GetConventionalVerbForMethodName(string methodName)
@ -50,24 +60,44 @@ public static class HttpMethodHelper
{
switch (httpMethod?.ToUpperInvariant())
{
case "GET":
case Get:
return HttpMethod.Get;
case "POST":
case Post:
return HttpMethod.Post;
case "PUT":
case Put:
return HttpMethod.Put;
case "DELETE":
case Delete:
return HttpMethod.Delete;
case "OPTIONS":
case Options:
return HttpMethod.Options;
case "TRACE":
case Trace:
return HttpMethod.Trace;
case "HEAD":
case Head:
return HttpMethod.Head;
case "PATCH":
return new HttpMethod("PATCH");
case Patch:
return new HttpMethod(Patch);
case Query:
return new HttpMethod(Query);
default:
throw new AbpException("Unknown HTTP METHOD: " + httpMethod);
}
}
public static bool IsGet(string? httpMethod) => string.Equals(httpMethod, Get, StringComparison.OrdinalIgnoreCase);
public static bool IsPost(string? httpMethod) => string.Equals(httpMethod, Post, StringComparison.OrdinalIgnoreCase);
public static bool IsPut(string? httpMethod) => string.Equals(httpMethod, Put, StringComparison.OrdinalIgnoreCase);
public static bool IsDelete(string? httpMethod) => string.Equals(httpMethod, Delete, StringComparison.OrdinalIgnoreCase);
public static bool IsPatch(string? httpMethod) => string.Equals(httpMethod, Patch, StringComparison.OrdinalIgnoreCase);
public static bool IsHead(string? httpMethod) => string.Equals(httpMethod, Head, StringComparison.OrdinalIgnoreCase);
public static bool IsOptions(string? httpMethod) => string.Equals(httpMethod, Options, StringComparison.OrdinalIgnoreCase);
public static bool IsTrace(string? httpMethod) => string.Equals(httpMethod, Trace, StringComparison.OrdinalIgnoreCase);
public static bool IsQuery(string? httpMethod) => string.Equals(httpMethod, Query, StringComparison.OrdinalIgnoreCase);
}

6
framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/CurrentPrincipalAccessorBase.cs

@ -8,7 +8,7 @@ public abstract class CurrentPrincipalAccessorBase : ICurrentPrincipalAccessor
{
public ClaimsPrincipal Principal => _currentPrincipal.Value ?? GetClaimsPrincipal();
private readonly AsyncLocal<ClaimsPrincipal> _currentPrincipal = new AsyncLocal<ClaimsPrincipal>();
private readonly AsyncLocal<ClaimsPrincipal?> _currentPrincipal = new AsyncLocal<ClaimsPrincipal?>();
protected abstract ClaimsPrincipal GetClaimsPrincipal();
@ -19,10 +19,10 @@ public abstract class CurrentPrincipalAccessorBase : ICurrentPrincipalAccessor
private IDisposable SetCurrent(ClaimsPrincipal principal)
{
var parent = Principal;
var parent = _currentPrincipal.Value;
_currentPrincipal.Value = principal;
return new DisposeAction<ValueTuple<AsyncLocal<ClaimsPrincipal>, ClaimsPrincipal>>(static (state) =>
return new DisposeAction<ValueTuple<AsyncLocal<ClaimsPrincipal?>, ClaimsPrincipal?>>(static (state) =>
{
var (currentPrincipal, parent) = state;
currentPrincipal.Value = parent;

8
framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/ThreadCurrentPrincipalAccessor.cs

@ -8,6 +8,12 @@ public class ThreadCurrentPrincipalAccessor : CurrentPrincipalAccessorBase, ISin
{
protected override ClaimsPrincipal GetClaimsPrincipal()
{
return (Thread.CurrentPrincipal as ClaimsPrincipal)!;
var principal = Thread.CurrentPrincipal;
if (principal == null)
{
return new ClaimsPrincipal(new ClaimsIdentity());
}
return principal as ClaimsPrincipal ?? new ClaimsPrincipal(principal);
}
}

14
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Auditing/AuditTestController_Tests.cs

@ -58,6 +58,20 @@ public class AuditTestController_Tests : AspNetCoreMvcTestBase
await _auditingStore.Received().DidNotReceive().SaveAsync(Arg.Any<AuditLogInfo>());
}
[Fact]
public async Task Should_Disable_AuditLog_For_Query_Requests()
{
_options.IsEnabledForGetRequests = false;
using (var requestMessage = new HttpRequestMessage(new HttpMethod("QUERY"), "api/audit-test/audit-success"))
{
var response = await Client.SendAsync(requestMessage);
response.StatusCode.ShouldBe(System.Net.HttpStatusCode.OK);
}
await _auditingStore.Received().DidNotReceive().SaveAsync(Arg.Any<AuditLogInfo>());
}
[Fact]
public async Task Should_Trigger_Middleware_And_AuditLog_Success_For_GetRequests()
{

11
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Tests.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System.Net.Http;
using System.Threading.Tasks;
using Shouldly;
using Xunit;
@ -18,4 +19,12 @@ public class UnitOfWorkMiddleware_Tests : AspNetCoreMvcTestBase
var result = await Client.PostAsync("/api/unitofwork-test/ActionRequiresUowPost", null);
result.IsSuccessStatusCode.ShouldBeTrue();
}
[Fact]
public async Task Query_Actions_Should_Not_Be_Transactional()
{
using var requestMessage = new HttpRequestMessage(new HttpMethod("QUERY"), "/api/unitofwork-test/ActionRequiresUowQuery");
var result = await Client.SendAsync(requestMessage);
result.IsSuccessStatusCode.ShouldBeTrue();
}
}

11
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkPageFilter_Tests.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System.Net.Http;
using System.Threading.Tasks;
using Shouldly;
using Xunit;
@ -18,4 +19,12 @@ public class UnitOfWorkPageFilter_Tests : AspNetCoreMvcTestBase
var result = await Client.PostAsync("/Uow/UnitOfWorkTestPage?handler=RequiresUow", null);
result.IsSuccessStatusCode.ShouldBeTrue();
}
[Fact]
public async Task Query_Actions_Should_Not_Be_Transactional()
{
using var requestMessage = new HttpRequestMessage(new HttpMethod("QUERY"), "/Uow/UnitOfWorkTestPage?handler=RequiresUow");
var result = await Client.SendAsync(requestMessage);
result.IsSuccessStatusCode.ShouldBeTrue();
}
}

10
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestController.cs

@ -34,6 +34,16 @@ public class UnitOfWorkTestController : AbpController
return Content("OK");
}
[AcceptVerbs("QUERY")]
[Route("ActionRequiresUowQuery")]
public ActionResult ActionRequiresUowQuery()
{
CurrentUnitOfWork.ShouldNotBeNull();
CurrentUnitOfWork.Options.IsTransactional.ShouldBeFalse();
return Content("OK");
}
[HttpGet]
[Route("HandledException")]
[UnitOfWork(isTransactional: true)]

8
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkTestPage.cshtml.cs

@ -31,6 +31,14 @@ public class UnitOfWorkTestPage : AbpPageModel
return Content("OK");
}
public IActionResult OnQueryRequiresUow()
{
CurrentUnitOfWork.ShouldNotBeNull();
CurrentUnitOfWork.Options.IsTransactional.ShouldBeFalse();
return Content("OK");
}
[UnitOfWork(isTransactional: true)]
public ObjectResult OnGetHandledException()
{

32
framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests.cs

@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using Shouldly;
using Xunit;
namespace Volo.Abp.AspNetCore.Uow;
public class AspNetCoreUnitOfWorkTransactionBehaviourProvider_Tests
{
private static AspNetCoreUnitOfWorkTransactionBehaviourProvider CreateProvider(string method)
{
var httpContext = new DefaultHttpContext();
httpContext.Request.Method = method;
return new AspNetCoreUnitOfWorkTransactionBehaviourProvider(
new HttpContextAccessor { HttpContext = httpContext },
Microsoft.Extensions.Options.Options.Create(new AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions()));
}
[Theory]
[InlineData("GET", false)]
[InlineData("QUERY", false)]
[InlineData("query", false)]
[InlineData("HEAD", true)]
[InlineData("POST", true)]
[InlineData("PUT", true)]
[InlineData("DELETE", true)]
public void IsTransactional_Should_Treat_Get_And_Query_As_Non_Transactional(string method, bool expected)
{
CreateProvider(method).IsTransactional.ShouldBe(expected);
}
}

64
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_HttpMethod_Tests.cs

@ -0,0 +1,64 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using NSubstitute;
using Xunit;
namespace Volo.Abp.Auditing;
public class AuditingInterceptor_HttpMethod_Tests : AbpAuditingTestBase
{
protected IAuditingStore AuditingStore;
private string? _httpMethod;
protected override void AfterAddApplication(IServiceCollection services)
{
AuditingStore = Substitute.For<IAuditingStore>();
services.Replace(ServiceDescriptor.Singleton(AuditingStore));
services.Configure<AbpAuditingOptions>(options =>
{
options.IsEnabledForGetRequests = false;
options.Contributors.Add(new TestHttpMethodAuditContributor(() => _httpMethod));
});
}
[Fact]
public async Task Should_Not_Write_AuditLog_For_Query_Http_Method_Without_Explicit_Scope()
{
_httpMethod = "QUERY";
var auditedObject = GetRequiredService<Auditing_Tests.MyAuditedObject1>();
await auditedObject.DoItAsync(new Auditing_Tests.InputObject { Value1 = "x", Value2 = 1 });
await AuditingStore.DidNotReceive().SaveAsync(Arg.Any<AuditLogInfo>());
}
[Fact]
public async Task Should_Write_AuditLog_For_Post_Http_Method_Without_Explicit_Scope()
{
_httpMethod = "POST";
var auditedObject = GetRequiredService<Auditing_Tests.MyAuditedObject1>();
await auditedObject.DoItAsync(new Auditing_Tests.InputObject { Value1 = "x", Value2 = 1 });
await AuditingStore.Received().SaveAsync(Arg.Any<AuditLogInfo>());
}
public class TestHttpMethodAuditContributor : AuditLogContributor
{
private readonly Func<string?> _httpMethodFactory;
public TestHttpMethodAuditContributor(Func<string?> httpMethodFactory)
{
_httpMethodFactory = httpMethodFactory;
}
public override void PreContribute(AuditLogContributionContext context)
{
context.AuditInfo.HttpMethod = _httpMethodFactory();
}
}
}

27
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpAutoLockNameWorkerTestModule.cs

@ -0,0 +1,27 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpBackgroundJobsModule),
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule)
)]
public class AbpAutoLockNameWorkerTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddSingleton<WorkerStartRecorder>();
context.Services.Replace(ServiceDescriptor.Transient<IBackgroundJobWorker, RecordingBackgroundJobWorker>());
// No lock name is given: it is derived from the job argument type names.
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.AddDedicatedWorker<WorkerJobAArgs>();
options.AddDedicatedWorker<WorkerJobBArgs>();
});
}
}

23
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpBackgroundJobCleanupTestModule.cs

@ -0,0 +1,23 @@
using System;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpBackgroundJobsModule),
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule)
)]
public class AbpBackgroundJobCleanupTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// IsJobExecutionEnabled is true by default, which the cleanup worker requires.
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.StoreSuccessfulJobs = true;
options.SuccessfulJobRetentionTime = TimeSpan.FromDays(1);
});
}
}

25
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerTestModule.cs

@ -0,0 +1,25 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpBackgroundJobsModule),
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule)
)]
public class AbpBackgroundJobWorkerTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// Drive the worker manually in tests; don't run the real periodic worker.
Configure<AbpBackgroundJobOptions>(options =>
{
options.IsJobExecutionEnabled = false;
});
context.Services.AddSingleton<ParallelJobTracker>();
context.Services.AddScoped<ScopeMarker>();
}
}

27
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpDuplicateLockNameTestModule.cs

@ -0,0 +1,27 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpBackgroundJobsModule),
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule)
)]
public class AbpDuplicateLockNameTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddSingleton<WorkerStartRecorder>();
context.Services.Replace(ServiceDescriptor.Transient<IBackgroundJobWorker, RecordingBackgroundJobWorker>());
// Two workers with different job types but the same lock name, which must fail at initialization.
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.AddDedicatedWorker<WorkerJobAArgs>("dup-lock");
options.AddDedicatedWorker<WorkerJobBArgs>("dup-lock");
});
}
}

27
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpDuplicateWorkerTestModule.cs

@ -0,0 +1,27 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpBackgroundJobsModule),
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule)
)]
public class AbpDuplicateWorkerTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddSingleton<WorkerStartRecorder>();
context.Services.Replace(ServiceDescriptor.Transient<IBackgroundJobWorker, RecordingBackgroundJobWorker>());
// The same job type is assigned to two dedicated workers, which must fail at initialization.
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.AddDedicatedWorker<WorkerJobAArgs>("lock-a");
options.AddDedicatedWorker<WorkerJobAArgs>("lock-b");
});
}
}

28
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpMultiWorkerTestModule.cs

@ -0,0 +1,28 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpBackgroundJobsModule),
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule)
)]
public class AbpMultiWorkerTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddSingleton<WorkerStartRecorder>();
// Replace the real worker with a recording one to assert how the manager resolves and starts workers.
context.Services.Replace(ServiceDescriptor.Transient<IBackgroundJobWorker, RecordingBackgroundJobWorker>());
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.AddDedicatedWorker<WorkerJobAArgs>("lock-a");
options.AddDedicatedWorker<WorkerJobBArgs>("lock-b");
});
}
}

29
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo/Abp/BackgroundJobs/AbpSameJobNameTestModule.cs

@ -0,0 +1,29 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs;
[DependsOn(
typeof(AbpBackgroundJobsModule),
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule)
)]
public class AbpSameJobNameTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddSingleton<WorkerStartRecorder>();
context.Services.Replace(ServiceDescriptor.Transient<IBackgroundJobWorker, RecordingBackgroundJobWorker>());
// Two dedicated workers with different args types that both resolve to "shared-job-name".
// AddDedicatedWorker's eager check compares by type (both pass); only the manager's backstop
// (which resolves job names) can catch this.
Configure<AbpBackgroundJobWorkerOptions>(options =>
{
options.AddDedicatedWorker<SharedNameJobAArgs>("lock-a");
options.AddDedicatedWorker<SharedNameJobBArgs>("lock-b");
});
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save