Show TOC

Assigning a Custom User Interface to a TaskLocate this document in the navigation structure

Prerequisites

  • The following data is available:

    • Relative URL of your Web application that act as task execution UI

    • Input and output data type

    • Fault data type for exception handling

    For implementing the task input, output and fault interface, refer to the Service Data Objects (SDO) standard. Use the BPM API to handle the data transfer and the task life cycle (complete, fault, delegate, nominate).

  • The UI component you want to assign runs either on the same Application Server Java (AS Java) as the Process Server, that is, where the process definition with the task is deployed or on a remote system and you have configured an HTTP destination to this system in the Destination service in SAP NetWeaver Administrator. For more information, see  Maintaining HTTP Destinations.

  • You have created a task to which you want to assign the UI.

Context

You assign a user interface (UI) to a task to allow the user to access and execute that task. You can assign UI components of different UI technologies. This document describes how you assign your own task execution UI implemented in an arbitrary technology and available on the same or on a remote system..

In principle, you can make use of any UI technology that is able to access a Java-based API and that can be deployed to the Application Server Java (AS Java). In order to do this, the BPM API offers methods to read the complete data of a task. The task instance ID is passed to the UI via HTTP parameter taskId . Additionally, input and output data that are mapped from and to the embedding process, can be read. Tasks in SAP BPM always run through a well-defined life cycle starting from creation and ending with completion or failure. The BPM API offers life cycle operations that allow you to change the status of a task.

For more information on how to use the BPM APIs to build your own task execution UI, see Building an Execution UI with the BPM API .

Note

The interaction between the custom UI component and the BPM system is restricted to data interaction through the BPM API, for example, for completing the task. Closing the task execution UI, refreshing or reloading the task execution UI page or caching the data that the user has entered is not handled by BPM but must be externally handled.

You can also use the BPM OData services to acces the task data and complete a task using a custom UI and interacting with the process server. For more information including supported and not supported data types, see OData Services for Accessing BPM Task Data.

Procedure

  1. In the Developer Studio, choose Start of the navigation path Window Next navigation step Open Perspective Next navigation step Other... Next navigation step Process Development End of the navigation path and choose the OK pushbutton.
  2. Expand your project in the Project Explorer view.
  3. Expand Process Modeling, then expand Tasks .
  4. In the context menu of a task, choose Open .

    The task editor opens.

  5. On the Overview tab page, under User Interface, choose the Choose... pushbutton.
  6. In the dialog box that appears, select Custom Technologies and then choose the OK pushbutton.

    The UI wizard for assigning a custom UI opens.

  7. Enter the relative URL of the Web application that acts as task execution UI.
    Note In case you want to use a UI component running on a remote system, add a destination placeholder at the beginning of the relative URL that corresponds to the name of a configured destination in the Destination service using braces {...}. For example, you add {name_of_http_destination}/<relative URL>, where name_of_http_destination is configured as an HTTP destination to some remote system. The placeholder is replaced at runtime with the URL configured in the destination service and the task UI is executed on the remote system.
  8. Select data types for the input and output data. Optionally, you can select a fault data type for exception handling.

    You can also select Browse... to search through the available data types.

  9. Choose the Finish pushbutton and save the task.

Results

When a user now opens a corresponding task from the universal worklist (UWL) or the BPM Inbox, the Web application whose URL (local or remote) you have configured at design time is opened and initialized with the current task instance. If the task is opened in the UWL, it will be claimed automatically and the user who opens the task becomes the actual owner of the task. In the BPM Inbox, users can first claim the task via the Claim pushbutton before working on the task in the task execution UI.

Next Steps