Designing Energy-Efficient Pega Workflows: A Step Toward Sustainable Automation

Sustainability is not only a hardware topic. Every database call, every background job and every screen refresh in a Pega application uses electricity somewhere. The good news is that the changes that make an application greener are almost always the same changes that make it faster and cheaper to run. This post is a practical checklist you can use in a design review. For the wider argument, see our companion article Sustainable Automation: Rethinking Pega Workflow Design for Energy Efficiency.

Designing Energy-Efficient Pega Workflows: A Step Toward Sustainable Automation

The checklist

AreaWhat to look forHow to check
Data pagesThe same reference data loaded again and again. Wrong scope, or a refresh strategy that reloads on every accessTracer and the clipboard: is the page reloaded on each screen?
Database accessQueries inside loops, reports with no filters, wide selectsPerformance Analyzer (PAL) readings, database alert logs
Background workPolling agents that wake up every few seconds and find nothingAgent schedule, and log lines that show empty runs
IntegrationsSeveral small calls that could be one, or synchronous calls that block a threadConnector run time in the Tracer
Declarative rulesDeclare expressions that recalculate more often than neededTracer, and the declarative network view
SLAsTimers and escalations that fire rarely but are evaluated constantlySLA rule goals and intervals

Five changes that usually pay off

  1. Cache reference data. Put countries, products and branches in data pages with a sensible refresh time, and use node scope for data that is the same for every user.
  2. Replace polling with queues. Move work from old agents to a Queue Processor or Job Scheduler, so the system only works when there is something to do.
  3. Filter at the database. Put the conditions into the Report Definition, not into a loop that reads everything and throws most of it away.
  4. Batch integrations. Send one request carrying twenty records instead of twenty requests carrying one.
  5. Keep clipboard pages small. Do not load a full customer history when the screen shows three fields.

A worked example

A bank's nightly job reads every open account, calls a pricing service once per account, and then writes the result back one row at a time. On review the team finds three easy improvements:

  • The pricing table is loaded for each account. A node-level data page loads it once.
  • The pricing call is made per account. A batch call sends 100 accounts at a time.
  • The job is triggered by an agent that checks every minute. A Job Scheduler runs it once at 01:00.

The job now does far fewer database and network calls. Measure your own before-and-after numbers with PAL, because the size of the saving depends on your data.

How to make it a habit

  • Add a short "efficiency" section to your design review template.
  • Record PAL readings for the busiest screens before and after each release.
  • Set a rule that every new agent needs a written reason, because a queue or scheduler is usually the better choice.

Further reading

For a broader look at how Pega workflows connect to sustainability goals, read Green AI: How Energy-Efficient Pega Workflows Can Help Advance U.S. Sustainability Goals. On this site, see Queue Processor and Job Scheduler in Pega.

No comments:

Post a Comment