10 Creating Your First SAP BPM Process
An organization’s ability to learn, and translate that learning into action rapidly, is the ultimate competitive advantage.
—Jack Welch
In this chapter, you’ll learn how to build, configure, and deploy a process using SAP Business Process Management (SAP BPM) from the ground up. The previous chapter introduced you to the Business Process Model and Notation (BPMN) and how to use it to depict and model your process. This chapter will go a step further and focus more on the implementation side of SAP BPM. By the end of this chapter, you should have a firm understanding of how to build human-centric and system-centric processes from scratch.
We’ll begin by discussing the role of SAP BPM within SAP Process Orchestration (SAP PO) and walk through setting up your development environment. Then, we’ll show you how to implement an SAP BPM process and take a look at flow objects. In the second half of the chapter, we’ll provide the steps for building and deploying your process, discuss some advanced mapping techniques, and show how to implement error handing. Finally, we’ll show how to combine SAP BPM and the Advanced Adapter Engine Extended (AEX) and provide you with a practical exercise to test your skills.
Let’s get started with the development environment that you’ll be using.
10.1 SAP BPM Positioning and Development Environment
SAP PO includes both the Advanced Adapter Engine Extended (AEX) and SAP BPM. These two products together form a dream team. For any team to operate optimally, the roles of each player need to be clear and well defined. Furthermore, each player’s role needs to be well integrated with the other team players to cover the full spectrum of activities to be performed by the team.
10.1.1 Positioning
Let’s define up-front the positioning and role of SAP BPM within SAP PO. Figure 10.1 depicts the positioning of both AEX and SAP BPM.
Figure 10.1 Positioning of the AEX and SAP BPM
The positioning of the AEX and SAP BPM are as follows:
-
AEX
The AEX is placed between SAP BPM and the backend applications. The backend applications layer represents any SAP or legacy application providing a particular business content and functionality to an organization. These applications can be connected to or integrated using a diverse range of connectivity adapters that are provided by AEX.
The AEX layer links all of the message traffic and the exchange of data between applications. It plays the role of enterprise service bus (ESB) and performs tasks such as routing and message transformation. The AEX exposes the backend application’s functionalities as services or interfaces. The services exposed by the AEX are presented in widely accepted communication standards and protocols and are ready to be consumed by other applications. We extensively covered the subject of the AEX in the first nine chapters of the book. -
SAP BPM
SAP BPM provides a complete suite of BPM development and administrative tools to help organizations design, model, execute, monitor, manage, and analyze business processes using one platform. It allows organizations to create new processes based on existing applications and functionality, as well as new types of processes that combine different types of sources of information, technologies, and platforms, which is why the SAP BPM layer can be placed on top of the AEX layer. From the SAP BPM layer, it’s now possible to build different human-centric or system-centric processes that can use individual services exposed by the AEX.
The SAP BPM layer can consume the AEX services and orchestrate them. SAP BPM can call the first service in the AEX and use its response as the input of the next service call. This approach lets SAP BPM leverage and reuse the services already provided by SAP Process Integration (SAP PI) and therefore saves costs. This positioning lets the SAP BPM layer focus on the composition and bundling of services together to provide new functionalities and leaves the integration-related work (connecting, routing, and mapping) to the AEX, which means that direct connection to backend applications from the BPM layer should be avoided (when possible). It’s better to consume functionality provided by the backend applications via the AEX.
This positioning choice and approach uses each component for the role that it performs best; by so doing, it creates the foundation for a robust architecture.
10.1.2 Setting Up Your Development Environment
To perform your development activities, you’ll need to install the SAP NetWeaver Developer Studio, which is the Integrated Development Environment (IDE) to be used to develop SAP BPM. SAP NetWeaver Developer Studio can be downloaded from the SAP Marketplace, or go to http://wiki.scn.sap.com/wiki/display/Java/NWDS+Download+links.
Tip
It’s important to download an SAP NetWeaver Developer Studio version that matches the version of your SAP PO installation. Be aware that if there is a mismatch between SAP NetWeaver Developer Studio and the server version, then you’ll be able to build your process in design time but may face issues during deployment time.
As of release SAP NetWeaver 7.5, the new SAP NetWeaver Developer Studio can be downloaded from https://launchpad.support.sap.com/#/softwarecenter, by choosing By Alphabetical Index (A-Z) • • • SAP NetWeaver • SAP NetWeaver 7.5. Then, click on the blue Support Packages and Patches button at the top-right corner, and select Developer Studio • NW Developer Studio 7.50.
You can also find this information at https://wiki.scn.sap.com/wiki/display/Java/NWDS+Download+Links.
Given that SAP NetWeaver Developer Studio is a local development client, after installing it on your local computer, it will need to be configured to point to SAP PO’s server. For an SAP BPM implementation, the most important settings to be configured in SAP NetWeaver Developer Studio are the SAP NetWeaver AS Java and the Enterprise Services Repository (ES Repository) connection.
In the next sections, we’ll describe how to determine your SAP NetWeaver version to download the correct SAP NetWeaver Developer Studio version. We’ll also explore how to configure each one of these settings.
Finding Your SAP Process Orchestration Version
To find the version of your SAP PO installation, follow these steps:
- Go to http://<hostname>:<port>/nwa/sysinfo, where <hostname> is the hostname of your SAP PO installation, and <port> is the port number of your installation. The port number (if unchanged from the default) will be 5XX00, where XX is the SAP system number.
- On the resulting screen, select the Components Info tab.
- Here, a table is presented with the list of all existing software components (SCs). You’ll need to filter for the SERVERCORE or J2EE-FRMW component and sap.com vendor. The SAP NetWeaver version can be found in the Version column. Looking at the installation presented in Figure 10.2, notice that the version is 1000.7.31.8.6.20131030153700. The most important part of this is 7.31.8, which means that we’re running SAP NetWeaver or SAP PO release 7.31, SP 8.
Figure 10.2 Finding your SAP PO Version from the System Information and Components Info Page
SAP NetWeaver AS Java
This configuration helps to point SAP NetWeaver Developer Studio to the SAP PO server where the modeled and developed SAP BPM processes will need to be deployed. Follow these steps to configure it in SAP NetWeaver Developer Studio:
- After launching SAP NetWeaver Developer Studio, choose Window • Preferences.
- From the pop-up screen, select SAP AS Java on the left side, and then click on Add on the right side.
- You’re then prompted with a new window in which you need to provide the Instance Host Name and Instance Number of the SAP PO server (see Figure 10.3).
- Click OK. You’ll then see your newly added SAP PO server in the SAP NetWeaver AS Java list. Be aware that you can add multiple SAP PO servers in this list. You can further set the server that you’re currently using as the default system.
You’re now finished with this part of the settings configuration, so let’s proceed with the configuration of the ES Repository connection.
Figure 10.3 Configuration of SAP NetWeaver AS Java in the SAP NetWeaver Developer Studio
Enterprise Services Repository Connection
This is an optional setting and is only necessary when the SAP BPM process to be developed requires objects from the ES Repository to be imported in SAP NetWeaver Developer Studio. Follow these steps to set up the connection to the ES Repository:
- From the top menu of SAP NetWeaver Developer Studio, choose Window • Preferences.
- Navigate to the Web Services section (on the left side of the screen), and expand the node (see Figure 10.4).
- Choose Enterprise Service Browser.
- Add the parameters shown in Figure 10.4.
Figure 10.4 Connection Settings to the Enterprise Services Repository