Creating the user objects you will access

How you define user objects for an automation server depends mainly on your application design. The object must be a custom class user object. You define instance variables and functions for the object. The object can declare and instantiate other objects for its own use.

Objects created using automation

When the client instantiates multiple objects in the same server runtime session, you can pass references to those objects, enabling the objects to work together.

You can make a PowerBuilder object you create from the client aware of another by passing it that reference. When the objects exist in the same session, PowerBuilder accepts the OLE object reference and also recognizes the underlying PowerBuilder object datatype. This reference gives access to the first object’s properties and methods just as in any PowerBuilder application.

Keeping this technique in mind, you can define functions for the user object that accept object references passed from the client, assign them to the correct variable type, and treat the references as instantiated PowerBuilder objects, which they are.