This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
SAP NetWeaver Composition Environment 7.2 Trial Version. For more information, visit the Composition homepage
Summary
This is part 1 of a 3-part tutorial to create a process-driven composite application. In Part 1, we will model the Purchase Approval Process. The tutorial is based on the BPM262 workshop (SAP NetWeaver BPM Integration with Visual Composer) session in TechEd 2009.
Authors: Eng Kit LUM, Venky Shankararaman
Company: Singapore Management University
Created on: 1 May 2010
Author Bio
Eng Kit LUM is working as Content Creator at Singapore Management University, School of Information Systems. He facilitates creating teaching and develops interactive learning exercises for the students in the Enterprise Business Solutions course, which teaches SAP Enterprise Resource Planning (ERP) business processes and Enterprise Services Architecture (ESA).
Venky Shankararaman is an Associate Professor of Information Systems Practice at the School of Information Systems, Singapore Management University. He teaches courses in the area of Business Process Management, Enterprise Integration, ERP and Enterprise Architecture.
Model the Purchase Approval Process .......................................................................................................... 3
Start SAP NetWeaver Developer Studio (NWDS)....................................................................................... 4
Create a Process Composer Development Component ............................................................................. 5
Sketch the Purchase Approval Process ..................................................................................................... 9
Maintain the Technical Properties of the Pool .......................................................................................... 16
Create the Process Context ..................................................................................................................... 19
Add the Process Context to the Purchase Approval Process .................................................................... 26
Related Content .......................................................................................................................................... 29
Disclaimer and Liability Notice ..................................................................................................................... 30
Create a Process-Driven Composite Application with CE 7.2 - Part 1
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
We will use Process Composer to model the process based on BPMN (Business Process Modeling Notation); the process participants (roles) and process steps (activities) are defined. We will also create the process context to store the process information.
The final process diagram is as shown.
Create a Process-Driven Composite Application with CE 7.2 - Part 1
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
4. The Workbench window is now visible. Initially, the Resource perspective is displayed.
Note: A perspective defines visible
action sets and is a group of views and editors in the
Workbench window.
Hint: The name of the active perspective is shown in the title of the window.
Create a Process Composer Development Component
5. Switch to the Process Development perspective; this is where you will perform your BPM modeling activities. From the Window menu, select Open Perspective Process Development.
Note: If Process Development is
not listed, select Other… and choose Process
Development.
Create a Process-Driven Composite Application with CE 7.2 - Part 1
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
9. Name the DC xx/purchase/pr/pm and click Finish.
Note: SAP provides tips for
naming components.
Here, we use the naming convention <application name: purchase>/<application layer: process>/<element type: process model>.
Furthermore, if the SAP AS Java server (SAP NetWeaver CE 7.2) is shared among several developers, prefix the DC name with xx/ (where xx is a unique 2-digit number) so as
not to overwrite a DC with the same name deployed by another
12. Accept the default trigger DefaultService_Empty and click Finish.
Note: A trigger defines what starts
the process. Here, we use the default trigger DefaultService, operation Empty; this means we do not
expose the process as a
Web Service.
Hint: The process can be exposed as a Web Service by assigning a service interface and operation to its start event. It is then possible to trigger the process using a Web Service call from an activity/event external to the process as opposed to manually starting the process (usually for testing purposes).
13. The process model opens in the editor area. Delete the connection between the Start and End events; right-click on the connection and select Delete.
Note: Process Composer adopts
the Business Process
Modeling Notation (BPMN)
for modeling business
processes.
Hint: Maximize the editor for a larger view. To make more space for the model, select the Purchase Approval pool and extend it to the bottom of the editor.
27. Assign an administrator to the pool. Right-click on the Purchase Approval pool (the header section containing the title) and select Properties.
Note: As a prerequisite, you have
to create the necessary users and assign the required roles.
Pool administrators can trigger administrative actions on the processes in the pool, such as canceling, suspending and resuming the process using the SAP NetWeaver
Administrator tool.
28. In Properties view, select the Administrators tab to open it. Then click the Choose button.
29. Select User for Principal Name, enter the Logon ID (for the user you want to define as the administrator of the process) and click Search.
Note: If you have not specified your
SAP AS Java server, you can do so by clicking the Configure Server Default…
link above the Search button.
Create a Process-Driven Composite Application with CE 7.2 - Part 1
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
In our process, we need the information about the purchase request created in the first activity to be available to the rest of the activities. The process context therefore serves as a memory area to store this information while the process is executing.
Since the process context is represented by an XSD structure, it can be created within the XSD Editor; we will create the data structure as shown.
Note: In this data structure, there is a mixture of what SAP calls primary data (data that is required to drive the process) and secondary data (data that is passed between steps). In our process, Requestor, PRId, Approve and POId can
be considered primary data, while the rest are simply required for storing and passing data into the service
interface that we will assign later for the Create Purchase Order automated activity.
33. In Project Explorer, select xx/purchase/pr/pm Process Modeling Data Types XSD Files; right-click and select New XSD….
Hint: Alternatively, if you already have an XSD file containing the data structure to be used for the process context, you can import it.
Create a Process-Driven Composite Application with CE 7.2 - Part 1
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
Hint: You can also edit the XSD file in the Source tab page of the XSD editor.
36. In the schema Properties view below the editor, change the Target namespace to http://demo.sap.com/xx/purchase/pr/context . Click
Minimize to dismiss the Properties view.
Hint: If the Properties view is not visible, right-click on the schema (the header section containing the schema namespace) and select Show Properties.
48. Context_DT and ItemType appear in Project Explorer – xx/purchase/pr/pm Process Modeling Data Types.
Hint: You can export the file if desired; select Data Types XSD Files Context.xsd, right-click, select Locate in Folder and then right-click the located file (in src/wsdl) and choose Export….
Add the Process Context to the Purchase Approval Process
49. Add the context (Context_DT) to the Purchase Approval process to create a data object. Open the Purchase Approval process model and drag Context_DT from Project Explorer into the Requestor lane.
Note: You can place the data
object in any lane.
Create a Process-Driven Composite Application with CE 7.2 - Part 1
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
50. Add the Approved condition to the Approval Decision gateway. Right-click on the Approval Decision gateway and select Properties.
51. Click on the Conditional Evaluation tab to open it. Select the Approved condition and click Edit.
52. The Condition Expression Editor opens. Select Context DO_Context_DT Approve; double-click to add it to the expression. Click OK.
53. Dismiss the Properties view.
Note: Recall that you made the Rejected connection the default gate. Hence, if the value of DO_Context_DT/Approve does not evaluate to true, then the Rejected condition
Create a Process-Driven Composite Application with CE 7.2 - Part 1
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this