Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development

> ## Creating PLIPs

> There is a Progress Dynamics structured procedure template for PLIPs. If you create a new procedure using this template, you can then place your own internal procedures inside it and invoke them through the Session Manager using the `aflaunch` include file.

> | To create a new PLIP:

> 1. From the AppBuilder, choose New or select File New.

> 2. The New dialog box appears, as shown:

> 3. Select Structured PLIP as the object type to create in the AppBuilder. The wizard prompts you to identify the name, description, and purpose of the procedure for documentation purposes, as follows:

> Your PLIP will contain a few standard include file references, which provide it with the structure it needs, in the Main Block, and in the procedures `killPlip`, `plipSetup` and `plipShutdown`.

> There is also a standard `objectDescription` procedure, shown in Figure 11–4, where you can specify a meaningful description string for your procedure that can be returned to callers.

> Figure 11–4: Standard objectDescription procedure

> Now you can add your own internal procedures and invoke them through `launch.i`. The Session Manager and the `launchProcedure` method that is invoked by `launch.i` handle the following tasks in running your business logic:

> - Identifying the AppServer partition where the external procedure is running or is to be run.

> - Establishing a connection to the AppServer.

> - Making the call to the specified internal procedure.

> - Returning any `OUTPUT` parameters.

> Your calling procedure can specify the logical name of the AppServer partition where the PLIP will run at run time, which maximizes the flexibility of your distributed application.

> Keep in mind the following issues:

> - You should never place any statements into your business logic procedures that would attempt any interaction with the user interface. Always expect that such procedures will be run in a separate Progress session on a separate machine from where the calling client application procedure is located.

> - Because your procedure should run on an AppServer, you should not pass Progress buffer references to it, as the AppServer connection does not support this. Always pass data in the form of temp-tables, even if there is only one record involved.

> - Make sure that your PLIP will not expect to have access to any other information that would only be available in the client session, such as `SHARED` or `GLOBAL` variable values, other buffer values, object properties, etc. Expect that it will run in a completely separate session from the client, and always be sure to test it that way.

> PLIPs can be used for any kind of business logic that must be isolated from the client applications that call it. Using the `launch.i` include file, you can pass any set of parameters into the procedure. This can make it straightforward to incorporate existing logic procedures you might have written into Progress Dynamics, as long as they do not have any dependencies on the user interface or on client data.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095