Using A COR•REC Service

Requesting a COR•REC Service follows a single pattern but requires specific information and authorization.  Before you can access a service, your plugin must first request permission and receive approval. Requesting an action from the service is always directly connected to that specific service. It is the responsibility of the service provider to document the requirements for accessing the service.

Requesting Access

Add the com.corgroup.bmp.osgi.service extension to your MANIFEST.MF with at least one element. The element contains two key-value pairs. The hr_name should clearly define the plugin requesting access to the service. The service_id holds the unique ID of the service being requested.

<extension
    point="com.corgroup.bmp.osgi.service">
    <service_id_element
        hr_name="COR•REC Inventory"
        service_id="com.corgroup.bms.accounting.ap#ACCOUNTS">
    </service_id_element>
</extension>

Accessing a COR•REC Service

Access starts by fetching the service from the service registry. Continuing with the earlier example, shown in Requesting Access - request a service class. A java.util.ArrayList is returned containing the service found. 
Example

String plugin_id = "your-plugin-fqn";
String sv_id = "com.corgroup.bms.accounting.ap#ACCOUNTS";
ArrayList<CorrecService_I> service_list = CorrecServiceRegistry.LOOK_UP_SERVICES(plugin_id, sv_id);

The service may be accessed using the methods found in com.corgroup.bmp.osgi.service.CorrecService_I. All interface methods may be overridden by the service creator so assume nothing.  The service provider is responsible for documenting a service.

Reference Links:

COR•REC Services Documention
© CORGROUP® LLC 2025 All right reserved