Jump to: navigation, search

Scout/HowTo/3.7/Create a Process Service

< Scout‎ | HowTo‎ | 3.7
Revision as of 10:14, 10 March 2010 by Asc.bsiag.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A popular use of a process service is to access data on a database. Assuming a typical dialog, here's what we need:

  1. create a new item(insert)
  2. load an existing item (select)
  3. update an existing item (update)
  4. delete an existing item (delete)

Create a new process service on the server in the folder Process Services. In our example, we'll call it SubAgreementProcessService. If you've already created a form to go along with it, make sure you indicate SubAgreementFormData.

This automatically creates the following ISubAgreementProcessService for you:

 public interface ISubAgreementProcessService extends IService{
   SubAgreementFormData create(SubAgreementFormData formData) throws ProcessingException;
   SubAgreementFormData load(SubAgreementFormData formData) throws ProcessingException;
   SubAgreementFormData prepareCreate(SubAgreementFormData formData) throws ProcessingException;
   SubAgreementFormData store(SubAgreementFormData formData) throws ProcessingException;
 }

The appropriate class is also created for you. Edit SubAgreementProcessService and replace all instances of "TODO business logic here" with the real thing. :)