Set Processing 101

When I was reading the What’s New with Batch Processing in PeopleSoft Enterprise Oracle OpenWorld presentation some time ago, the following slide caught my attention:

What are the Problems with AppEngine

  • These programs can be complicated – and for a programmer they’re different
  • Same logic can be used Batch and Online – Really?
    • Different transactional model
    • Temp table behavior is very different
    • No restartability
  • Easy to write a poor performing App Engine Program
    • Since the introduction of PeopleCode, poor performing programs are the norm

 

Admittedly, I don’t have a lot of experience writing batch programs on Application Engine. But I believe the primary reason it is so easy to write poor-performing AE programs is that AE batch programs are better suited to be programmed using set processing. Set processing requires a different mind set to what procedural programmers are used to. I am new to it as well, so I find that this discussion in ITToolbox, and this followup provides valuable insights on how to perform set processing. Steve’s technique of what he calls partial cartesian joins is quite useful as well, especially for those not running an Oracle database.

Asynchronous App Engine Process With Parameters

To call a synchronous App Engine process via PeopleCode, use the CallAppEngine() builtin function. Any run parameters for the App Engine can be passed through a record specified in the function parameters. The record field values are loaded to the App Engine program’s state record(s) when it runs.

If attempting to initiate an App Engine process asynchronously, the only way to do so is through the ProcessRequest class — the PeopleCode API for the Process Scheduler. Unlike CallAppEngine(), there is no straightforward way to pass parameters to the scheduled process. Following are 2 methods for passing parameters to an App Engine process.

Continue reading