
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.
The first interface provides read-only access to development objects, while the second one allows their modification.
You have set up your project in SAP NetWeaver Developer Studio. For more information, see Setting Up Your Project .
| 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 } |
See also:
Creating GP Development Objects
Editing GP Development Objects