11.2 Testing and Running an SAP BPM Process
After you’ve successfully deployed and made all necessary SAP NetWeaver Administrator configurations, it’s time to trigger your process. This section will focus on finding the deployed processes in the SAP PO server via the Process Repository. Furthermore, we’ll explore how to run and test the deployed process.
11.2.1 Process Repository Overview
The Process Repository is a tool within SAP NetWeaver Administrator that enables administrators to view the following information:
- All deployed SAP BPM DCs
- Versions of the components
- Related process and task definitions
- Start process instances
- Process-related resources available to download
To access the Process Repository, follow these steps:
- Log in to SAP NetWeaver Administrator.
- Navigate to Configuration Management • Processes and Tasks • Process Repository. You’ll then see the screen presented in Figure 11.16.
The next sections will explore each of the Process Repository’s features.
Figure 11.16 Process Repository Overview with the List of Components
List of Process Development Components
In this view, you’ll see a list of deployed DCs containing processes. After selecting a DC, a list of all its deployed versions is shown. Each time the DC is deployed, a new version is created on the server. The version number contains the deployment date and time. The latest DC to be deployed is automatically activated and considered as the active version.
Activate and Deactivate Development Components
You can always see which process is currently active by looking for the check in the Active column (refer to Figure 11.16). If you want to run a different version than the latest deployed one, you can select any version and then click on the Activate button to make it the running version. Similarly, you can deactivate any versions by using the Deactivate button.
Start Process
From this page, you can start any process that has been deployed to the SAP PO server. It’s important to note that starting a process from the Process Repository is an activity reserved for administrators. The user needs to have sufficient authorization to access the functionality.
In most cases and normal, everyday operations, a process should be triggered from the outside. An example is an arriving message or an interface being called from the AEX.
Note
More details about the functionalities provided by this page are provided in Section 11.2.2.
To start a new process instance, follow these steps:
- From the Process Repository’s page, select the active version, and click on the Start Process button.
- You’ll see a new pop-up, in which you can enter input data.
- After filling in the data, click on Start Process to trigger the creation of a new instance.
Download Resources
You can go to the Resource tab from the Process Repository’s page, select any of the listed resources, and download them. The files to be downloaded are in different forms: WSDL files, data types, and other file resources.
11.2.2 Process Testing
You now know how to find a deployed process on the server via the Process Repository. There are two main ways to call or test these SAP BPM processes:
- Internally from SAP PO
- Externally using a web service client tool
We’ll now explore these two approaches.
Internally from SAP Process Orchestration
To call the process from within the SAP PO server, follow these steps:
- To get to the Process Repository, from the SAP NetWeaver Administrator main page, navigate to Configuration Management • Processes and Tasks • Process Repository.
- From the Process Repository, search for the DC containing the process that was previously deployed. After selecting it, the Processes and Tasks tab will be populated with all available processes contained in the selected DC.
- Select the desired process from the Processes and Tasks tab, and click on the Start Process button (Figure 11.17).
-
You’ll see a new pop-up, in which you can provide input data for the process.
Figure 11.17 Start an SAP BPM Process from SAP NetWeaver Administrator
-
After filling in the data, click on Start Process (Figure 11.18). You’ll see a message indicating that the process started. The message also provides you with the process instance ID.
Figure 11.18 Provide Input Data for the Process
- As you can see in Figure 11.18, in addition to directly providing the input data required by the SAP BPM process, you can also upload an existing XML file using the Browse and Upload buttons.
- Alternatively, you can call the SAP BPM process like any other web service by using the Web Services Navigator, accessible via http://<hostname>:<port>/wsnavigator.
You can also use the Single Service Administration tool from SAP NetWeaver Administrator to test or start the SAP BPM process, via the following steps:
- From SAP NetWeaver Administrator, navigate to the SOA tab.
- Click on the Application and Scenario Communication subtab, and then click on the Single Service Administration link.
- Enter the name of your service interface in the Find search field to find the WSDL.
- Once found, select the WSDLs tab, and click on the Test button to launch the Web Services Navigator.
After starting the new process, you can monitor it. More details about how to monitor the process can be found in Chapter 15.
Externally Using a Web Service Client Tool
It’s more common to call the SAP BPM process from outside of the SAP PO server. An external application will send a message, which will in turn start a new instance of the SAP BPM process. First, you need to obtain the WSDL or endpoint of the concerned process.
The WSDL can be obtained in one of two main ways:
-
SAP NetWeaver Developer Studio
It’s possible to use the message event trigger of the SAP BPM process from SAP NetWeaver Developer Studio to find the location of the WSDL. Figure 11.19 shows that the WSDL URL can be retrieved from the Endpoint Name field. Here, the endpoint is http://<hostname>:<port>/nwa/appcommunication. You’ll need to replace <hostname> and <port> with the actual details of your SAP PO server.
Figure 11.19 Endpoint of the SAP BPM Process as Seen in the Message Event Trigger
-
Single Service Administration (SOA in SAP NetWeaver Administrator)
From SAP NetWeaver Administrator, you’ll need to navigate to the SOA tab, and then choose the Application and Scenario Communication subtab. Then, click on the Single Service Administration link. Use the Find search field to search based on your service interface name. Once found, you’ll need to select the WSDLs tab and click on the ZIP Download button to download the WSDL on your local machine.
After you know the WDSL link or file, you can use a SOAP client tool of your choice to start the process. One such commonly used tool is SoapUI.
As mentioned in Chapter 1 when talking about the positioning of SAP BPM, the recommended approach is to call the AEX and let it trigger SAP BPM.