Instantiating the Design Time Manager

Use

To be able to work with the Guided Procedures (GP) design time API you need an instance of the IGPDesigntimeUpdateManager interface. It provides functionalities for creating, opening for edit, saving, activating, releasing and deleting GP objects.

Prerequisites

You have set up your project in SAP NetWeaver Developer Studio. For more information, see Setting Up Your Project .

Procedure

  1. To get an instance of the design time update manager, specify an IUser and a Locale .
  2. Instantiate the design time update manager.

Instantiating the GPDesigntimeUpdateManager
importjava.util.Locale;
importcom.sap.security.api.IUser;
importcom.sap.security.api.logon.IAnonymousUserFactory;
importcom.sap.security.api.UMFactory;
importcom.sap.caf.eu.gp.context.api.IGPUserContext;
importcom.sap.caf.eu.gp.context.api.GPContextFactory;
importcom.sap.caf.eu.gp.process.api.GPProcessFactory;
importcom.sap.caf.eu.gp.process.dt.api.IGPDesigntimeUpdateManager;
importcom.sap.caf.eu.gp.exception.api.GPBaseException;
importcom.sap.security.api.UMException;
 
// get the default locale
Locale locale = Locale.getDefault();
try{
      
    // get user info - we use 'anonymous user' for the example
     IAnonymousUserFactoryfactory = UMFactory.getAnonymousUserFactory();
     IUseruser = factory.getAnonymousUser();
     IGPUserContextuserContext = GPContextFactory.getContextManager().createUserContext(user, locale);
       
     // instantiate the design time update manager
     IGPDesigntimeUpdateManager manager = GPProcessFactory.getDesigntimeUpdateManager(userContext);
     } catch (GPBaseException e) {
       // exception occurred when instantiating the design time manager
     } catch (UMException e) {
       // exception occurred when getting the user info
     }
  1. Once you have instantiated the update design time manager, you can create and modify GP development objects.

See also:

Creating GP Development Objects

Editing GP Development Objects

Deleting GP Development Objects

Including Additional Functionality