Show TOC Start of Content Area

Procedure documentation Preparing Web Dynpro DC to be used in BPM  Locate the document in its SAP Library structure

In the process composer of SAP NetWeaver Business Process Management (BPM) a direct human interaction with the process model is represented using the human activity flow object. A task is in turn assigned to the human activity so that it can be executed. The task must have a user interface (UI) assigned to it. UI integration with the process layer takes place on this level.

In addition, a human activity must be capable of receiving input data from the process context and transforming it.

More information: Modeling Human Activities

Procedures

Enable Web Dynpro DC to React on Process Events

To establish a communication between the Web Dynpro component and a human activity, you first need to provide process events required for task execution in the process layer. For this purpose, you will create both in the component controller and in the local interface controller at least one event to signal the completion of the task, and optionally an error event, which signals an error during the component’s lifecycle.

Note

To define context elements in the local component interface you can use right-click copy operation on elements of the component controller and right-click paste on the local component interface controller.

To ...

       1.      To create the respective events, open the component controller by double-clicking on it in the Web Dynpro explorer.

       2.      Select the Events view and create two events:

¡        Complete

¡        Error. This event is optional.

Note

The names are case sensitive.

       3.      Repeat this for the component interface controller and also create these events here.

       4.      Create a method in the component controller, e. g. sendCompleteToBPM.

       5.      Insert the following code into this method:

wdThis.wdFireEventComplete();

 

 

 

 

       6.      Optionally you may create another method to fire the error event.

       7.      Create a UI element, for example a button, define an action as event handler for this button and call this method inside this action

wdThis.wdGet<your component controller’s name>.sendCompleteToBPM();

Example:

public void onActionSubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

  {

    //@@begin onActionSubmit(ServerEvent)

 

wdThis.wdGetBudManApprovalController().complete();

 

    //@@end

 

wdThis.wdGet<your component controller’s name>.sendCompleteToBPM();

 

Create Public Parts for the Web Dynpro DC

To enable the Process Composer component to add it to its dependency list, you have to expose the Web Dynpro DC’s Component Controller via its public part.

More information: Managing Public Parts

Specify the Dataflow

A Web Dynpro component contains different controller entities for the implementation of the navigation and application logic on the one hand and visual entities that represent the UI parts on the other. In addition, a Web Dynpro component implements further interfaces for external clients. This allows, for example, the implementation of data exchange out with the limits of the Web Dynpro component using the interface controller. This is possible because the interface controller permits the integration of an external component with the embedded component at the controller level.

More information: Defining Controller Relations

 

Note

Using Web Dynpro component usages at runtime, data is set to Web Dynpro context elements at a certain point of time in the Web Dynpro component’s lifecycle. Consequently data processing of data that is set from an outside (loader) Web Dynpro component, for example from the process desk, should be done afterwards. Referring to the hook methods of a Web Dynpro component, this is after the component controller’s wdDoInit() method.

Web Dynpro Phase Model

You need to know in which phase the Web Dynpro context is filled by human interactions via the process desk. The following methods can access the content of the Web Dynpro context:

·        Component Controller:

¡        wdDoBeforeNavigation

¡        wdDoPostProcessing

·        Component View:

¡        wdDoInit

¡        wdDoModifyView (firstTime: Boolean)

End of Content Area