Open Closed

Custom API with Background Job #751

User avatar
neurawitch created

Check the docs before asking a question: Check the samples, to see the basic tasks: The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: vX.X.X
  • UI type: Angular / MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Seperated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Any advice on the best way to implement a custom AP that's designed to handle callbacks from multiple external services anonomously that once the message is recived, needs to execute a background job that has to query/insert multiple records across several of the defined services within MongoDB? We have the callback working correctly, but having issues calling the db services, since the job is not running within the context of an authorized user. Is there a way where we can define a system user that has all the permissions necessary and if so, how would we go about setting that within the background job.

Apologies in advance if I missed this within the documentation.

1 Answer(s)
  • User Avatar
    liangshiwei created
    Support Team


    Your background job should call domain services instead of application services.

Made with ❤️ on ABP v8.0.0 Updated on September 27, 2023, 12:25