CloudStreams 10.5 | webMethods CloudStreams | webMethods CloudStreams Development | CloudStreams Provider Project | Advanced Configurations | Abstract Object Definition
 
Abstract Object Definition
CloudStreams supports two abstract object types: BusinessObject and SchemaObject. A Business Object represents business entities such as an invoice or a transaction. Some SaaS providers expose these business entities, and for those back ends, you need to create abstract objects so that you can dynamically create the signatures.
So for back ends to represent business entities correctly and also to reduce the effort needed to get information for each entity, you can abstract the back end entity by defining appropriate abstract object types. You need to create a Document Type (DocType) that will be used to create the abstract object type and to get information about those objects, you must also implement two look up services. The look up services are like dynamic calls to the back end to list and describe the back end entities.
At run time, the abstract object type you have defined will be filled up by the two lookup services. The boList lookup service will allow you to list the back end supported business entities and the boDescribe lookup service will retrieve the fields corresponding to each business entity.
If Schema Objects are already defined in the schema file provided by the SaaS provider, document types for all the objects that are present in schema file are automatically created. For Schema Objects, you need to define the abstract objects and implement the soList and soDescribe look up services.
To define an abstract object
1. Create a DocType that has an abstract field, for example, *any. The DocType has a node of Object or ObjectList. The DocType can be referenced from another DocType that could be used in the body of the Request/Response of a resource.
2. Right-click on a Resource Group or Operation Group/Services (for SOAP) and select Define Object Type....
3. In the Document Type field, click Browse and select the DocType that defines the structure of the abstract object. This is the DocType created in Step 1.
Note:
If you select Derive objects automatically, abstract objects will be derived automatically from the schema if a schema file exists.
4. For REST, if you have selected Derive objects automatically, click Next to view the Select Concrete Object dialog box, which displays the list of concrete objects. Select a concrete object that is the default implementation for the abstract object. The abstract object created is a Schema Object.
For SOAP, the Operation List dialog box appears. The Operation List dialog box displays the SOAP operations related to the selected document type in Step 3. If you select an operation in the list, that operation will be marked as a complex operation.
5. For REST, if you have not selected Derive objects automatically, click Next to see the Assign Services dialog box. The Assign Services dialog box displays the list of look up services that implement the boList lookup type. Select the look up services that you implemented for the abstract object. If you select the Generate objects listing the service option, stubs for the services will be automatically generated. You can also choose existing services listed in the Assign Services dialog box.
For SOAP, the Operation List dialog box appears. The Operation List dialog box displays the SOAP operations related to the selected document type in Step 3. If you select an operation in the list, that operation will be marked as a complex operation. Click Next to see the Assign Services dialog box. The Assign Services dialog box displays the list of look up services that implement the boList lookup type. Select the look up services that you implemented for the abstract object. If you select the Generate objects listing the service option, stubs for the services will be automatically generated. You can also choose existing services listed in the Assign Services dialog box.
6. Click Next and select the look up service that implement the boDescribe lookup type. If you had selected the Generate objects listing the service option, skip to Step 7.
7. Click Finish. The services appear in the Defined Objects pane. For every object defined, the services will be accordingly listed. For a Schema Object, the concrete object details will appear.
8. From the Defined Objects pane, you can select Define Object... to define an abstract object type, or select Edit Object... to modify an existing abstract object, or select Remove to delete an existing abstract object.