Understanding Batch Workflow Applications

This section provides an overview of batch workflow applications.

For an Application Engine program to trigger a business event, it must pass its data to a component interface, and the component interface must then trigger Workflow PeopleCode in a component. Therefore, to set up batch processing, you must set up all three stages of the process:

  1. Create the Application Engine program that queries the database.

  2. Define a component interface that maps the results to a page.

    You decide whether to enter new data on a page. For example, you can create a separate table for tracking overdue invoices. Alternatively, you can use the Save method in the component interface to force PeopleCode to run without entering data on the page. In this case, you set up PeopleCode in your main invoice record and use the component interface Save method to run that PeopleCode when the invoice is overdue (without affecting the data).

  3. Create the Workflow PeopleCode that triggers the appropriate business event.

Usually, a user entering data on a page triggers a business process. For example, in a purchase order approval process, the system generates an approval request when a user enters a new purchase order. This immediate response is part of the productivity gain that PeopleSoft Workflow provides.

However, you might want to trigger routings based on an event that doesn’t involve a user; for example, when the number of outstanding work item entries becomes too high, a contract lapses, PeopleSoft Process Scheduler completes a batch process, and so on. Application Engine programs make such routings possible.

Application Engine programs do not trigger business events directly. With PeopleSoft Workflow, you trigger business events by entering (and saving) data on a PeopleSoft page that has Workflow PeopleCode associated with it.

Application Engine programs trigger business events indirectly, by passing the results of their queries to the component interface. If the component has associated Workflow PeopleCode, a business process is triggered when the component interface saves the page.

If an Application Engine program returns multiple rows of data, for example, if it finds several overdue item, the agent passes the rows to the component interface one row at a time.