Server Reference Guide : 7. ASOLib--OpenROAD Server Library : System Service Call Procedures : DefineBPM System Service Call Procedure
 
Share this page                  
DefineBPM System Service Call Procedure
DefineBPM is a system SCP invoked from a 4GL client using RemoteServer.Call4GL() or from a COM client using ASOSession.DefineBPM. It instantiates an object of the specified user class and associates it with the client's session context object in the remote application instance.
Before instantiating the user class object, the session context is restored, and the Dispose() method of the current BPM object is invoked. The disposed BPM is then replaced with the newly instantiated BPM, and the Init() constructor method is invoked. If however, a BPM of the requested class is already instantiated, no action is taken and the existing BPM object is unaffected. Error messages are returned in the BYREF(uc_osca) object.
Note:  Selected methods of the BPM user class object can be exposed as GSCPs. The BPM user class must be defined as a subclass of the generic Business Policy Manager—user class uc_bus_pol_mgr.
The COM client ASOSession object is described in Designing and Writing OpenROAD Server Applications.
Parameters:
('DefineBPM', b_osca = uc_osca /*byref*/,
  p_v_bpm = varchar(128))
Return Data Type: None (SCPs are invoked by Call4GL)
Example—DefineBPM:
/* assume we have already successfully run CreateASOSession */ 
i_status = CurRemoteServer.Call4GL ('DefineBPM',
                                    b_osca  = BYREF(OSCA),
                                    p_v_bpm = 'myUserClassName');
 i_status = OSCA.CheckAndHandleError (p_i_aso_retval = i_status);
. . .