Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_henke
Contributor

In this blog, I would like to introduce you to a project in the context of NetWeaver Business Process Management (BPM) which is hosted on Code Exchange. You can find it at [1]. The project is about a RESTful service for NetWeaver BPM which is completely built on the BPM API that has been published with the 7.30 release of NetWeaver. The idea was to design it as generically as possible, so that it can be used in various scenarios.

The project should serve as a guide on how the new BPM API can be used to extend the functionality of NetWeaver BPM for additional requirements that are not yet covered by BPM out of the box. As the project is hosted on Code Exchange, the source code is publicly available in the Subversion (SVN) system. Feel free to take a look into it. It covers all of the features that the BPM API [2] offers: Simple retrieval of Task Instances, changing the status of a Task Instance, starting new Process Instances, and much more.

However, there are also other things that the project wants to prove. The open source project Apache CXF [3] is used for provisioning the RESTful service. It is a generic framework which, among other things, allows you to publish RESTful services from Java coding based on the JAX-RS standard [4]. In the project, you can see how you can use third party and open source libraries in your own applications.

Due to the Code Exchange guidelines, the project cannot be used in a productive environment. Regardless, in the current state the code is missing certain critical features that are required for a productive usage like sophisticated caching in the service to avoid unnecessary calls of the BPM API, the possibility for batch processing (mass operations) etc.

In summary, you can find the main features of the project as follows:

  • Provides remote access to most common entities of NetWeaver BPM
  • Supports not only read-only retrieval scenarios, but also write operations
  • Based on the public NetWeaver BPM API (introduced with 7.3 release)
  • RESTful service using HTTP binding which allows easy consumption on various platforms (for example, on mobile platforms)
  • Implemented as JAX-RS  service using Apache CXF to provide support for RESTful service
  • Runs on a NetWeaver AS Java 7.3
  • Supports XML as well as JSON for data transfer

To get started, you need to refer to the two discussion threads in the Discussion area of the project: The first that explains how to download a released version of the project. For this you do not have to connect to SVN, but can directly download the SCAs for deployment. Details can be found at [5]. The second Discussion thread explains how to get the source code from SVN into the NetWeaver Developer Studio. You must consider this option to inspect the coding or contribute to the project. Details can be found at [6].

The RESTful service consists of two productive Software Components, JAX-RS and BPEM-RESTSVC, which must be deployed to the AS Java.

JAX-RS

This SC contains the deployable archives of the Apache CXF framework which is used for RESTful service provisioning. Additionally, it exposes the JAX-RS API to build against. There is no source code in the SC, therefore you won´t find any java files in SVN. As the CXF archives are not stored in SVN, you have to first download them and add them yourself. This is described in one of the threads mentioned above.

BPEM-RESTSVC

This SC contains the NetWeaver BPM RESTful service itself. It has dependencies to the SC BPEM-FAÇADE exposing the BPM API as well as JAX-RS and contains all Java coding of the project.

Once you have installed the components, you might wonder how to use and access the functionality. To give you a complete overview about the HTTP resources exposed by the RESTful service, there is a technical reference guide available at [7]. It contains the technical details of how the different aspects of HTTP (like URL, method, headers, and bodies) are to be configured for individual requests. Though it contains you all the required information, the document is not meant to give you a step-by-step guide for introduction. I´m going to publish another blog that contains a tutorial for the BPM RESTful service in the next few days.

So, stay tuned.

 

[1] https://cw.sdn.sap.com/cw/groups/bpm-rest-api

[2] http://help.sap.com/javadocs/NW73/SPS03/CE/bpem/com.sap.bpem/index.html

[3] http://cxf.apache.org/

[4] http://jcp.org/en/jsr/summary?id=311

[5] https://cw.sdn.sap.com/cw/message/51605#51605

[6] https://cw.sdn.sap.com/cw/message/50805#50805

[7] https://cw.sdn.sap.com/cw/docs/DOC-146067

21 Comments