Activities and background processing
Activities and background processing
Activities provide flexibility to automate system processing tasks. For example, an organization wants to offer a 20 percent discount on the products that will expire in seven days. A job scheduler runs an activity once a day to perform this task. To enable this process, you first configure a report that filters products that will expire seven days from the date of the report. Then, you create a job scheduler activity to run the report, apply the discount to the expiring products, and update the product prices in the database. The following video illustrates the activity that begins each time the job scheduler wakes up.
Queue processors and job schedulers handle read/write transactions on database objects differently. As shown in the video, a job scheduler includes steps in the activity to identify the items expiring in seven days, apply the discount, and then save and commit the change. Job schedulers do not manage the read/write operations on database objects. Queue processors automatically manage the read/write transactions on database objects. If a queue processor needs to update an object, the activity should not contain any steps to perform the read/write objects to the database part of the process.