In the last couple of days I did some interesting stuff with SAP BPM. Basically I used BPM in the past to implement human centric workflows on top of MDM or MDG but it’s also very beneficial to deploy new services which are running independently from any user input.
The strategy of this approach is well known: Instead of developing new components, services or applications you reuse existing, well tested and often used components and building blocks and put them just together to get a new functionality.
In my case I did a prototype by leveraging the out of the box MDM Web Service in BPM and expose them as composition by giving the simple CRUD-MDM Services meaning. The requirements for the prototype were as follows:
- In a master data harmonization scenario a remote system such as SAP ERP need to do a check in a central MDM repository before creating a new vendor master data record in ERP.
- Because of that ERP needed to call a synchronous (web) service at MDM side to check if the potential new vendor already exists in MDM or not.
- If the record already exists, MDM should return a list of candidates. Based on that information, ERP would inform a user about the fact that he is creating a duplicate vendor in ERP.
- If no duplicates were found by the MDM Matching, the service must create a new vendor record and must return the unique key.
If you review the requirement it seems to be very easy because SAP MDM is shipped with configurable Web Services for generic operation like:
- CRUD (Create, Read, Update, Delete)
The problem is just:
How to put the different services together in the right sequence? – The answer is:
SAP Business Process Management!
This image gives you a high level architecture overview.
The image should highlight the idea: Instead of coding a Java EJB which calls itself the MDM Web Services and implement the logic with Java Code you can use BPM to develop this on code free basis.
The following image shows the process flow of the prototype:
As you can see the process flow includes no human activity at all. Because of that an instantiation of a process will execute within (milli-)seconds and the calling system will get a synchronous response. Within the Exclusive Choices you can implement the logic with the expression editor or, if this is not sufficient, you can even call a complex Business Rule which might be implemented in SAP BRM.
From an implementation perspective I have done the following steps:
- Creation of MDM Web Service with the MDM WS Configurator
- Creation of a Process Composer Development Component in NWDS
- Definition of a XSD for Import and Export Interfaces
- Definition of a Web Service with one operation to start the BPM process
- Modeling of the BPM Process as shown above & assignment of the web service to the newly created trigger
- Import of the MDM Web Service in to the DC including a definition of Service Group
- Assignment of MDM Web Services to the automated activities
- Input/ Output Mapping on the automated activities and Mappings: Please be aware that you sometimes need to use the generic function “get” in the Expression editor
- Build & Deploy of the DC
- In NWA: Configure the Service Group
- Start WSNavigator and test the service
Last but not least I would like to share some benefits of this approach:
- Save money and reduce costs during the development phase due to the fact that you can develop your own services with BPM very fast.
- Reduce risk by reusing existing standard components instead of developing new code.
- Enable business users to model their own services: BPM has two different views for modeling the flows. Business Users can define on a higher level the process flows. A Service Developer can later on do the details on the mappings etc in the Process Modeling Perspective. In a next release even more is planned by a integration of BPM into Streamworks for instance.