Show TOC Start of Content Area

Procedure documentation Instantiating the Design Time Manager  Locate the document in its SAP Library structure

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.

Note

The design time manager is the interface that provides access to the design time API. It is implemented in two parts: 

       IGPDesigntimeManager

       IGPDesigntimeUpdateManager

The first interface provides read-only access to development objects, while the second one allows their modification.

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.

Example

Instantiating the GPDesigntimeUpdateManager

import java.util.Locale;

import com.sap.security.api.IUser;

import com.sap.security.api.logon.IAnonymousUserFactory;

import com.sap.security.api.UMFactory;

import com.sap.caf.eu.gp.context.api.IGPUserContext;

import com.sap.caf.eu.gp.context.api.GPContextFactory;

import com.sap.caf.eu.gp.process.api.GPProcessFactory;

import com.sap.caf.eu.gp.process.dt.api.IGPDesigntimeUpdateManager;

import com.sap.caf.eu.gp.exception.api.GPBaseException;

import com.sap.security.api.UMException;

 

// get the default locale

Locale locale = Locale.getDefault();

try {

      

     // get user info – we use ‘anonymous user’ for the example

     IAnonymousUserFactory factory = UMFactory.getAnonymousUserFactory();

     IUser user = factory.getAnonymousUser();

     IGPUserContext userContext = 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

     }

 

       3.      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

End of Content Area