Vous êtes sur la page 1sur 46

Latest Update: For those of you who don’t have a NWDS yet I’ve added a few more

samples as attachments for you to look at instead.


Roll up Roll up get your free Enterprise Integration Pattern models here… ok so now that I’ve got
your attention… most people like free stuff, and we have some free stuff to help those of you
who are getting into the wonderful world of SAP NetWeaver Process Orchestration. Here’s a
sample:

What are Enterprise Integration Patterns for?


Enterprise Integration Patterns (EIP) help in solving recurring problems faced in the integration of
enterprise applications.

What does it take to put Enterprise Integration Patterns


in place?
Most patterns consist of a mix of SAP NetWeaver PI Integration Flow (iFlow) configurations and
SAP NetWeaver BPM process implementations… in other words they rely on the power of SAP
NetWeaver Process Orchestration which combines both of these technologies.

Why have these models been created?


We’ve noticed that a lot of customers, partners and even SAP employees who are coming into
SAP NetWeaver Process Orchestration are coming from a SAP NetWeaver PI background. As
such, we’re seeing people pick up the Integration Flows fairly quickly – as many of the concepts
haven’t changed that much so it’s mostly about getting used to a new, more graphical editor.
However the BPM process models are very different to the old ccBPM models in earlier releases
of PI. Even though the BPMN notation is comparatively straightforward to understand, wrapping
your head around how to organize the processes to achieve certain integration goals can take a
while.
Now, the guys back in the lab (SAP Labs, that is) do hope to provide working (complete,
executable) examples of the patterns as soon as they can, but that’s going to take a little while as
a full pattern has many dependencies – WSDLs to create, adapters to be configured, many
individual objects to be created and then mapped together, not to mention the server and release
dependencies, and there’s the odd other project or two they need to work on in the meantime,
such as features for the next release. We expect the working examples will be offered as a
follow up to Abdul-Gafoor Mohamed’s (ably assisted by Prashant Gautam) excellent blogs on
the Enterprise Patterns when they are ready.
However in the meantime, having had a few discussions and a bit of back and forth with the
guys, and with several reviews from the leading lights in this area especially Volker Stiehl, but
also Alexander Bundschuh, Joachim Bayer and Martin Moeller, we’re offering a set of
REFERENCE MODELS ONLY that you can import into NWDS to help with getting started with
Enterprise Integration Patterns in Process Orchestration or as a quick start for creating your own
processes.
The aim of these reference models only is to:

 Demonstrate how to build the patterns in BPMN notation


 Provide some guidance through annotations and step descriptions on details and options
 Act as a quick start for creating your own executable processes by importing the patterns
into your own Process Composer projects

PLEASE NOTE: These are NOT executable models and not intended to be executable – they
are reference models only. To make them into complete executable processes you would
need to add your WSDLs, mappings, and integration flows.
What’s included in these models?
All of the Enterprise Patterns released in SAP NetWeaver Process Orchestration 7.3 EHP1 SP04
to SP06 (yes we’ve included the Conditional Start pattern). We’ve also included variations – e.g.
how to control aggregation with a counter vs. controlling aggregation with a timer.

You’ll notice lots of annotations with explanatory notes – we’ve even indicated where perhaps for
simple scenarios you might want to not use a BPMN model at all but handle the pattern entirely
in Integration Flows.

In the title of each process pool we’ve indicated the minimum release required.
And make sure you read the step descriptions of each step – these contain additional details,
such as for Claim Check the specific Service Interface and Operation required to complete the
Retrieve Messages from Database step.

How do you use the models?


First step is to pull the models into your own NWDS. The models have been created in NWDS
release 7.3 EHP1 SP05 – but because they are models only you should be able to pull them into
any NWDS that offers the BPMN import.

1. Download the zip file of the Enterprise Patterns reference models, unzip it and save the
SCA file to your local network
2. Open your NWDS
3. Go to the Development Infrastructure Perspective
4. Using the context menu on LocalDevelopment choose the option Import SC to select and
import the SCA file you have downloaded.
5. The Software Component EAI_PATTERNS will then appear under LocalDevelopment.

The next step is to view the models.


To view the models expand the Software Component EAI_PATTERNS and use the context
menu to Create Project for the DC eai_patterns_samples. Most importantly DO NOT go to the
Associated Perspective yet. Just create the project. This is because the associated perspective
is the Process Development perspective and because these are models only, if you go there you
will see a whole bunch of “please complete me” errors for the processes.
Instead use the menu Window > Open Perspective > Other… to choose and open the Process
Modeling Perspective.
Expand the project [LocalDevelopment] eai_pattern_samples to find all the reference models in
the Processes folder under Process Modeling. You can then double-click on any pattern to view
the details.

Finally if you want to use a pattern as a quick start for your own process, just use the context
menu on the relevant process pattern to export it in BPMN 2.0 format and store the exported file
somewhere on your local network.

Then expand your own Process Composer Project, and use the context menu on the Processes
folder (in your own project) to import the BPMN 2.0 file into your own project. Don’t forget to
rename the process!

BTW because these are reference models they were deliberately created in Draft status. So
before you complete the pattern in your own project, put your cursor anywhere in the drawing
area outside the process pool and in the Properties pane General tab you will see the model is in
Release Status: Draft.
Press the Release to Build button to take it out of draft status and then you are free to complete
the pattern. Just remember that at this point you will also start seeing all the “please complete
me” errors, which will help guide you to what you need to provide to make the process
executable.

And Finally…
Remember these are REFERENCE MODELS ONLY – use them to help you understand how the
Enterprise Patterns should be described in BPMN and to
quick start your own processes. Just remember to ignore any errors or warnings you see on the
models if you happen to view them using the Process Development perspective, instead of the
Process Modeling perspective.
Enjoy! And please let us know if you find them useful.

This document guides you with creation of a simple BPM Process along with Integrating a PI
Service Interface in the Process. The objective of this document is to demonstrate a perfect
example of using all components of the PO Suite (BPM, BRM & PI).

Scenario:
We will develop the BPM with a ‘Travel Expense Approval’ scenario in mind, where, based on
the Employee Level & His Travel Expense, the BRM will decide if it is Approved or Rejected. This
BRM will be called by a PI Service Interface.
The Start Trigger (Web-service) of the BPM process will consist of 2 Input Parameters :
Employee_Level & Expense Amount.
These input parameters will be passed from BPM to PI Service Interface, which, in turn, will call a
BRM web-service to check the Business Rules. The BRM web-service will return the
corresponding output value to PI, which will again be passed to BPM for further usage.
So the flow would go like this: BPM–>PI–>BRM–>PI–>BPM.
Prerequisites:
1. Check for Proper Connection between NWDS and PI Enterprise Service Repository
in Window–>Preferences–>Web-services–>Enterprise Service Browser. Enter the
appropriate details and check if the Service Repository is reachable.
2. The PI Connectivity is done properly in Windows–>Preferences–>PI Tools Configuration–
>Connections.
3. A developed PI Service Interface which calls the BRM Ruleset for Travel Expense Approval.
For our scenario, the BRM Ruleset Decision Table looks like this:

Note: For more details on hot to create a BRM, please refer this step-by-step document.
Let’s get started:
1. Open the ‘Development Infrastructure’ perspective in NWDS. Right-click on the SCA –> New –>
Development Component:
2. Select ‘Process Composer’ perspective –> Next :

3. Name the vendor, the component,provide description –> Finish:


4. The project will be created with the following structure:

5. Now, to create a process in the BPM Project, right-click on Processes –> New Process:
6. Name the Process, Pool and Lanes –> Finish:

7. The created Process, along with the Pool and the Lanes should look like this:
8. Now, depending on the process flow design we will drag and drop various activities and events
from the Design-palette into the process flow and link them according to the flow:

9. Now, according to our scenario, we need the Business Flow as follows:


Start-Event (With input parameters) –> Automated Activity (To execute PI Service Interface) –
>Notification Activity (To send an email to the recipient)–>End.
As we already have the Start and End Event by default, we only need Automated Activity and
Notification Activity from the Palette:
10. Now that the process design is ready, we need to create the data holders which will hold the data
throughout the process execution. These are called Data Objects in BPM. They are available in the
design-palette:

11. Now, to set Data-type for the Data Object, Right-click on the Data-object –> Properties–>Select
Data-type from the dropdown:
12. Similarly, create 2 more data objects- One to store the Expense amount(int) & one to store the
Approval Result(string):

13. Now that the process design and the data holders are ready, we need to integrate the external
components required for each of the design activities in the process design.
In our case, we need only the Service Interface to be integrated into the automated activity.
(Notification Activity does not require any external entity).
Entities such as Service Interfaces, Web-services etc. are converted to WSDL files and then
integrated into the BPM Project.
So, we will integrate the Service Interface as a WSDL. Right-click on WSDL Folder in Project
Explorer–>Import WSDL–>Select the appropriate method (Enterprise Service Repository)–>Next:

14. Enter credentials –> Next:

15. Expand the folders to the appropriate Service Interface, select it –> Finish:
16. Once the Service interface is successfully imported to your BPM Project, you will see the
corresponding packages in the ‘WSDL Files’ Folder:

17. Now that the Service interface is ready for use in the BPM Project, now we will create all the
components required for each and every activity in the process design.
As we know that the Start Event of every Process is nothing but a web-service, we need to
create the corresponding WSDL for the Start Event in the BPM Project.
Right-click on ‘Service Interfaces’ –> New WSDL :

18. Name the WSDL File –> Next:


19. Keep the protocol unchanged (SOAP) –> Finish:

20. You will see the design of the created WSDL:


21. As our Scenario is Asynchronous, we will delete the output parameters.
Right-click on output tab –> Delete:

22. Deleting output from design is not enough. We need to delete the output parameter from the XML
code of the WSDL too.
Click on ‘Source’ tab –> Delete the ‘/output’ tag:

23. Now go to the design tab again. As we need to add Input Parameters
(Employee_Level,Expense_Amt), we will add these as Input for Start Event:
Click on the Arrow next to ‘input’ tag:

24. Double-click on the parameter name to edit:


25. Double-click on the data-type to change:

26. Repeat Steps 24-25 to create the following structure:

27. Now, the Asynchronous WSDL is ready to use. Now, each and every start event is associated
with a trigger. In our case, it will be a Message Trigger. So we will create a new message trigger.
Right-click on ‘Event Triggers’ –> New Message:

28. Name the Trigger –> Next:


29. Select the WSDL we created for the Start Event from the Dropdown for the Service Interface and
click Finish:

30. The trigger is now created. Assign this trigger to the Start Event.
Right-click on Start-event –> Properties –>Event Trigger –>Select from Dropdown:
31.
Now, we need to call the PI service Interface in the Automated Activity.

Right-click on Automated Activity –> Properties –> Interface –> Select from Dropdown:

This takes care of the Automated Activity.


32. Now, right-click on the Notification Activity –> Properties –> To–>’Choose’ UME User (As the
recipient of the email):
33. In the next dialog box, enter the search criteria –> click on the desired recipient from the
result-set –> Add –> OK:

34. Now that the recipient is set, we need to add the Subject and the Content of the email in the ‘Mail’
Property:

35. Now that all the properties of all the design activities are set, we need to do the data mapping:

A. Start Event –> Process Context:


B. Process Context –> Automated Activity (Passing input to PI Service Interface):

C. Automated Activity –> Process Context(Output of PI Service Interface, back to BPM Process
Context):

36. Now that the data mapping is complete, the BPM Process is complete and ready for use.
But for Troubleshooting and Admin purposes, we assign an administrator to the BPM Process.
Right-click on Pool –> Properties:
37. In Pool Properties, Set the Administrator in the Administrator property, similarly like we selected
the recipient of the email in step # 32 & 33:

38. Finally, check for any Build-errors.


Right-click on BPM Project –> Development Component –> Build:
39. Check the status in the Infrastructure Console:

Note: There are no build errors but warnings are always going to be present. However, these
warnings do not affect the deployment.
40. Now that there are no build errors in the project, it is ready to be deployed onto the server and
used. Deploy the DC.
Right-click on the BPM Project –>Development Component –> Deploy:
Now, our BPM is ready to use on the server. You can test it in 2 ways:

1. Trigger the BPM Start Web-service in WSNavigator


2. Start the Process Manually from the Process Repository.

Hope this document helps people in some way or the other.

Please let me know if I have mentioned anything incorrectly in this document.

Integrating PI Operation Mapping with SAP BPM

With the overwhelming boom that SAP PO Suite has been receiving so far, we see new
challenges coming up in all the 3 components.
We face many hurdles when it comes to integrating BPM with BRM, BRM with PI, PI
Components with BPM etc.
This document captures one such important facet of integration.

Objective:
This document will have a step by step approach as to how we can import a PI Operation
Mapping into SAP BPM in NetWeaver Developer Studio 7.3 EHP1.

Scenario:
The Scenario of this document will be the same as in this document. The only difference will be
that instead of importing the PI Service Interface, we will be importing an Operation Mapping
from the PI Repository for further processing.
Prerequisites:
Check the NetWeaver Developer Studio for the following:
1. Check for Proper Connection between NWDS and PI Enterprise Service Repository in Window–>Preferences–
>Web-services–>Enterprise Service Browser. Enter the appropriate details and check if the Service Repository is
reachable.
2. The PI Connectivity is done properly in Windows–>Preferences–>PI Tools Configuration–>Connections.

Let’s get started:

1. Open the ‘Development Infrastructure’ perspective in NWDS. Right-click on the SCA –> New –>
Development Component:

2. Select ‘Process Composer’ perspective –> Next :


3. Name the vendor, the component,provide description –> Finish:
4. The project will be created with the following structure:

5. Now, to create a process in the BPM Project, right-click on Processes –> New Process:
6. Name the Process, Pool and Lanes –> Finish:

7. The created Process, along with the Pool and the Lanes should look like this:
8. Now, depending on the process flow design we will drag and drop various activities and events
from the Design-palette into the process flow and link them according to the flow:

9. Now, according to our scenario, we need the Business Flow as follows:


Start-Event (With input parameters) –> Automated Activity (To execute PI Operation Mapping) –
>Notification Activity (To send an email to the recipient)–>End.
As we already have the Start and End Event by default, we only need Automated Activity and
Notification Activity from the Palette:
10. Now that the process design is ready, we need to create the data holders which will hold the data
throughout the process execution. These are called Data Objects in BPM. They are available in the
design-palette:

11. Now, to set Data-type for the Data Object, Right-click on the Data-object –> Properties–>Select
Data-type from the dropdown:
12. Similarly, create 2 more data objects- One to store the Expense amount(int) & one to store the
Approval Result(string):
13. Now that the process design and the data holders are ready, we need to integrate the external
components required for each of the design activities in the process design.
In our case, we need only the Operation Mapping to be integrated into the automated activity.
(Notification Activity does not require any external entity).

Entities such as Service Interfaces, Web-services etc. are converted to WSDL files and then
integrated into the BPM Project.
So, we will integrate the Operation Mapping.
Right-click on ‘Operation Mappings’ in Project Explorer–>Import Operation Mapping–>Enter
Credentials–>OK:
14 . Expand the folders to the appropriate Operation Mapping–>Select it–>Finish:
15. Once the Operation Mapping is successfully imported to your BPM Project, you will see the
corresponding packages in the ‘WSDL Files’ Folder under Operation Mappings:

16. Now that the Service interface is ready for use in the BPM Project, now we will create all the
components required for each and every activity in the process design.
As we know that the Start Event of every Process is nothing but a web-service, we need to
create the corresponding WSDL for the Start Event in the BPM Project.
Right-click on ‘Service Interfaces’ –> New WSDL :

17. Name the WSDL File –> Next:


18. Keep the protocol unchanged (SOAP) –> Finish:

19.You will see the design of the created WSDL:


20. As our Scenario is Asynchronous, we will delete the output parameters.
Right-click on output tab –> Delete:

21. Deleting output from design is not enough. We need to delete the output parameter from the XML
code of the WSDL too.
Click on ‘Source’ tab –> Delete the ‘/output’ tag:

22. Now go to the design tab again. As we need to add Input Parameters
(Employee_Level,Expense_Amt), we will add these as Input for Start Event:
Click on the Arrow next to ‘input’ tag:

23. Double-click on the parameter name to edit:


24. Double-click on the data-type to change:

25. Repeat Steps 23-24 to create the following structure:

26. Now, the Asynchronous WSDL is ready to use. Now, each and every start event is associated
with a trigger. In our case, it will be a Message Trigger. So we will create a new message trigger.
Right-click on ‘Event Triggers’ –> New Message:

27. Name the Trigger –> Next:


28. Select the WSDL we created for the Start Event from the Dropdown for the Service Interface and
click Finish:

29. The trigger is now created. Assign this trigger to the Start Event.
Right-click on Start-event –> Properties –>Event Trigger –>Select from Dropdown:
30.Now, we need to call the PI Operation Mapping in the Automated Activity.
Right-click on Automated Activity –> Properties –> Interface –> Select from Dropdown:

31. Now, right-click on the Notification Activity –> Properties –> To–>’Choose’ UME User (As the
recipient of the email):

32. In the next dialog box, enter the search criteria –> click on the desired recipient from the
result-set –> Add –> OK:
33. Now that the recipient is set, we need to add the Subject and the Content of the email in the ‘Mail’
Property:

34.Now that all the properties of all the design activities are set, we need to do the data mapping:

A. Start Event –> Process Context:


B. Process Context –> Automated Activity (Passing input to PI Operation Mapping):

C. Automated Activity –> Process Context(Output of PI Operation Mapping to Process Context):

35. Now that the data mapping is complete, the BPM Process is complete and ready for use.
But for Troubleshooting and Admin purposes, we assign an administrator to the BPM Process.
Right-click on Pool –> Properties:
36. In Pool Properties, Set the Administrator in the Administrator property, similarly like we selected
the recipient of the email in step # 31 & 32:

37. Finally, check for any Build-errors.


Right-click on BPM Project –> Development Component –> Build:
38. Check the status in the Infrastructure Console:

Note: There are no build errors but warnings are always going to be present. However, these
warnings do not affect the deployment.
39. Now that there are no build errors in the project, it is ready to be deployed onto the server and
used. Deploy the DC.
Right-click on the BPM Project –>Development Component –> Deploy:
Now, our BPM is ready to use on the server. You can test it in 2 ways:

1. Trigger the BPM Start Web-service in WSNavigator


2. Start the Process Manually from the Process Repository.

Hope this document helps people in some way or the other.

Please let me know if I have mentioned anything incorrectly in this document.

System centric processes using NW BPM – Process


Debugging

This blog aims to introduce process debugging for PI developers who are in the process of converting
ccBPM to NW BPM. This blog also aims to introduce process debugging to beginners in NW BPM.
The screenshots and illustration used in this blog are from NWDS 7.31 SP04. Please note that the
NWDS version and your PO version should match for smooth development experience.
If you have been working with ccBPM processes you will know that there is no option to debug and go
step by step to analyze the process flow. With NW BPM, you can debug the process right from
NWDS. Also, you can attach to processes running on the server and start debugging the processes. I
believe, this helps developers in analyzing and quickly identifying the issues.
As this is introduction only, I have chosen a Q&A format. Additional details are clearly documented in
SAP help.
What tool do i need to debug the BPM process?
NWDS(NetWeaver Developer Studio) is required to debug the process.

What role do I need to debug a process?


You should have SAP_BPM_Debug role.
On what all objcets can i place breakpoints?
Breakpoints in the process can be placed on activities, events and gateways. Breakpoints cannot be
placed on artifacts, swim lanes and connections.
How do I set breakpoints?
Right click on any activity, event or gateway and select toggle break-point option. You will notice
a dot next to the activity that indicates a break-point.

How do i create a debug configuration?


In process development perspective, you can click on the debug Configuration drop down button
and choose Debug Configuration. In Debug Configurations, Right click on the Process and select
New.

Provide Project, Process, Payload(only for new process instance) and click on Debug, you are
set to start stepping through the steps.
The following screen shows that it is currently at start event

What are the other ways to start debugging a new process?


You can start process debugging multiple ways from NWDS. From process development
perspective you can right click on the process and select Debug.
Process debugging can be started by clicking on Debug configuration from Process
Development perspective. Process debugging can also be started from Debug perspective.

Can I debug a process that is already running on the server?


Yes. You can attach to an already running process from NWDS and debug the process.Process
Instance view provides the list of processes and process instances. You can right click and
attach to the process you want to debug.

Where do i get more information on Process debugging


complete information is available at SAP Library – Debugging Processes.
Finally, do not hesitate to provide feedback. Feedback helps in making the SCN content better.

Vous aimerez peut-être aussi