Using NetWeaver PI’s Mapping in NetWeaver BPM
With NetWeaver 7.31, a new capability is introduced to use PI mappings in BPM. Even though BPM has a powerful mapping capability using XPath expressions, it is not quite as powerful or flexible as PI’s Operation Mapping. Using Operation Mapping, we have the following advantages:
- We can use Message Mapping, XSLT and Java programs; this provides much greater flexibility when we design mappings and transformations.
- Operation Mapping can have multiple mapping programs during the mapping process. The mapping programs can be executed in sequence. The mapping programs can be a combination of Message Mapping, XSLT and Java.
- Reuse existing Operation Mapping to save development time.
In this blog, I will go over the steps of how to use PI’s Operation Mapping in BPM.
It is assumed that the user is familiar with using the NWDS tool to design BPM processes.
Limitations
There are some limitations:
- No parameters. The Operation Mapping cannot contain any parameters, since there is currently no way to pass parameter values from BPM to PI. So, this eliminates the possibility of using the “wizard” to do lookups using tables and RFCs. However, we can still use user-defined functions to do such lookups.
- NetWeaver 7.31 SP2 or above.
Operation Mapping Design in the ESR
We can develop or use the existing mappings in the ESR as before. The Service Interface used can have any interface pattern; it is not examined by BPM. Therefore, we can just use “stateless”, or whatever the existing interface pattern is using.
The Operation Mapping I am using is very simple; it uses a key then use the Fixed Values Lookup Table to find the value.
There is no need for any configuration in the Integration Directory. Operation Mapping is exposed as a web service and can be call by BPM directly.
BPM Process Design in NWDS
I will not go through the steps and how-tos of using the BPM design tool in NWDS, this information can be obtained from SAP Help and other SCN blogs and articles. However, I will only detail the how-tos of using Operation Mapping during the design phase.
The basics steps are:
- Import the WSDL of Operation Mapping.
- Create an Automated Activity in BPM to reference the imported WSDL.
- Create a new Service Reference using the type “WS” and “localhost”.
- Create the Input and Output Mappings. This is to:
- map the BPM local variable to the outbound interface of the Operation Mapping
- map the result of the mapping in the inbound interface to a local variable.
These mappings are normally drag-n-drop, one-to-one…very simple.
As you can see in the Composite Designer perspective, where we design our BPM process, there is no place where we can import Operation Mapping:
Therefore, we have to use the Process Development perspective:
You will be prompted for username and password to logon to the ESR. Select the Operation Mapping from the ESR by navigating the SWCV and namespace.
After importing, you should see something like the screen below with the WSDL of the mapping:
You can now switch back to the Composite Designer perspective and find the WSDL under Service Interfaces:
In BPM design tool, we create a mapping step of Automated Activity:
Select in the mapping WSDL in the drop-down for the Service Interface:
Select “New…” for Service Reference:
In the New Service Reference dialog box, check the “Local Provider System” and “Finish”.
Perform Input Mapping:
Perform Output Mapping:
That is it!
Additional Reference:
http://help.sap.com/saphelp_nw73ehp1/helpdata/en/d9/ccbfe89e2a4b80b818e28f1107db9a/frameset.htm
Thanks for the blog. I heard about this great feature of calling mapping as service in TechEd last year and this seems the first detailed documentation about that.
My initial thinking was that there would be a generic web service for calling the mapping, but this is not the case. I just have a small doubt. Is the structure of wsdl for operation mapping dependent on message mapping or in simple words, do we need to re-import wsdl everytime there is any change in mapping?
Regards,
Sunil Chandra
Hi Sunil,
As of today, PI and BPM are not as tightly integrated such that the objects are shared. The WSDL will have to be re-imported if it is changed. BPM is still just a consumer of the web service. I believe, which I have not had the opportunity to test, the provider of the mapping service does not have to be on the same server as BPM (meaning localhost). The location of the WSDL during runtime can be chaged/configured using the NWA, in the Service Group.
Regards,
William Li
hi Bill,
are all operation mappings exposed as WSs ?
is there a place where we can get their WSDLs somehow in order to check the endpoint
as while importing them to the BPM the endpoint is missing I believe.
Thank you,
Regards,
Michal Krawczyk
Hi Willem
In the ccBPM world, we were able to trap errors in the mapping step throuch exception branch. is there a similar option available in Netweaver BPM?.
I guess - one could use the Boundary events but how would one define boundary events for an operation mapping?
Hi William,
Thank you very much for your fantastic blog, as usual.
I'm working on a SAP PO 7.31 SP7 and SAP Developer Studio 7.3 SP 7 PAT000. When I follow your steps and import Operation Mappings something very strange happens. Operation Mapping folder and wsdl folder are empty and also Service Interface folder but I can see wsdl files from my Operation Mappings in src/wsdl. When I switch to Composite Designer perspective I cannot see any new wsdl files in Service Interface folder but I can see them in src/wsdl folder.
Do you know why I've got this issue?
Thank you very much in advance.
Kind regards
HI Carlos,
We have had similar issue and reported to SAP. I believe SAP is working on a fix for this issue. This happens when one of the interfaces involved in the operation mapping is based on an external definition.
Regards,
Arul
HI Arul,
Thanks for update. Please let me know when you get response from SAP.
Kind regards.
The fix has been delivered by sap now. you will need to get a patch installed in your NWDS. However I am not able to install it and hence reported it back to SAP. Let me know how you go. Note: 1890203
Thank you very much Bai Li. Unfortunatly I'm working on a PI.731 java stack in a aws.amazon.com instance and my user in marketplace doesn't have authorization to download sca file to apply patch. But I think this patch should be apply in PI itself. SCA files should be deployed in SAP Netweaver Administrator. Are you able to download sca file. My PI system is in SP7. It would be nice if someone can send me NWCEIDE07P 8-10009598.SCA file.
Thank you very much for your help.
Kind regards
in case someone can help me with this sca file, please send it to me by email (carlos.ocampos@gmail.com)
Thanks in advance.
Hi,
This is a patch for NWDS, the Eclipse tool, not for PI. Also, the size of the file is 1286540 KB, this is much too big to send via email or any other method available to me. You need to download it from the SAP Service Marketplace. There is a download link in the Note 1890203 (https://service.sap.com/sap/support/notes/1890203).
Regards,
William Li
Hi William,
Thank you very much for info. This is a particular case for me. I'm working in a client with SAP Basis team and normally they take care of this stuff. But in this case with PI 7.31 java stack only I'm working by myself using one instance in aws.amazon to practice and learn how to migrate from dual stack to java stack. I've tried to download file from Note 1890203 but
No download authorization
That's why I cannot download it. But thanks anyway. I will try to find the way to download it.
Kind regards
P.D. Congratulations for your fantastic blogs.
Hi William,
Finally I've got sca file. But I don't know how to apply it in NWDS (Eclipse Tool). I'm trying a kind of import of sca file but with no results. I've opened the sca file and I can see the content like BUILDARCHIVES folder with some zip files inside and also DEPLOYARCHIVES with some sda files inside.
I'd appreciate if you can guide me somehow.
Thank you very much in advance.
Kind regards
SAP has delivered the patched NWDS version for us.
try this one
on site
https://nwds.sap.com/swdc/downloads/updates/netweaver/nwds/nw/731/doc/auto_com.sap.netweaver.developerstudio.distribution.complete.extsoa_versions.html
Thanks Bai Li, I will try..
Hi William,
Nice Blog. I have the same problem with my NWDS 7.3 SP07 that i am not able to import operation mapping.
I have downloaded NWCEIDE07P_9-10009598.SCA. I do not know how to apply it in my NWDS. Please let me know how to apply this patch to my NWDS.
Rgds
Hi,
You can use this link to install the full version:
https://nwds.sap.com/swdc/downloads/updates/netweaver/nwds/nw/731/doc/auto_com.sap.netweaver.developerstudio.distribution.complete.extsoa_versions.html
Regards,
William Li
Hi William,
Thanks for the reply. I have nwds-extsoa-7.3-EHP1-SP07-PAT0009-win32 downloaded from the same link which you shared. In this NWDS, i am not able to import operation mapping. Thus,I have downloaded NWCEIDE07P_9-10009598.SCA patch as per recommendation in this blog.
But I do not know how to apply this SCA patch to my NWDS. Please advise on it.
Regards
Hi William,
I am able to apply the NWCEIDE07P_9-10009598.SCA patch in my NWDS and it worked fine.I am able to import operation mapping in my NWDS 7.3 SP07.
The way to import sca files in NWDS is shared below :
Open NWDS -> switch to "Development Infrastructure" perspective ->do right-click on the "local development" and then select "Import SC"
Rgds
Hi William,
Good Day!
Thanks for Sharing. Very nice blog.
Have a wonderful day!
Regards,
Hari Suseelan
Hi William,
Always been fan of yours 🙂
Nice blog.
Sorry but I have basic question, we are SAP PI 7.31 SP07, AEX, no PO version.
We could not find WSDL option in Operation mapping?
Regards
Divyesh
Hi,
You will need to have PO. Otherwese, do you have BPM installed in the same SID as AEX?
Regards,
William
Thanks for your reply.
Sorry for my late response.
--Divyesh
HI,
I am trying to import xslt operation mapping to SAP NetWeaver Developer Studio(
SAP Enhancement Package 1 for SAP NetWeaver Developer Studio 7.3 SP08 PAT0000), but getting error:
Unable to import Document(s)
The element type "wsdl:types" must be terminated by the matching end-tag "</wsdl:types>".
Could you tell me, please, the reason of the problem of the xslt-mapping import?
But graphical mapping is imported successfully.
Thank you.
Hi,
From BPM, you can import Operation Mapping. Is the XSLT configured inside an Operation Mapping, just as Message Mapping?
I am not aware of any limitation of importing the Operation Mapping containing XSLT. If there is, then it is a bug and should open a ticket for SAP support.
Regards,
William
HI,
Thank you. Yes it is. The Operation Mapping OM_CheckDate contains XSLT Message Mapping.
Nice blog William. Really helpful. However 1 quesiton, can we set the value of a particular parameter in BPM itself? e.g. If condition is true, set the message "The condition is true" otherwise false similar to container operation in ccBPM.
I tried it using Mapping activity but I don't think it can be useful in the same.
Thanks
Hi Ameet,
Not sure I understand the question. Are you referring to parameterized mapping, as in setting the comm chan to use during mapping? If so, this is not possible.
The content of the source and target interfaces can be set and examined within BPM. A "Gateway" in BPM can be used to examine the content and control the flow of the msg.
Regards,
William
Hi William,
I have created a inbound Service interface in ESR which has external definition as message. When I import it in BPM(using import WSDL option) , it created namespace and service interface within, which is perfect, but it did not create any data type under Data Types section.
My question is, how to create Data Objects artifact in this situation?
Thanks
Sandeep Maurya
create an automated activity for the service interface you created. You can then create the data objects by dragging the data types from the input/output mapping of this automated activity onto the area where your BPM diagram sits. In this way, it will create the data objects automatically for you.
Bai,
Whatever you are saying is true if service interface is using DataType and message Type but it is not correct when you use external definition to create service interface.
My question is still same, how to create Data Objects artifact if service interface is developed using external definition.
Thanks Sandeep.
Hi Sandeep,
Have you got the solution for this ? How to create Data Objects artifacts if service interface is developed using external definition ?
Appreciate your response.
Thanks,
Pushkar
Hi
the WSDL that is generated from the imported Operation Mapping : what end point is expected here. My wsdl:service > soap:address location has a port of 50500 - which does not even exist!. How can it work Does this get automatically deployed onto the Service Registry?.
I have built and deployed this but I get a run time error when it executes the operation mapping. A technical error during invocation: Could not invoke service reference name.
I have seen in the deployed BPM's Application Configuration against the Consumed Service Groups an error against the associated service group
Configuration for service
group [SG_localhost] failed. Error details: [No endpoints found. Check if the service is configured and if its endpoints are available in the . Service
It almost seems that it wants me to publish the end point on the service registry - no idea how....but I none of the blogs and post indicate that I need to fiddle with this at all.
I have this question in SDN too if you care to take a look.
thanks
hi,
when i am trying to import the operation mapping. i am getting the following error "error parsing the WSDL document". and "The element type "wsdl:types" must be terminated by the matching end-tag "</wsdl:types>"".
can any one please help me regarding the issue.
When splitting flow to use one Op. Mapping or another, NWDS shows that we cannot create localhost as Service Reference so I cannot flag Local Provider System for the next Op. Mapping, only for the first.
Is it okay to use multiple Op. Mappings in same Service Reference (localhost) or should I create new Service Reference for each Op. Mapping being added to BPM?
Thanks William!
Rafael.