Show TOC Start of Content Area

Procedure documentation Creating Custom Runtime Views Using the GP API  Locate the document in its SAP Library structure

Use

Guided Procedures (GP) enables process contributors to check different aspects of a process at runtime by means of different views. You can use a set of generic runtime views when designing process templates. In addition, you can create and attach custom runtime views to any process using the GP API.

A runtime view consists of:

      A single content component displayed in the content area.

      Several contextual panel components displayed in the contextual navigation panel.

When you create, register and attach a view to your process, it is displayed as a view switch in the contextual panel of the GP runtime.

Both contextual panel components and content components are related to and reflect the current process instance, phase and activity. They can raise runtime events which are handled by the GP runtime framework.

For more information, see Getting Familiar with the GP Runtime.

This graphic is explained in the accompanying text.

The following procedure shows you how to create both content components and contextual panel components, and how to integrate them into a runtime view configuration.

Prerequisites

You have set up your project in the SAP NetWeaver Developer Studio (NWDS).

Note

You must create a Web Dynpro component and add extra build time, deploy time, and runtime dependencies to GP-CORE caf/eu/gp/api/wd    DC MetaData  Public Parts:

       ContentComponent, in case you want to create a content component.

       CTXPanelComponent, in case you want to create a contextual panel component.

For more information, see Setting Up Your Project.

Procedure

...

       1.      Implement the following interfaces:

¡        IGPRTContentComponent for content components.

¡        IGPRTCPComponent for contextual panel components.

More information: Runtime View Component Interfaces

Note

In NWDS, you can add these interfaces to your DC project by choosing Implemented Interfaces  Add from the Web Dynpro Explorer view. The interface methods required for their implementation are automatically generated in the interface controller.

       2.      Implement the mandatory interface methods for the components you created previously.

For more information, see Interface Methods for Component Initialization.

       3.      If you use the NWDS, make sure you embed the view of your new Web Dynpro component into the component window created for the respective interface.

       4.      Implement a resource accessor for the language-specific translations of the view title and description. For this purpose, you need to create:

¡        A Java package (for example, com.sap.caf.eu.gp.runtime.resource).

¡        A Java class (for example, ContentPaneResourceAccessor) whose super class is com.sap.caf.eu.gp.co.api.GPStandardResourceAccessor.

¡        A text file with extension .properties within the package (for example, ContentPane.properties). In the file, enter the following keys:

Example

FrameTitle=Custom View

PaneTitle=Custom Content Pane

PaneDescription=Custom CPane Description

       5.      Implement the logic of the custom runtime view:

                            a.      Implement a method that allows for modification of the view before rendering.

In NWDS, implement the wdDoModifyView() method.

                            b.      Define additional UI elements, attributes and methods depending on your particular needs.

                            c.      Define mappings between the attributes you have created.

       6.      Once you have created a Web Dynpro component and implemented the interfaces from step 1, you should register the component (for example, in the wdDoInit() method of the component controller).

For more information, see Registering Web Dynpro Components and Runtime Views.

       7.      Create and register the view configuration.

¡        Temporarily, using an application.

For more information, see Registering Web Dynpro Components and Runtime Views.

¡        Each time the service starts, using an HTTP servlet.

For more information, see Registering Runtime Views Using Servlets.

       8.      In GP design time, add the view to a process and test it in runtime.

For more information, see Defining Runtime Views.

End of Content Area