Show TOC Start of Content Area

Function documentation Suspend and Resume Plug  Locate the document in its SAP Library structure

Use

The suspend plug and the resume plug enable the interoperability between Web Dynpro and other Web applications, such as Java Server Faces or Struts.

They are used to suspend a running Web Dynpro application (when the suspend plug is fired) in order to jump to an external Web application and to resume the Web Dynpro application (using the resume plug) at the same position as soon as it is called by the external application.

The suspend plug is an outbound plug of the InterfaceView of type suspend, the resume plug is an inbound plug of the InterfaceView of type resume.

Usage in the Enterprise Portal

In the Enterprise Portal, interoperability is ensured by the Portal Page Navigation. If you have set the Suspensibility property for your Web Dynpro application, then the Web Dynpro application automatically assumes the suspend or the resume state if the application is suspended or resumed by the portal navigation.

See also Portal Navigation

Prerequisites

To be able to put a Web Dynpro application into the suspend state and resume it later on, you must set the Suspensibility (sap.suspendable.application) application property to true.

Suspend Plug

When the suspend plug is fired, the parameter Url is passed to which you have assigned the URL of the target application. The URL which is required to resume the Web Dynpro application from within the external application is automatically determined by the Web Dynpro runtime and attached as a URL parameter to the URL of the target application passed.

To fire the suspend plug, the following method is used:

·        wdFirePlug<suspend plug name>(String Url)

All parameters are contained in the URL; the parameter string must not exceed 1k, including the part that is added later by the Framework. To encode the application parameters, use a tool such as the Java URL Encoder.

Caution

The parameter Url is case-sensitive.

 

The External Application

The external application received the URL, which it must use later to call the Web Dynpro application again, in the form of a parameter. This parameter is called sap-wd-resumeurl and consists of the URL of the Web Dynpro application and of a parameter containing the session ID. This parameter enables the external application to call the Web Dynpro application via the resume plug. Additional parameters that have been included can now be read and processed. When you intend to navigate from the external application back to the Web Dynpro application, you can again include parameters into the resume URL of the Web Dynpro application.

The Web Dynpro application can be called either using a HTTP POST request or using a HTTP GET request.

Behavior of the Web Dynpro Application During the Suspend State

When the suspend plug is fired, the Web Dynrpo application assumes a suspend state, due to which the application can be resumed at exactly the same position when it is called again via the resume plug.

The length of the suspend state depends on the interval you set in the application property ExpirationTime.

If this duration is exceeded before the Web Dynpro application has been called by the resume plug, then the Web Dynpro application is terminated. If the resume plug is called after the application has been terminated, then the Web Dynpro application is restarted. The difference to a normal application start is that the resume plug is called instead of the startup plug.

When the resume plug is called in this case, it is possible to restore the state the Web Dynpro application had before it was terminated: you must store the current state of the Web Dynpro application before you terminate it.

If the Web Dynpro application changes its state, the event stateChangeEvent is triggered, which can be queried in the wdDoApplicationStateChange method of the component controller. Here, you can use IWDApplicationStateChangeInfo to query the status. Three reasons are possible for calling the method:

·        Suspend: The Web Dynpro application is suspended. In this case you should minimize the storage requirement.

·        Resume: The Web Dynpro application is reactivated.

·        Timeout: The Web Dynpro application is terminated due to a timeout event. After that, the wdDoExit methods are called.

In addition, you can query the session ID under which the Web Dynpro application can store data. This session ID is again passed in the call of the resume plug, thus storing the data.

Resume Plug

The resume plug is fired when the external application calls the Web Dynpro application using the resume URL.

Additional Links

For information on the application properties, see Configuring a Web Dynpro Application.

 

 

End of Content Area