Create and use a ProcObject
- Last Updated: March 15, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Each AppObject that defines ProcObjects also defines a built-in class factory method specifically for each ProcObject. This method runs a persistent procedure on the AppServer that thereby establishes a persistent AppServer session context that is encapsulated by the ProcObject for access by the client.
To create and use a ProcObject:
- Instantiate (create) the ProcObject as appropriate for the client platform.
- Call the class factory method for this ProcObject on the parent AppObject or SubAppObject to run the persistent procedure on the AppServer.
- Obtain the ProcObject ID value from the response header of the class factory method. Use this ProcObject ID for all subsequent calls to methods on the ProcObject.
- Invoke any available methods on the ProcObject.
- Ensure that the last method you invoke on the ProcObject is the object's release method. For more information, see Release an object.
Note: You can instantiate a ProcObject either before or after calling the class
factory method and getting the ProcObject ID, but you must complete all of these steps
before you invoke methods on the ProcObject.