BIT800 Process Orchestration Overview
INSTRUCTOR HANDBOOK INSTRUCTOR-LED TRAINING Course Version: 16 Course Duration: 5 Days Material Number: 50137767
Prohibida su reproducción
SAP Copyrights and Trademarks
© 2016 SAP SE or an SAP affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forwardlooking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.
Prohibida su reproducción
Typographic Conventions American English is the standard used in this handbook. The following typographic conventions are also used.
This information is displayed in the instructor’s presentation
Demonstration
Procedure
Warning or Caution
Hint
Related or Additional Information
Facilitated Discussion
User interface control
Example text
Window title
Example text
Prohibida su reproducción © Copyright. All rights reserved.
iii
Prohibida su reproducción iv
© Copyright. All rights reserved.
Contents ix
Course Overview
1
Unit 1:
2 4 17 24 35 41
Introduction to Process Orchestration Lesson: Defining Process Orchestration Lesson: Outlining Business Process Management (BPM) Lesson: Outlining Business Rules Management (BRM) Lesson: Outlining Advanced Adapter Engine Extended (AEX) Lesson: Performing BPM with BRM and AEX
Unit 2:
10 Minutes 20 Minutes 25 Minutes 25 Minutes 10 Minutes
Business Process Overview and Development Steps
43
Lesson: Configuring NWDS Development Tools
40 Minutes
51 57 81 86 93 104 109 118 125
Exercise 1: Set Up the SAP NWDS SP03 Lesson: Discussing BPMN in NWDS Exercise 2: Set Up the Local Development Environment SP03 Lesson: Outlining Business Processes Lesson: Sketching the BPMN process Lesson: Sketching the Purchase Order Process Exercise 3: Sketch the Purchase Order Process SP03 Lesson: Understanding Tokens Exercise 4: Test the Purchase Order Process for the First Time SP03
20 Minutes 20 Minutes 5 Minutes 45 Minutes 30 Minutes 40 Minutes 15 Minutes 45 Minutes 10 Minutes
137 139 143 147 150 163 173 183 190 195 203 213
Unit 3:
A BPMN Process Lesson: Outlining the Roles and Authorizations of a BPMN Process 30 Minutes Exercise 5: Assign the Required Authorizations to Use the 20 Minutes OData Interface SP03 Lesson: Importing Objects 20 Minutes Lesson: Outlining Start and End Events for the PO Process 30 Minutes Exercise 6: Create PO_StartProcess_Trigger and Assign It SP03 20 Minutes Lesson: Handling Service Interfaces 35 Minutes Exercise 7: Test the Catalog Service with WS Navigator SP03 100 Minutes Lesson: Explaining Automated Activities for the PO Process 20 Minutes Lesson: Adding Activities to a Business Process 20 Minutes Lesson: Calling a Web Service from an Automated Activity 20 Minutes Exercise 8: Model and Configure the CheckAvailability Process 25 Minutes SP03
Prohibida su reproducción © Copyright. All rights reserved.
v
235
Unit 4:
236 246 256 259
Lesson: Configuring Scenarios in the ESR Browser Lesson: Explaining the Communication between the BPM and AEX Lesson: Explaining the SAP Process Integration Designer Exercise 9: Create the Integration iFlows of CallCatalogService_## SP03 Lesson: Monitoring with Process Integration Monitoring (PIMON) Exercise 10: Assign the CheckAvailability Process with the iFlow CallCatalogservice_##SP03 Lesson: Testing a Process with AEX
276 281 301 313
Connectivity with the Advanced Adapter Engine Extended (AEX)
Unit 5:
35 Minutes 45 Minutes 15 Minutes 25 Minutes 30 Minutes 25 Minutes 45 Minutes
Data Flows
315 318
Lesson: Defining Process Context Lesson: Explaining Data Objects
10 Minutes 30 Minutes
324 334 339
Lesson: Creating Data Mappings Lesson: Explaining Gateways Exercise 11: Assign the CheckAvailability Process to the PO Process SP03 Lesson: Applying Data Transformations by Using Functions Lesson: Outlining Notification Activities for PO Exercise 12: Extend the PO Process with E-Mail Communication with the Customer SP03 Lesson: Configuring and Using Reporting Activities for PO
60 Minutes 30 Minutes 20 Minutes
352 356 359 367 375
Unit 6:
376 378 389
431 432 435 443 463 477
Unit 7:
20 Minutes
Other Objects Lesson: Explaining Process Modes Lesson: Explaining the Various UIs and Tasks Exercise 13: Extend the PO Process by a User Interaction with a Support Employee SP03 Lesson: Explaining Further Objects Exercise 14: Create the iFlow CallSupplierService_asyn_## SP03
411 417
15 Minutes 40 Minutes 20 Minutes
30 Minutes 60 Minutes 30 Minutes 25 Minutes 20 Minutes
Deployment and Testing Process Lesson: Building and Deploying a Process Exercise 15: Create the iFlow FromSupplierService_asyn_## SP03 Lesson: Explaining the Configuration of a Process Exercise 16: Model and Configure the Procurement Process SP03 Exercise 17: Link the P_Process to iFlow CallSupplierService_## and iFlow FromSupplierService_## SP03
35 Minutes 10 Minutes 35 Minutes 20 Minutes 20 Minutes
Prohibida su reproducción vi
© Copyright. All rights reserved.
487
Unit 8:
488 493
Lesson: Managing Process Desk Tasks Lesson: Managing Processes with Application Programming Interfaces (APIs) Lesson: Starting a Process with an SAPUI5 User Interface Lesson: Using BPM Analytics Lesson: Using the Business Process Management (BPM) Inbox
502 503 509 521
Unit 9:
522 523 527 535 544 551 557
Unit 10:
558 575 585 590 597 602 609
625
Process Tasks and Monitors
5 Minutes 15 Minutes 20 Minutes
The Complete Integration Process Lesson: Configuring Referenced Activities Lesson: Explaining Boundary Events in the Delivery and Purchase Order Process Exercise 18: Maintain the PO Process in PO_GoToProcurement_RP SP03
35 Minutes 40 Minutes
Exercise 19: Insert a MessageMapping into the iFlow SP03 Lesson: Running the Purchase Order Process Exercise 20: Test the Whole Process SP03
20 Minutes 20 Minutes 20 Minutes
15 Minutes
Business Rules Management Lesson: Explaining Testing and Monitoring of a PO Process Exercise 21: Create the Simple Distribution Process SP03 Lesson: Explaining Data Flow Modeling Lesson: Explaining Business Rules Management Lesson: Creating Rules with Rules Composer Lesson: Managing Business Rules with Rules Manager Exercise 22: Create a Flow Ruleset to Determine the Storage Location of the Ordered Spare Parts SP03
Unit 11:
10 Minutes 10 Minutes
30 Minutes 15 Minutes 45 Minutes 20 Minutes 30 Minutes 15 Minutes 20 Minutes
Configuration Tasks and Extensions
626
Lesson: Explaining Special Configuration Tasks in SAP NetWeaver Administrator (NWA)
10 Minutes
630 635
Lesson: Monitoring the Health State of the Application Lesson: Explaining SAP Operational Process Intelligence
10 Minutes 10 Minutes
Prohibida su reproducción © Copyright. All rights reserved.
vii
Prohibida su reproducción viii
© Copyright. All rights reserved.
Course Overview TARGET AUDIENCE This course is intended for the following audiences: ●
Business Process Architect
●
Business Process Owner/Team Lead/Power User
●
Developer
●
Development Consultant
●
Enterprise Architect
●
System Administrator
●
System Architect
●
Technology Consultant
Prohibida su reproducción © Copyright. All rights reserved.
ix
Prohibida su reproducción x
© Copyright. All rights reserved.
UNIT 1
Introduction to Process Orchestration
Lesson 1 Defining Process Orchestration
2
Lesson 2 Outlining Business Process Management (BPM)
4
Lesson 3 Outlining Business Rules Management (BRM)
17
Lesson 4 Outlining Advanced Adapter Engine Extended (AEX)
24
Lesson 5 Performing BPM with BRM and AEX
35
UNIT OBJECTIVES ●
Outline the basics of Process Orchestration
●
Outline the main objects of BPM
●
Outline BRM
●
Outline Advanced Adapter Engine Extended (AEX)
●
Run business processes on an AEX
Prohibida su reproducción © Copyright. All rights reserved.
1
Unit 1 Lesson 1 2
Defining Process Orchestration
LESSON OVERVIEW This lesson defines Process Orchestration. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline the basics of Process Orchestration
Process Orchestration SAP Process Orchestration is a package solution that combines the power of SAP Business Process Management (BPM), SAP Business Rules Management (BRM), and SAP Process Integration (PI) into a single, integrated solutions. Features of SAP Process Orchestration ●
Based on single stack Java
●
Is a Business Process Modeling Notation (BPMN) standard
●
Is a graphic configuration that uses integration flows
Process Orchestration Requirements A typical integration is built as a point-to-point solution. SAP PI tries to avoid such unmanageable constructs by a central integration engine. As a recent development, process orchestration uses an Enterprise Service Bus (ESB). ESB supports a service-oriented architecture (SOA) in an organization’s eco-system. In such situations, SAP Advanced Adapter Engine Extended (AEX) plays the roles of a middleman, courier, and translator. SAP AEX is an ESB that is responsible for implementing the communication and interaction between the software applications that are participating in the exchange of data and interacting. It is at the heart of a SOA implementation strategy. AEX Duties ●
●
●
Controlling the routing of message exchange between applications. Handling the transformation and mapping of the data and messages transferred from the source to the target system and vice versa. The message structures of the business applications on both ends of the exchange do not need to be the same. Handling the security and conversion of the protocol between the service provider and consumer.
Prohibida su reproducción 2
© Copyright. All rights reserved.
Lesson: Defining Process Orchestration
●
Monitoring the exchange of messages between the involved systems.
●
Managing the various versions of the services provided by the ESB.
The ESB eliminates the need for a point-to-point connection. By using smaller units of functionality exposed as services, it is possible to build composite services that consist of many smaller services combined into a new bigger service or composite application. LESSON SUMMARY You should now be able to: ●
Outline the basics of Process Orchestration
Prohibida su reproducción © Copyright. All rights reserved.
3
Unit 1 Lesson 2 4
Outlining Business Process Management (BPM)
LESSON OVERVIEW This lesson outlines Business Process Management. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline the main objects of BPM
BPM Introduction
Figure 1: From Operational Efficiency to Business Agility
During the 1990s, with ERP and business process re-engineering, SAP provided great operational excellence by harmonizing business processes within the company, for example, Finance (FI) and Costing (CO) with Production Planning (PP) and Materials Management (MM). This gave companies a set of best practices to standardize their business on. Today, customers use industry-specific market places to switch suppliers with a single mouse click. This increased market transparency has triggered a shift of power to the customer. In addition, the impact of globalization in some industries – especially services and manufactured goods – has created an extreme abundance of supply, which also is giving more power to the customer and results in intensified global competition. Increased customer power and intensified global competition have the following effects:
Prohibida su reproducción 4
© Copyright. All rights reserved.
Lesson: Outlining Business Process Management (BPM)
●
●
Increased pressure to deliver innovative products and align business models to ever-changing environments Customer expectations for complete solutions for total customer experiences
Companies join forces within business networks to meet these new market requirements of “business agility” in addition and operational excellence. The resulting transformation of these networks of collaborating suppliers, customers and partners enables co-innovation of solutions that go beyond company, industry, and geographic boundaries. SAP calls this paradigm Business Network Transformation — the process by which companies collaborate with partners and customers to improve efficiencies and deliver innovative solutions for competitive advantage. IT can bring new revenue and growth to the company by having both capabilities – applications for standard business processes and the technology to integrate and change business processes across the business network as part of an integrated business process platform. Since companies of all sizes are subject to the speed of change, establishing a business processes platform is important for all companies. SAP enables you to standardize and innovate on one platform, which means you no longer have to choose to build or buy software. You can implement global best practices for standardized core processes while composing innovative processes for competitive advantage. SAP is the worlds leading supplier of process automation technology involving 12 million users in 120 countries that touch one of 140,000 SAP systems. SAP has been delivering standardization of core processes for more than 35 years. SAP Business Suite The SAP Business Suite provides ready-to-run business processes for 24 industries. New features and support for new business processes are continuously added, with enhancement packages that deliver innovation without disruption. SAP Composition Environment The SAP Composition Environment (CE) helps you to create flexible differentiating companyspecific business processes. These are processes that SAP does not yet address with standard software. SAP CE is a set of tools that gives companies the ability to compose new processes and extend core business processes. This means these composite processes are being built on top of the SAP Business Suite, they are basically extensions of the SAP Business Suite. These processes are typically agile and tend to change often. Composite business processes can be human-centric or system-centric. System-Centric System-centric processes focus on integrating application core processes with third party systems. Examples of system-centric include B2B cases or the integration of suppliers and customers (covered by SAP Process Integration). Human-Centric In human-centric processes, the majority of the activities in such a business process are driven by human activities. This is also where SAP’s new offerings, SAP Business Process Management (BPM) and SAP Business Rules Management (BRM) fit in. Both offerings are an integral part of the SAP NetWeaver CE.
Prohibida su reproducción © Copyright. All rights reserved.
5
Unit 1: Introduction to Process Orchestration
While you want to innovate, you do not want to reinvent everything from scratch. You want to leverage your existing IT investments and make reuse of process components. This is the function of the Enterprise Services Repository (ESR). SAP BPM is tightly integrated with the ESR to enable the reuse of service-enabled application core processes when composing new processes. Today, SAP delivers more than 2800 of these enterprise services.
Figure 2: End-to-End SOA Infrastructure — TODAY Enabling Managed Process Flexibility
SAP BPM Benefits SAP BPM provides the following features: ●
SAP Process Integration (PI) It is a platform for a customer to realize a SOA landscape. Using PI, customers leverage enterprise services provided by SAP and enable their existing investments in third party and legacy applications as services.
●
SAP Composition Environment It is a rich set of modeling tools for customers to build agile and flexible applications by consuming the services.
●
NetWeaver (NW) BPM It puts the various UI blocks and services together to create end-to-end processes that solve day-to-day problems of customers.
Along with the infrastructure, BPM also provides the following features: ●
Over 2,800 services by service enabling our existing Business Suite
●
The tried and tested service methodology to our customers as SOA300 course
●
Reusable content such as the Global Data Types on which our Enterprise services are based
Prohibida su reproducción 6
© Copyright. All rights reserved.
Lesson: Outlining Business Process Management (BPM)
With the tools, content, and methodology, a customer can jump start his or her SOA implementation to build flexible applications while leveraging existing investments.
Figure 3: Model-Driven Development and Deployment With SAP Composition Environment
Composition Environment The SAP Composition Environment (CE) is based on an enterprise-class JavaEE 5 application server as runtime and an Eclipse 3.5-based development environment. The SAP NetWeaver Java Application Server, an enterprise-class JavaEE 5 application server ensures, robustness, scalability, and supportability through features such as configurable session failover, built-in load balancing and cluster support, robust monitoring, and unique supportability of nonfunctional problems based on SAP’s own Java VM features. The server offers full support of the latest Java EE 5 features, such as Enterprise JavaBeans (EJB) 3.0, JSF 1.2, Java Persistency API 1.0, Service Data Objects (SDO) 2.1 standard simplifying data programming for applications and frameworks, support for development of standard-based portlets, and a job scheduler implementation. With the Java Connector Architecture (JCA) 1.5 and full Web Services standards support, it enables connectivity to SAP and non-SAP backend and services. Memory Analyzer is a complementary debugging and analysis tool for Java heap dumps (donated to the Eclipse Technology Project). The SAP NetWeaver Developer Studio (NWDS) is an integrated Eclipse 3.5-based development environment for the creation of Java-based, multi-tiered composite SOA applications. SAP NetWeaver Developer Studio is built on Eclipse, an open-source tooling platform comprised of extensible frameworks and tools. SAP has enhanced the standard Eclipse functionality with a comprehensive set of design, construction, and modeling tools.
Prohibida su reproducción © Copyright. All rights reserved.
7
Unit 1: Introduction to Process Orchestration
Customers and partners can already develop and run Java applications in an SOA landscape with this Java-only option. However, integration with software lifecycle management, an Enterprise Services Repository and registry, and an enterprise service bus are mandatory for complex and heterogeneous business application landscapes. SAP NetWeaver Enterprise Services Repository (ESR) is the “central registry” and repository in which service interfaces and enterprise services are modeled and their metadata is stored. This includes the metadata repository of all service objects in a SOA as well as a Universal Description, Discovery, and Integration (UDDI) v3-compliant services registry that supports publishing, classifying, and discovering services. Integration with SAP NetWeaver Development Infrastructure (NWDI) ensure a comprehensive software lifecycle management and transport logistics for all content (including models and code) through the development-test-production landscape. Optional connectivity through a service bus infrastructure and EAI is achieved with SAP NetWeaver PI 7.1. SAP CE also provides the following set of model-driven tools for composing services, creating user interfaces, and orchestrating processes that simplify development and increase productivity significantly: ●
●
●
●
●
●
The SAP Composite Application Framework (CAF) is a business object modeling and servicecomposition tool, enabling development of new business logic and adaptation of existing enterprise services. SAP NetWeaver Visual Composer provides a model-driven user interface (UI) development tool for transactional and analytical UIs, including the incorporation of voice and mobile interaction into enterprise applications. Web Dynpro allows you to build rich user interfaces and data-driven applications while benefiting from graphical tools and code generation that speed up the development process. Web Dynpro clearly separates business and display logic in a model-view-control (MVC) paradigm. SAP Interactive Forms by Adobe add online and offline support for composite forms. A portal is included with SAP CE to offer a single access point for users and roles through a federated portal network implementation. SAP CE provides SAP BPM as a flexible framework for designing and running user-centric collaborative processes and reusable workflows.
Prohibida su reproducción 8
© Copyright. All rights reserved.
Lesson: Outlining Business Process Management (BPM)
Figure 4: Manage Enterprise Business Processes (1) – Application Core Processes
Business Process Management needs to take into account different sub-process types. Packaged processes at the application core build the center of gravity for process standardization. Application Core Processes represent the core part of an application. These processes are stable and not frequently changed. SAP delivers processes of SAP Business Suite Applications as well as processes of SAP industry solutions. The processes are configurable. Often business workflows are used to automate a process. Depending on the company, these processes cover 70% to 80% of all processes.
Figure 5: Manage Enterprise Business Processes (2) – Composite Business Processes (with SAP BPM)
Composition and integration provide competitive differentiation by composing new processes and applications, and integrating them with business partners and legacy systems. These Composite Business Processes support strategic agility and speed to market. They cover 20% 30% of the company’s processes. The following points apply to Composite Business Processes that are realized as human-centric:
Prohibida su reproducción © Copyright. All rights reserved.
9
Unit 1: Introduction to Process Orchestration
●
Collaborative across business systems and organizations
●
Need ad hoc extensions to manage pockets of flexibility
●
Defined by functional business requirements
The following points apply to Composite Business Processes that are realized as system-centric: ●
Integrated across business systems and services
●
Integrated with human-centric processes
●
Defined by technical specifications based on functional business requirements
Figure 6: Key Process Meta Model Concepts
The business processes include the following relevant components: ●
Data
●
Events
●
Rules
●
UIs
●
Tasks
●
Flows
All these components have to be covered from a business perspective as well as a technical perspective.
Business Process Management Components SAP BPM enables you to model, connect, compile, deploy and maintain composite business processes. These capabilities are split into the following main building blocks:
Prohibida su reproducción 10
© Copyright. All rights reserved.
Lesson: Outlining Business Process Management (BPM)
●
Process Composer
●
Process Server
●
Process Desk
Business Process Management Roles
Figure 7: Business Process Management – Personas Across the Enterprise
The process composer of SAP Business Process Management is integrated into SAP NetWeaver Developer Studio as two separate perspectives. These two perspectives, Process Modeling and Process Development, offer different views over one and the same process model. Consequently, the two perspectives enable different process modeling role, for example, business analyst, process developer, and so on, and makes possible the collaboration between them. The Process Modeling perspective is a subset of the Process Development perspective. The Process Modeling perspective offers the option of designing a process, but this process is in status Draft and cannot be built and deployed. This perspective can serve as a starting point for process modeling, where a business analyst designs the process and hands it over to a developer to add the necessary technical details. The Process Modeling perspective has a subset of the views available in the Process Development perspective, which are filtered to show only information relevant for business analyst type users. Process models created in the Process Modeling perspective are not checked for errors and constraint violations and do not contain error markers. These process models are always created in status Draft, which can be changed to Released to Build in the Process Development perspective only. The process model can be built after the Released to Build status is set. The Process Development perspective offers a full set of capabilities for designing, implementing, building, and deploying a process. A developer can open the process, which is designed by a business analyst in the Process Development perspective, perform the required changes to make the process executable, and finally change its status from Draft to Released to Build. Changing the status is irreversible.
Prohibida su reproducción © Copyright. All rights reserved.
11
Unit 1: Introduction to Process Orchestration
A developer can also design from scratch and implement a process using the Process Development perspective as a starting point. Process models created in the Process Development perspective are always created in status Released to Build and are checked for errors and constraint violations.
The Business Process Cycle SAP BPM enables companies to manage the entire lifecycle of their business processes. Managing the lifecycle of a business processes involves the following phases: ●
Design (graphically)
●
Modeling
●
Executing
●
Monitoring
●
Improvement (continuous improvement of the modeled business processes)
Figure 8: The Business Process Cycle
The SAP BPM lifecycle is an iterative process applicable for any business process and consists of the following steps: 1. Design The Design involves the analysis of existing processes (as is) and design of the new (to be) processes, including the mapping to application and information architectures.
Prohibida su reproducción 12
© Copyright. All rights reserved.
Lesson: Outlining Business Process Management (BPM)
2. Model The model step comprises the translation of the high-level process model (UML or BPMN 2.0 describing the process at an abstract level) to the more detailed and executable model modeled in BPMN 2.0. 3. Execute During execution (runtime), the process is executed by the BPM software platform in charge of interpreting the BPMN 2.0 source code into an orchestrated software program. 4. Monitor During monitoring, running (or completed, independent of the status) business processes on the BPM platform are observed. The monitoring of the processes depends on how the business wants to collect and analyze the process data (real time, near real time, or based on historical data). Real-time monitoring is also called Business Activity Monitoring (BAM). 5. Improve This step is intended to be a continuous process on its own and uses the design and monitoring steps as input.
Business Process Modeling Notation (BPMN) Use Cases BPM is a method for defining an organization's workflows in order to control them and make them more efficient. BPM defines the responsible persons in an organization, what they do, and in which order or sequence. Often, ambiguous terms are used to describe the term BPM, leading to confusion. The acronym BPM is often used for Business Process Mapping or Business Process Modeling. For our purposes, BPM is used only for Business Process Management or, more simply, process management. The process is a series of specified activities or tasks to be executed by humans or machines in order to achieve one or more objectives. The ultimate aim of BPM is to create value to the customer, thus generating added value to the organization. BPM uses a systematic approach to run, document, measure, monitor, and control both automated and nonautomated activities so that the organization's strategic goals can be met. BPM describes the following points: ●
Who is performing a task?
●
What task is being performed?
●
When is the task being performed?
●
How is the task being performed?
●
What tool is being used to perform the task?
Increasingly, BPM involves IT-based solutions to determine, improve, and maintain end-to-end processes. When properly implemented, modern BPM solutions save organizations significant operating and processing costs. The use of recent BPM solutions can reduce the process costs of companies significantly. Unfortunately, it is estimated that 80% of all business processes worldwide are designed in office tools like Microsoft Excel, Microsoft Power Point, or Microsoft Access. Automated processing is
Prohibida su reproducción © Copyright. All rights reserved.
13
Unit 1: Introduction to Process Orchestration
not possible with these tools. Therefore, the acceptance of automated processing will likely not increase. Customer Complaints about BPM are as follows: ●
It is too complicated
●
It will not be accepted by employees
●
It costs too much money and time to customize or optimize
●
It has no reliable monitoring
●
It does not provide simulations or trend forecasting
Customer Desires for BPM are as follows: ●
Autonomy for departments to improve their own processes
●
User-friendly operation
●
Simple modeling
●
Ease in controlling, observing, and optimizing processes
●
Long-term investment protection
●
Cost reduction through automation
This course aims to clear up the confusion about BPM and show you how to use it for the benefit of your organization. We begin by describing the technical framework of the course and how to use process applications within a flexible architecture. Process Controlled Solutions Process controlled solutions are based on the reuse of existing technical capabilities, rather than the reuse of their associated interfaces. They are technically oriented applications that support differentiated end-to-end business processes, functional processes, and systems, and they cross organizational borders. Process Orchestration in SAP NetWeaver covers these needs precisely. Process Controlled Solutions Properties Process controlled solutions have the following properties: ●
●
Departments are the drivers of functional processes. Functional properties are user-centric (that is, participants interact via task-oriented user interfaces).
●
Standalone applications cover specific technical requirements.
●
Applications cross system and enterprise boundaries.
●
Existing applications and technical logic do not have to be used.
●
●
A layered architecture is followed, consisting of processes, user interfaces, and service and business object views. Users work only with the information needed to perform their specific tasks.
Prohibida su reproducción 14
© Copyright. All rights reserved.
Lesson: Outlining Business Process Management (BPM)
Process Controlled Solutions Examples Process controlled solutions are well suited for the following scenarios: ●
Company-specific processes or gaps in processes that are not covered by existing applications
●
End-to-end scenarios that span systems, applications, and organizational boundaries
●
Scenarios requiring high amounts of communication, coordination, and collaboration
●
Solutions requiring reusable and easy to maintain business rules
●
Scenarios requiring separated processes, operations, and technologies to be simplified and combined
●
Processes with both interactive as well as automatically executable activities
●
Scenarios with lightweight B2B integration (without extensive mapping)
●
Self-service scenarios, such as vacation and travel requests, and citizen services such as applying for a passport or damage reports
●
Processes that frequently change
●
Scenarios with real- time requirements
An Example Using a Pizza Order The figure, Pizza Order Example, shows a client requesting a pizza delivery. The zip code is determined through a REST service delivery location. The amount of the order determines whether or not the order should be checked.
Figure 9: Pizza Order Example
Prohibida su reproducción © Copyright. All rights reserved.
15
Unit 1: Introduction to Process Orchestration
For this process to be successful, the order is passed to a supplier, who in turn confirms receipt of the order. In this case, there are no weather-related problems to prevent delivery of the order. The delivery is accessed through SOAP and the current weather is checked through a weather service. The order is acknowledged by e-mail and accepted. In this example, the two main features of process controlled solutions are used, as follows: REST: Representational State Transfer, a programming paradigm for Web applications SOAP: Simple Object Access Protocol, a network protocol that allows data to be exchanged between systems so remote procedure calls can be made. SOAP is an industry standard of the World Wide Web Consortium W3C. LESSON SUMMARY You should now be able to: ●
Outline the main objects of BPM
Prohibida su reproducción 16
© Copyright. All rights reserved.
Unit 1 Lesson 3 17
Outlining Business Rules Management (BRM)
LESSON OVERVIEW This lesson outlines Business Rules Management. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline BRM
Business Rules Overview Business rules represent the constraints on behavior of the business and the policies and guidelines which drive business decisions. Business rules are owned by LoB and not by IT. Business users participate in and control rule definition and change, while business process experts model, validate, deploy, update, and archive business rules through their lifecycle. This enables IT organizations to work with business users to manage the business rules that drive process flow and execution. Application Rules and Business Rules A business rule is not the same as a rule defined and used in software applications. It is important to understand the difference between application rules and business rules. Rules used in software applications are a set of conditions with associated actions. These are typically introduced in the form of an if-then statement, for example, database constraint rules and object model rules. The rules are owned and managed by IT and not by the business. Business rules represent a set of standard business practices and policies that need to be applied consistently across business activities and are owned and managed by the business. Examples of business rules include Loan Product Eligibility Guidelines and Product Configuration Rules. Business Rules in an Organization Business rules are the most dynamic component of any application. Using business rules consistently improves an organization's adaptability to industry changes and competition. Externalizing business logic in the form of simple rules ensures that these rules are easily communicated across the organization and managed separately from the application code: business adaptability and flexibility via IT stability. Business rules are an integral and inherent part of an organization's daily operations. When introducing business rules, organizations have to consider the rules inherent in the following items: ●
Corporate charters
●
Management practices
Prohibida su reproducción © Copyright. All rights reserved.
17
Unit 1: Introduction to Process Orchestration
●
Regulatory forces
●
Human resources management
●
Marketing strategies
●
Pricing policies
●
Products and services offerings
●
Customer relationship practices
BRM Offers SAP BRM contain rules modeling capabilities targeting business analysts and rules implementation capabilities targeting business rules developers. Technical capabilities of SAP BRM for business rules composition and modeling use the following guidelines: ●
●
●
●
Business analysts are enabled to model complex business rules in an appropriate format of their choice. Both business analysts and rules developers are capable of inspecting business rules consistency and resolving conflicts. Developers are able to use rule models with data definitions of their choice for implementing executable rules. A seamless navigation from business process to business rules through integrated modeling for processes and rules is used.
If-Then rules use the following guidelines: ●
Simple English like statements joined with and/or
●
Priorities for specifying sequences of execution
●
Rules overrides to declare mutually exclusive rules
Decision tables use the following guidelines: ●
Tabular representation of rules
●
Integration with Microsoft Excel
●
Features such as returning multiple rows of values and dynamic invocation
Prohibida su reproducción 18
© Copyright. All rights reserved.
Lesson: Outlining Business Rules Management (BRM)
Figure 10: Flow Rules Example
Flow rules are laid out in a flow-like structure. Complex rules can be modeled using the following methods: ●
Gateways to branch out into different paths
●
Rule scripts to hold a set of actions
●
If-Then rules
●
Decision tables
●
Other flows and rule sets
Flow rules can interate through flow elements until some condition is satisfied and make it easier to get an overview of the rule implementation.
Prohibida su reproducción © Copyright. All rights reserved.
19
Unit 1: Introduction to Process Orchestration
Figure 11: End-to-End Change Management
End-to-End development support is provided through the Eclipse-based Rules Composer, a user interface with role-based access to manage and deploy business rules at runtime, manage access permissions and versioning, and trace business rules reports. Rules accelerates SAP BPM by providing the following features: ●
Clear decoupling of process logic from decision logic
●
Automated decisioning
●
Reusable business rules services
●
Rules-based correlations for real-time business events
Use cases for rules in SAP BPM include the following examples: ●
Complex rules-based decisions (for example, pricing and credit decisions)
●
Responsibility determination
●
Recognition of business events
●
Routing rules
●
Parameter thresholds and tolerance (constraint rules)
Prohibida su reproducción 20
© Copyright. All rights reserved.
Lesson: Outlining Business Rules Management (BRM)
Figure 12: Tight Integration with SAP BPM
SAP BRM provide complete lifecycle change management capabilities for securing, governing and managing business rules. Rules versioning, permissions, alerts, and so on is provided with the Rules Repository, containing data types, service interfaces and service operations for composition and reuse. SAP BRM provides both design-time and runtime rules repository services. Business users are able to completely coordinate management, review, and change approval activities in a collaborative fashion using a secure and protected Web based business UI. Access management, reporting services, traceability and change approval mechanisms enable organizations to perform rules asset management, having the security of managing their business rules as concisely as any other organizational asset. ●
Tabular representation of rules
●
Integration with Microsoft Excel
●
Features such as returning multiple rows of values and dynamic invocation
Reusability of Rules Technical usage scenarios for rules with SAP BRM include the following: ●
●
Model rules driven decisions from within a composite business process model. Model rules in SAP Composition Environment independently and reuse them across a variety of edge composite applications and SAP BPM functionalities.
Prohibida su reproducción © Copyright. All rights reserved.
21
Unit 1: Introduction to Process Orchestration
●
●
Model rules in SAP Composition Environment and call these rules from an ABAP business application through the Business Rules Framework Plus — Java BRM Connector. Call a rule driven decision modeled as a Web service in SAP Composition Environment from within the SAP Business Warehouse component.
Rules Composer and Process Composer Business rules can be created in the Rules Composer or the Process Composer.
Figure 13: BRM Components
Business rules describe the operation, definition, and constraints on the behavior of a business and enables decision automation. Business rules represent the core business logic of each organization and guide and control the basic business processes that form the back bone of any business transaction. ●
●
Rules Composer — Business rules modeled the Rules Composer can be used in any other business application or business process. Process Composer — Business rules modeled in the Process Composer can only be used in a business process context.
Rules Composer allows a separation of business rules from the application code and from a complex business process workflow. Rules Composer also reduces the complexity in maintaining constraints, which affects the business process. Process Composer helps you centralize the entire process. It shows the business process and the constraints affecting the process in the same development component.
Complex Business Rules Implementation Tasks Overview SAP BRM contains rule modeling capabilities targeting business analysts and rule implementation capabilities targeting business rule developers. SAP BRM business rules composition and modeling includes the following technical capabilities: ●
Business analysts can model complex business rules in different formats, for example: complex guidelines using inference rules, involved decision sequences using graphical modeling, and rule-based responses to complex patterns of business events, like fraud detection.
Prohibida su reproducción 22
© Copyright. All rights reserved.
Lesson: Outlining Business Rules Management (BRM)
●
●
●
Business analysts and rule developers are capable of inspecting business rule consistency and resolving conflicts. Developers are able to use rule models with data definitions of their choice for implementing executable rules. A seamless navigation from the business process to business rules through integrated modeling.
Business Rules Management Components Overview BRM consists of three components to help you model your business rules. Rules Composer Rules Composer is a user-friendly interface that enables you to create rich rule formats. It supports multiple data models for rules implementation and business vocabulary independent of the data model. Rules Composer provides validation of business rules, testing and refinement of rules based on test results, and report generation for rule results. Rules Manager Rules Manager is a Web-based tool used by business analysts to maintain rules. Rules versioning, repository service, permissions, access control, and rules governance all can be managed through the Rules Manager. Like Rules Composer, Rules Manager can validate, test, refine, and generate reports for rules. Rules Engine The Rules Engine is a high-performance, stateless EJB engine. It includes Rete-based inference and sequential engines. LESSON SUMMARY You should now be able to: ●
Outline BRM
Prohibida su reproducción © Copyright. All rights reserved.
23
Unit 1 Lesson 4 24
Outlining Advanced Adapter Engine Extended (AEX) LESSON OVERVIEW This lesson outlines Advanced Adapter Engine Extended. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline Advanced Adapter Engine Extended (AEX)
AEX Installation Options The SAP NetWeaver Application Server (AS) is the application platform for SAP NetWeaver, hosting SAP applications, and enabling SAP customers and partners to enhance SAP applications as well as to create their own applications. The SAP NetWeaver AS is based on a three-tier architecture and offers a reliable, proven runtime environment for ABAP and Java programs.
Prohibida su reproducción 24
© Copyright. All rights reserved.
Lesson: Outlining Advanced Adapter Engine Extended (AEX)
Figure 14: SAP NetWeaver Application Server Overview
SAP NetWeaver AS Installation Options The installation options for SAP NetWeaver AS are as follows: ●
ABAP System
●
Java System
●
ABAP + Java System (dual stack)
The AS can, depending on the chosen installation option, execute ABAP and Java programs. Almost every SAP system is based on SAP NetWeaver AS and uses it as the runtime environment. The installation option used is dependent on the applications used. In general, most of the applications of the SAP Business Suite are based on the AS ABAP (like SAP ECC), and most of the technical SAP solutions are based on the AS Java (like SAP NetWeaver Portal). Some solutions are based on the dual stack (like SAP PI). Components of the SAP NetWeaver AS The figure, Components of the SAP NetWeaver Application Server, shows the components of the SAP NetWeaver AS for a dual stack installation. The discussion of the components is valid for the respective single stack installation as well.
Prohibida su reproducción © Copyright. All rights reserved.
25
Unit 1: Introduction to Process Orchestration
Figure 15: Components of the SAP NetWeaver Application Server
Note: The components shown in this figure are the components of an AS Server 7.0 or lower (J2EE for the AS Java). As of NetWeaver AS 7.1 (JEE is used) the Java dispatcher has been replaced by ICM and the deploy controller of AS Java is responsible for the deployment of software and not SDM. Basically, an SAP system consists of a database and one or more instances. An instance of an SAP system is an administrative unit in which the components of an SAP system, which provide one or more services, are combined and managed. An instance always has exactly one dispatcher. The dispatcher dispatches requests to the work processes that execute application logic. In addition, an SAP system has a Message Server which monitors and synchronizes the instances.
Hint: An instance is also called the application server in the software-oriented view of the client-server model. This may be relevant to know especially when reading the SAP documentation.
Java Only PI (AEX) The SAP NetWeaver Application Server Java (AS Java) is a fully Java compliant server (J2EE or JEE5, depending on the release of the AS ABAP).The SAP NetWeaver Developer Studio is used
Prohibida su reproducción 26
© Copyright. All rights reserved.
Lesson: Outlining Advanced Adapter Engine Extended (AEX)
for Java development for the AS Java. It is an integrated development environment, and it is based on Eclipse, whose open plug-in architecture provides a suitable platform that can be enhanced with special functions. Java applications are developed independent of the database type (and operating system) by using OpenSQL statements like in ABAP. Java development is a decentralized development process on the AS Java: the SAP NetWeaver Developer Studio is installed locally on the developers PC. This means that the individual programs or Java applications are created locally on the developers computers. In principle, there is no common storage or testing. This can lead to problems in development projects with many participants. This is where the SAP NetWeaver Development Infrastructure (NWDI) comes in. NWDI provides the SAP NetWeaver Developer Studio as an editor, a source code administration system, and a transport mechanism. The Design Time Repository (DTR) functions as a central source code administration and versioning system, and the Change Management Service (CMS) is used for transport from the development system to other systems. In addition to these components, the Component Build Service (CBS) enables central building. The characteristic of these development tools lies in their seamless integration into the SAP infrastructure. This way, all created development objects can be stored and managed in a central Repository, the Design Time Repository (DTR). They can be built in an automated build process using the Component Build Service (CBS) and added to Change Management, and finally distributed via a defined software logistics process.
Figure 16: SAP NetWeaver Development Infrastructure Overview
Note that the ABAP Change and Transport System (CTS) was enhanced to CTS+ to enable the transport of some Java objects as well. This is of special importance for cases where transports
Prohibida su reproducción © Copyright. All rights reserved.
27
Unit 1: Introduction to Process Orchestration
of objects of a dual stack system have to be synchronized, for example, for SAP NetWeaver PI. CTS+ makes transports easier since the usage of the NWDI is not necessary in all cases. J2EE Engine The J2EE engine is the runtime system for J2EE compatible applications that represents the core of SAP NetWeaver AS Java. Java is working with Central Services. Java has server processes, which are similar to work processes in the ABAP engine. For SAP NetWeaver Application Server 6.40, the concept of message and enqueue processes in the ABAP world was carried over to the Java engine. The central services, that is, message and enqueue management, exist once per system. A Java cluster is formed when you install SAP NetWeaver AS Java. A Java cluster in general always consists of one or more Java instances, the central services (message service and enqueue service) and the database. The Java definition of the term instance is similar to the ABAP definition of the term. A Java instance is a unit in the SAP NetWeaver AS Java cluster that can be started, stopped, and monitored separately. One (or more) instance(s) is (are) installed on a physical server. As a conclusion or summary to this lesson, you can once again compare the main differences between ABAP and Java runtime environments. The following table, which you can add to, may be helpful here: ABAP
Java
Development scenario
Central
Decentralized
Development environment
ABAP Development Workbench
SAP NetWeaver Developer Studio
Storage location of the source code
ABAP Repository of the database of the respective SAP systems
Design Time Repository (DTR) of the NWDI
Transport into follow-up systems
Transport Management System (TMS)
Change Management Service (CMS) of the NWDI
Prohibida su reproducción 28
© Copyright. All rights reserved.
Lesson: Outlining Advanced Adapter Engine Extended (AEX)
Advantages and Use Cases of AEX
Figure 17: Benefits of Running AEX, BRM, and BPM together
SAP Process Orchestration, which includes both SAP Composition Environment and SAP PI, is placed between the service-enabled applications (backend applications) and the user interface (presentation layer). The backend applications can be any SAP or legacy applications that provide a particular business content and functionality to an organization. In the cases of SAP backend applications, most come equipped with standard enterprise services provided by SAP. Whether delivered with standard services or not, the applications can be connected to via a diverse range of connectivity adapters that are provided by SAP PI. The SAP AEX layer links all of the message traffic and exchange of data between applications. It plays the role of ESB and exposes the backend application’s functionalities as services or interfaces. It can also leverage enterprise services provided by SAP in the backend applications. The exposed services are presented in a format that suits widely accepted standards and protocols, such as SOAP, JMS, and many others. The developed services can be maintained, discovered, and managed in the Enterprise Service Repository (ESR). The services can be published, searched, and discovered by using what can be seen as the yellow pages services: the Service Registry. After all required services have been made available via the SAP PI layer, you can position the SAP Composition Environment layer on top. The composition layer encapsulates products such as SAP CAF, SAP BRM, and SAP BPM. It is now possible to build different composite services and applications based upon individual services exposed by the process integration layer (supported by SAP PI or AEX). This approach lets the composition layer leverage and reuse the services already provided by SAP PI and therefore saves on costs. This approach also lets the composition layer focus on the composition and bundling of services together to provide new functionalities and leaves integration-related work to SAP PI. The presentation layer (which includes all technologies that the end user directly interacts with) is placed above the composition environment. Technologies such as SAP Portal, mobile, and desktop applications have the flexibility to directly interact with a business process via the
Prohibida su reproducción © Copyright. All rights reserved.
29
Unit 1: Introduction to Process Orchestration
composition environment or alternatively to communicate with the integration layer in case there are no processes or composite services involved in the scenario.
AEX and BPM Runtime Integration The close cooperation between the AEX and BPM runtime is an important part of Process Orchestration.
Figure 18: AEX to BPM Integration
AEX and BPM Runtime Messages An external business system sends a message to the process orchestration system. According to the settings of an integrated configuration (along with a key that corresponds to the address fields of the message header), a business component is determined. This business component represents a BPM process, because a sender and a receiver channel are used which are based on the SOAP Adapter with XI protocol. The business component is determined according to the settings of an integrated configuration (along with a key that corresponds to the address fields of the message header). This is a slow process, because both a receiver and a communication channel are used within the SOAP adapter XI based protocol. Messages in the AEX are processed by the Java proxy runtime. The Java proxy runtime ensures reliable messaging, checks for duplicate messages, and passes the messages to the Web services runtime. From there, the messages are passed to the BPM runtime. The BPM processes are performed after a process is started or a message arrives at an interrupt event.
Prohibida su reproducción 30
© Copyright. All rights reserved.
Lesson: Outlining Advanced Adapter Engine Extended (AEX)
Figure 19: BPM to AEX Message Processing
At run time, an automated activity is sent in a process instance message to the Web services runtime. The Web services runtime passes the message to the Java proxy runtime. The Java proxy runtime then sends the message to XI 3.0 AEX. Further processing of messages from the BPM process is performed by an integrated configuration object within the BPM process, and a SOAP sender channel using XI 3.0 message protocol (along with its associated outbound service interface). Features and Limitations
Prohibida su reproducción © Copyright. All rights reserved.
31
Unit 1: Introduction to Process Orchestration
Figure 20: Checklist – How to Benefit from Reliable Connectivity: AEX to BPM
The figure, Checklist – How to Benefit from Reliable Connectivity: AEX to BPM, shows the connectivity from AEX to BPM.
Note: For this scenario, the service reference has to be of type XI and the sender component (BPM) must be identical to the communication component in the associated integration flow.
Prohibida su reproducción 32
© Copyright. All rights reserved.
Lesson: Outlining Advanced Adapter Engine Extended (AEX)
Figure 21: Checklist – How to Benefit from Reliable Connectivity: BPM to AEX
The figure, Checklist – How to Benefit from Reliable Connectivity: BPM to AEX, shows the settings for the inbound interface BPM-Side: here a Stateless (XI30 Compatible).
Note: In this scenario, only one operation is allowed and the operation name must be identical to the service interface name.
Prohibida su reproducción © Copyright. All rights reserved.
33
Unit 1: Introduction to Process Orchestration
Figure 22: Checklist – How to Benefit from Reliable Connectivity: Between BPM and AEX
The following features and limitations apply to BPM and AEX message processing: ●
●
●
●
A XI 3.0 compatible service interface can be used for the message exchange between AEX and BPM. Other interfaces are not supported. The service interface must be defined in the Enterprise Services repository, because that is where the inbound/outbound direction of messages is defined. For asynchronous (reliable) messaging from AEX to BPM, use the SOAP adapter with XI 3.0 message protocol. For synchronous messaging, use the SOAP adapter with message protocol XI 3.0 or SOAP 1.1. SAP NetWeaver BPM supports the Quality-of-Service types Best Effort (synchronous processing) and Exactly Once (asynchronous processing). The type Exactly Once in Order is not supported.
●
BPM does not support acknowledgements.
●
BPM does not support message attachments.
LESSON SUMMARY You should now be able to: ●
Outline Advanced Adapter Engine Extended (AEX)
Prohibida su reproducción 34
© Copyright. All rights reserved.
Unit 1 Lesson 5 34
Performing BPM with BRM and AEX
LESSON OVERVIEW This lesson shows you how to perform BPM with BPM and AEX. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Run business processes on an AEX
Benefits of Running AEX, BRM, and BPM Together
Figure 23: Benefits of Running AEX, BRM, and BPM together
SAP BRM is an integral component of SAP Process Orchestration (PO) and complements SAP BPM in the fundamental areas of modeling, maintenance, and execution of automated rule-based decisions. SAP BRM introduces transparency to the way rule-based decisions are enforced in your business processes. You can also easily decouple your process logic from your decision logic. SAP BRM is an all-in-one platform that helps you automate the execution of business rules and manage their entire lifecycle (that is, model, execute, monitor, and improve in conjunction with the business processes they are part of). SAP Supports Automated Business Rules SAP currently offers two different ways of supporting automated business rules with SAP technology. They are as follows:
Prohibida su reproducción © Copyright. All rights reserved.
35
Unit 1: Introduction to Process Orchestration
●
●
SAP BRM as part of SAP PO. SAP Business Rules Framework plus (BRFplus), which is an ABAP based, rules-based framework.
In this training, we only focus on the first category (SAP BRM), which is based on the Java-only stack of SAP PO and supports integration according to service-oriented architecture (SOA) principles and technologies. Running AEX, BRM, and BPM Together — Advantages The advantages of running AEX, BRM, and BPM together are as follows: ●
●
●
●
SAP BRM is delivered as part of SAP PO. It can be seen as an independent BRMS running in parallel with the SAP BPM and SAP AEX engines on the SAP Java stack of SAP PO. BRM consists of three main components that support the different competencies (that is, IT and business) within business rules management in an organization. The three components are Rules Composer, Rules Manager, and Rules Engine.
Release Strategy and Naming
Figure 24: Release Strategy and Naming
The figure, Release Strategy and Naming, shows the progression of the naming strategy since June 2002. Process Integration In 2002, SAP eXchange Infrastructure (SAP XI) was launched as part of the SAP NetWeaver suite. The first SAP XI was version 1.0. It then evolved to SAP XI 2.0 and SAP XI 3.0 in 2004. SAP XI was built on top of a dual-stack architecture, which includes SAP Application Server ABAP (SAP AS ABAP) and SAP Application Server Java (SAP AS Java). After a number of improvements and new features, the product was renamed from SAP eXchange Infrastructure to SAP NetWeaver Process Integration (SAP PI) in 2005. The initial SAP PI version was 7.0. It evolved to SAP PI 7.01, SAP PI 7.1, and SAP PI 7.11. The SAP PI 7.11 version included a more prominent Java stack. This was called the Advanced Adapter Engine (AAE). One could choose to build an entire interface in the Java stack. Not all types of connections and
Prohibida su reproducción 36
© Copyright. All rights reserved.
Lesson: Performing BPM with BRM and AEX
functionalities were supported at this point. For some scenarios, one still needed to use the ABAP stack. In 2010, SAP PI 7.3 was released with a more productively equipped Java stack: SAP Advanced Adapter Engine Extended (AEX). This is a robust Java-only Enterprise Service Bus (ESB) that can pretty much cover all the functionalities of the old dual stack, except that the processes previously implemented using Cross-Component Business Process Management (ccBPM) in a dual stack are not supported. The functionality to support the automation of a process is now provided in the SAP Composition Environment (CE) product. SAP PI 7.3 was later enhanced with SAP PI 7.31 in 2012. Process Orchestration SAP Process Orchestration was introduced in 2012. SAP PO is a comprehensive installation package that includes an ESB, business rules engine (BRE), and a business process engine (BPE) in one piece of software, which runs on a Java-only stack. It provides a combination and consolidation package that includes SAP PI and SAP Composition Environment and therefore encapsulates their combined set of features. With SAP PO, organizations can easily deliver reliable messages across the different internal and external systems using a well-established set of integration standards and protocols. Furthermore, SAP PO provides a complete suite of Business Process Management (BPM) and Business Rules Management (BRM) development and administration tools to help organizations design, model, execute, monitor, manage, and analyze business processes and rules using one platform. This consolidation brings an improved performance, increased efficiency, and reduced total cost of ownership (TCO), among other things. It is also important to note that, because SAP PO is a Java-only installation, all ABAP functionalities do not exist and have been replaced by equivalent Java alternatives.
Information Sources Additional information about Process Orchestration can be taken from various sources. A good source is the SAP help page: sap.help.com or the SAP Community network, the SCN. Additionally, you will find several handbook, guides on different market places.
How to Find the Relevant Documents in help.sap.com 1. Demonstrate the SAP Help portal on help.sap.com. 2. Show http://help.sap.com/nwpi. 3. Demonstrate the various sites that are accessible from here. 4. You can show additional sites of your choosing.
How to Show the Landing Pages for BPM, BRM, and PI in scn.sap.com
Prohibida su reproducción © Copyright. All rights reserved.
37
Unit 1: Introduction to Process Orchestration
1. Explain the SAP Community Network (SCN). 2. Explain the following sites: ●
●
●
BPM: search for BPM and show the different areas. BRM: http://scn.sap.com/community/brm?url_id=text-search-best-best-scncommunity-brm. PI: http://scn.sap.com/community/pi-and-soa-middleware?url_id=text-search-bestbest-scn-community-pi-and-soa-middlewar.
3. You can show additional sites of your choosing.
LESSON SUMMARY You should now be able to: ●
Run business processes on an AEX
Prohibida su reproducción 38
© Copyright. All rights reserved.
Unit 1
37
Learning Assessment
1. What are the three Business Process Management components? Choose the correct answers. X
A Process Composer
X
B Process Context
X
C Process Desk
X
D Process Server
2. Which of the following elements is the base of the process controlled solutions? Choose the correct answer. X
A Non-technically oriented applications supporting end-to-end business processes
X
B Reuse of existing technical capabilities
X
C Methods used for defining an organization’s workflows
X
D Reuse of interfaces associated with the process
Prohibida su reproducción © Copyright. All rights reserved.
39
Unit 1
38
Learning Assessment - Answers
1. What are the three Business Process Management components? Choose the correct answers. X
A Process Composer
X
B Process Context
X
C Process Desk
X
D Process Server
2. Which of the following elements is the base of the process controlled solutions? Choose the correct answer. X
A Non-technically oriented applications supporting end-to-end business processes
X
B Reuse of existing technical capabilities
X
C Methods used for defining an organization’s workflows
X
D Reuse of interfaces associated with the process
Prohibida su reproducción 40
© Copyright. All rights reserved.
UNIT 2
Business Process Overview and Development Steps
Lesson 1 Configuring NWDS Development Tools Exercise 1: Set Up the SAP NWDS SP03
43 51
Lesson 2 Discussing BPMN in NWDS
57
Exercise 2: Set Up the Local Development Environment SP03
81
Lesson 3 Outlining Business Processes
86
Lesson 4 Sketching the BPMN process
93
Lesson 5 Sketching the Purchase Order Process Exercise 3: Sketch the Purchase Order Process SP03
104 109
Lesson 6 Understanding Tokens Exercise 4: Test the Purchase Order Process for the First Time SP03
118 125
UNIT OBJECTIVES ●
Outline the configuration of business processes
●
Develop business processes
●
Explore the development infrastructure
●
Outline business processes
Prohibida su reproducción © Copyright. All rights reserved.
41
Unit 2: Business Process Overview and Development Steps
●
Outline the elements of a BPMN process
●
Sketch the purchase order process
●
Understand the flow of tokens in a process
Prohibida su reproducción 42
© Copyright. All rights reserved.
Unit 2 Lesson 1 41
Configuring NWDS Development Tools
LESSON OVERVIEW This lesson shows you how to configure business processes LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline the configuration of business processes
Development Infrastructure SAP BPM Development Components The development infrastructure of SAP Business Process Management (BPM) is split into the following main building block: ●
Process Composer
●
Process Server
●
Process Desk
Process Composer
Figure 25: Process Composer
The Process Composer is seamlessly integrated into SAP NetWeaver Developer Studio (NWDS) as a separate perspective and provides Business Process Modeling Notation (BPMN) process modeling capabilities. BPMN is based on the specifications adopted by the Object Management Group (OMG). This notation allows easy and intuitive process modeling for business analysts and developers in one common environment. The Process Composer supports all stages of process modeling from high-level definitions down to the detailed enrichment. SAP BPM’s notation distinguishes between human and automated activities. These activities are structured within subprocesses. Human activities trigger tasks,
Prohibida su reproducción © Copyright. All rights reserved.
43
Unit 2: Business Process Overview and Development Steps
which are executed through users while automated activities execute Web services and provide full integration into SAP's SOA-enabled business applications. You can also import BPMN 2.0 models created outside of the NWDS into BPM. Process Server
Figure 26: Process Server
The process server represents runtime services in BPM. The integration of BPM into SAP NetWeaver Administrator enables you to start and stop processes, to monitor and manage processes and tasks, and to troubleshoot processes. Process Desk
Figure 27: Process Desk
The Process Desk represents a building block for task management, UI and forms integration, rule definitions, and event resolution. Task management provides capabilities for users to access, investigate, and execute the tasks assigned to them. Task management is also integrated into existing applications including the Universal Worklist (UW), which is already successfully deployed in customer scenarios. SAP's UI technologies, such as Web Dynpro and Interactive Forms, can be configured for user interaction within modeled processes. Rapid UI prototyping capabilities enhance and speed up the design and specification of process interaction components. UIs are then generated from the modeling artifacts of the process context.
Modes of Development The development in the SAP NWDS works hand in hand with the system access over various PI internet pages, like NetWeaver Administrator and WS Navigator. Development starts with the activation of users. This takes place in the portal. For full access to all functionalities between the local SAP NWDS and the Java Server you need to have activated users. After the users are activated in the Portal, the SAP NetWeaver Administrator, and the Web Services Navigator, you must assign the local SAP NetWeaver Developer Studio to the Java
Prohibida su reproducción 44
© Copyright. All rights reserved.
Lesson: Configuring NWDS Development Tools
Server on the SAP system stack. This assignment, and all other settings in the SAP NWDS, are done using preferences. The preferences are accessed from Windows → Preferences. The first setting has to be made to the AS Java System. This is done using the activity SAP AS Java in the Preferences menu. You have to add a system and define one system as the default system. The next setting is for the integration directory. For this, use PI Tools Configuration → Connections. Here the URL or a manual link to the Integration directory is maintained. Another step is the access to the Enterprise Services Repository (ESR). For maintaining this access, the link Web Services → Enterprise Service Browser is used. You have to maintain entries for the ESR system, the URL to the ESR host, an HTTP host, and, if required, a EST HTTPS port.
SAP NWDS Development Tools The following tools are available for business process development: ●
The System Landscape Directory (SLD) — Landscape data is stored here.
●
The ESR — Interfaces are defined here.
●
The Integration Directory (ID) — Used to create integrated configuration objects.
●
SAP NWDS — The central development platform for processes.
The central development platform for processes.
Figure 28: Interaction of the Data Modeling Tools
For the figure, Interaction of the Data Modeling Tools, the following abbreviations apply: ●
ID = Integration Directory
●
SLD = System Landscape Directory
●
ESR = Enterprise Service Repository
●
IB = Integration Builder
Prohibida su reproducción © Copyright. All rights reserved.
45
Unit 2: Business Process Overview and Development Steps
●
ESB = Enterprise Service Builder
●
BS = Business System
●
SC = Software Component
●
SI = Service Interface
●
IDT-P = SAP Integration Designer Tools Perspective
●
ESR-P = Enterprise Service Repository Perspective
The Integration Directory is available through the SAP Integration Designer tools perspective. Similarly, the ESR is accessible through the ESR perspective. The relationship between these components is shown in the figure, Interaction of the Data Modeling Tools. Business systems can be imported into the Integration Designer tools perspective. It is also possible to import SLD-scale software components into the Enterprise Service Repository perspective. In the Enterprise Services Repository, existing service interfaces can be imported through an import function in the Composite Designer perspective.
SAP NWDS Insights The SAP NWDS is based on Eclipse, an open platform originally developed by IBM. The concept of Eclipse is based on plug-ins that allow different types of applications to be implemented. Eclipse includes many useful plug-ins, including a powerful Java IDE. Eclipse is considered the standard for Java development, and is itself written in Java.
Figure 29: SAP NetWeaver Developer Studio Architecture
The core of the SAP NWDS architecture is the Eclipse Software Development Kit (SDK). This SDK provides a complete Java development environment and a powerful extension capability based on the Eclipse plug-in technology. Additionally, the Open Source Web Tools Project (WTP) provides a number of useful plug-ins. Functional source code and graphical editors are included in WTP, along with wizards, generators, and other tools.
Prohibida su reproducción 46
© Copyright. All rights reserved.
Lesson: Configuring NWDS Development Tools
The SAP toolset extends the functionality of the tools and services that are grouped in various perspectives according to SAP related tasks.
Figure 30: Examples of SAP Delivered Plug-ins
Integration Directory To access the process integration tools, go to http://
:/dir, where is the hostname of the SAP NetWeaver system and is the port number of the SAP NetWeaver system.
Figure 31: Process Integration Tools Landing Page
Table 1: Landing Page This landing page offers access to various integration tools. These are as follows:
Prohibida su reproducción © Copyright. All rights reserved.
47
Unit 2: Business Process Overview and Development Steps
Area
Component Name(s)
ESR
Enterprise Services Builder (ES Builder) Enterprise Services Registry (SR) Web UI
Integration Directory
Integration Builder
System Landscape
System Landscape Directory (SLD)
Configuration and Monitoring
Configuration and Monitoring Home (pimon) SAP NetWeaver Administrator
The Integration Directory is the place to combine other developments and in which new integration solutions are fabricated based on existing integration components available on the ES Repository and SLD. Here, we configure both application-to-application (A2A) and business-tobusiness processes (B2B) configuration scenarios. The Integration Directory uses the Integration Builder as the Integrated Development Environment (IDE) to create and maintain configuration objects. The integration builder is a Java application. The Integration Builder serves as user interface of the Integration Directory. In the Integration Builder (also known as just Directory), the configuration time is performed. You configure new configuration scenarios based on a combination of configuration objects and repository objects previously created at design time. A configuration scenario consists of one or more integrated configurations (ICOs), each representing a message interaction between two or more systems.
Figure 32: The Integration Builder
Prohibida su reproducción 48
© Copyright. All rights reserved.
Lesson: Configuring NWDS Development Tools
A graphical representation of the message interaction between the business systems is also provided as part of the configuration scenario. Additional configuration objects that are also part of a configuration scenario include, for instance, content-based routing rules, communication channels, alert rules, value mapping groups, and parties. The last object represents an external business party and is mostly encountered only in B2B scenarios.
System Landscape Directory To access the SLD go to http://:/sld where is the hostname of the SAP NetWeaver system and is the port number of the SAP NetWeaver system. There are three main functional areas the SLD functionality spans: landscape, software catalog, and development. These areas are described in the next sections.
Figure 33: System Landscape Directory Landing Page
Landscape The landscape area of the SLD deals with the creation and maintenance of technical and business systems installed in your system landscape. Technical Systems Technical systems are application systems installed and registered in your system landscape. Typical examples of technical systems include SAP Enterprise Central Component (ECC) and SAP Process Integration (PI). As mentioned, they can be of different types, but the most important ones (and relevant for SAP PO) are AS ABAP, AS Java, process integration, and third party. A technical system can have one or more business systems assigned to it. For instance, a technical system representing a particular SAP system might contain multiple business systems for each client of that SAP system. Landscapes Within the SLD, you can group different types of technical systems in landscapes and sub landscapes based on their logical or technical relationships, defined by an SLD administrator. You can create different types of landscapes for different purposes (that is, administration, general, SAP NetWeaver Development Infrastructure [NWDI] systems, scenarios, transports, and Web services). Business Systems Business systems are logical systems that can act as senders or receivers within an integration scenario in SAP PO. Business systems are always linked to a technical system in the SLD and can
Prohibida su reproducción © Copyright. All rights reserved.
49
Unit 2: Business Process Overview and Development Steps
be of the SAP AS ABAP, SAP AS Java, or third-party system types. Business systems are grouped in SLD business system groups and transport targets to facilitate the transport (e.g., from development to test) of integration scenarios created in the Integration Directory. Software Catalog The SLD has a software catalog of all available SAP products and software components in your system landscape. That software catalog includes information (metadata) about support packages and dependencies between the products and software components. Products A product within the context of the SLD is a logical unit that corresponds to a collection of product versions, each with one or more software components. In an SAP environment, a product represents an SAP technical component. Before you can start developing any integration solution in SAP PO, you first need to create a product and at least one associated software component version in the SLD. Software Components A software component is a logical unit representing a collection of software component versions (SWCVs), each with one or more software component units. A software unit supports specific functionality of a product and software component version; it also embodies the logical link between the product and software component version. Development In order to avoid naming conflicts between software components, the SLD also provides a name reservation service (also known as a name server), which allows you to reserve names that are guaranteed to be unique. In this section, we discuss name reservations and CIM instances and classes.
How to Set up the SAP NWDS Show how to start the NWDS, how to create the connections, and how to get started with the workplace. For the demonstration steps, see the exercise, Set up the SAP NWDS SP03.
Prohibida su reproducción 50
© Copyright. All rights reserved.
Unit 2 Exercise 1 49
Set Up the SAP NWDS SP03
Business Example In this exercise you will prepare the SAP NWDS. The following interfaces will be created:
Figure 34: Setup of SAP NWDS
You will perform the following steps: ●
Start SAPNWDS 7.5 sp03
●
Set up SAP AS Java NWKtdc00
●
Define the Interfaces below PI-Tools
●
Define Connections to the ESR
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Start SAPNWDS 7.5 sp03. 2. Set up SAP AS Java NWKTDC00. Use the following data: Field
Value
Instance Host Name
NWKTDC00
Instance Number
0
Add to Domain
Default
3. Define the Interfaces below to the PI-Tools. Use the following data:
Prohibida su reproducción © Copyright. All rights reserved.
51
Unit 2: Business Process Overview and Development Steps
Field
Value
System Name
AEX
URL
http://nwktdc00.wdf.sap.corp:50000
4. Define Connections to the ESR. Use the following data: Field
Value
ESR System
/rep
ESR Host
nwktdc00
ESR http Port
50000
Prohibida su reproducción 52
© Copyright. All rights reserved.
Unit 2 Solution 1 51
Set Up the SAP NWDS SP03
Business Example In this exercise you will prepare the SAP NWDS. The following interfaces will be created:
Figure 34: Setup of SAP NWDS
You will perform the following steps: ●
Start SAPNWDS 7.5 sp03
●
Set up SAP AS Java NWKtdc00
●
Define the Interfaces below PI-Tools
●
Define Connections to the ESR
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Start SAPNWDS 7.5 sp03. a) Log on to the training system landscape with the credentials you get from your trainer. b) In the system landscape, choose Windows Start → SAP NetWeaver → NWDS 7.5 → SAP NWDS 7.5 sp03. 2. Set up SAP AS Java NWKTDC00. Use the following data: Field
Value
Instance Host Name
NWKTDC00
Instance Number
0
Prohibida su reproducción © Copyright. All rights reserved.
53
Unit 2: Business Process Overview and Development Steps
Field
Value
Add to Domain
Default
a) Choose NWK as JEE Application server under Eclipse → Windows → Preferences → SAP AS Java. b) Choose Add and enter the data from the table provided.
Figure 35: Menu Path for Adding the Application Server
3. Define the Interfaces below to the PI-Tools. Use the following data: Field
Value
System Name
AEX
URL
http://nwktdc00.wdf.sap.corp:50000
a) Choose Add under Windows → Preferences → PI Tools Configuration → Connections. b) In Add Connection Details, enter the data from the table provided. c) Choose OK.
Figure 36: Menu Path to Add the Interface
d) To test the connection, choose Test.
Prohibida su reproducción 54
© Copyright. All rights reserved.
Lesson: Configuring NWDS Development Tools
Figure 37: Testing the Connection
e) To close the popup, choose OK. 4. Define Connections to the ESR. Use the following data: Field
Value
ESR System
/rep
ESR Host
nwktdc00
ESR http Port
50000
a) Choose Enterprise Service Browser under Windows → Preferences → Web Services. b) Enter the data from the table provided.
Figure 38: Menu Path to the ESR Settings
c) To close the popup, choose OK .
Prohibida su reproducción © Copyright. All rights reserved.
55
Unit 2: Business Process Overview and Development Steps
LESSON SUMMARY You should now be able to: ●
Outline the configuration of business processes
Prohibida su reproducción 56
© Copyright. All rights reserved.
Unit 2 Lesson 2 55
Discussing BPMN in NWDS
LESSON OVERVIEW In this lesson, you will learn how business processes are developed. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Develop business processes
●
Explore the development infrastructure
Modeling Approaches Modeling a process involves various stages and requires particular elements. Process Definition The definition of the process must meet the following parameters: ●
Specific order of events and activities that aim for a certain goal
●
The events and activities have strictly defined inputs and outputs
●
The events and activities are connected in a process and eventually produce a value
The following elements are essential to process modeling: ●
An event that makes the process start
●
Activities to be performed
●
Decisions to be taken
●
A final result of the process flow
●
Exceptions that may occur during the process
In the SAP NetWeaver Developer Studio (NWDS), the Process Modeling perspective is used to sketch processes (the business view). The is used to make the process executable (the developer view). Processes in BPM The Process Composer adopts the Business Process Modeling Notation (BPMN) to enable easy and intuitive modeling of end-to-end business process. You use the defined in the BPMN specification flow objects, connecting objects, artifacts and swimlanes to create a business process model.
Prohibida su reproducción © Copyright. All rights reserved.
57
Unit 2: Business Process Overview and Development Steps
Modeling in the Process Composer allows you to create more than just a descriptive model of a standard business process, but also provides capabilities for you to foresee and model possible exceptions. You can also model exceptions handling to visualize how the process branches after an exception has occurred. Apart from creating a process model, the Process Composer allows you to define the business logic behind it, which makes the process model executable. To do that, the process composer integrates the SAP specific development and standard project development allowing the consumption of Web services, the usage of Web Dynpro (WD) and Visual Composer (VC) user interfaces (UI), the usage of Adobe offline forms, and the usage of rules and functions in process modeling. Web services assigned to process model automated activities allow a step in the process modeled using an automated activity to be executed through starting a Web service. WD, VC UIs and Adobe offline forms assigned to tasks that are modeled as human activities, enable a human to interact with the process and execute tasks. Rules and functions provide strong capabilities regarding decision making and transformation of data required in the process model. Another key feature of the Process Composer is that all Web services, UIs, tasks and rules, and functions are reusable units. You can use all of them in different projects and models, which enhances flexible process modeling. Also, you can develop custom reusable units corresponding to your business needs. Using the Process Composer, you model different processes based on different scenarios. For example, you can model a business trip approval scenario, a leave request approval scenario, a goods delivery scenario, and so on. Process Development Steps The following steps are involved in process development: 1. Defining the business process. 2. Modeling the process (that is, the sequence of process steps). This step includes modeling flow objects, artifacts, and swimlanes. 3. Defining the business logic and data flow. Defining the business logic includes importing and assigning service interface definitions, creating and assigning tasks, and importing and assigning data types. Defining the data flow includes creating sequence flow connections and data flow connections. 4. Compiling and deploying the business process model. This step involves installing the process definition and runtime engine. Top-down Modeling Approach The top-down approach focuses on the overall process. It starts with defining the overall business requirements that give the framework of the business process model. After that the model that describes how a requirement is fulfilled is split to separate business processes. Each of these processes has its specific activities and the activities include, on their side-specific services and tasks. The goal of the model, is to depict a broader view of a business process fulfilling a given requirement but not to show how a specific activity is performed. This broader view helps business analysts and managers to see how the overall process goes, where it needs improvements, and whether any elements are missing in the general process. On the other side, a
Prohibida su reproducción 58
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
top-down process model that does not focus on the subprocesses’ characteristics and activities does not allow you to see how the subprocesses and their activities behave in reality. In the Process Composer, you can use the top-down approach to model a process according to the requirements of a specific business case. The starting point is defining a general overview of the process and the process steps. With this approach, the process modeling includes the following steps: ●
Creating a process
●
Creating the process steps, represented by activities
●
Creating an importing the business logic of the process steps (tasks, Web services, rules)
Top-down Approach Guidelines ●
●
●
●
Vertical approach Depicts a broader view of a business process fulfilling a given requirement, but not to show how a specific activity is performed Focuses on the overall process-starts with defining the overall business requirements as a framework for the business process model Support business analysts and managers in process improvement efforts and functionality gap analysis
Figure 39: Process Modeling Approaches
Bottom-up Modeling Approach In contrast to the top-down approach, the bottom-up approach starts with defining the activities that stand at the base of the process model. Using them, many different and detailed business processes are created, describing how low level business requirements are fulfilled. The goal of the model is to show how a specific activity is performed to produce a value at the end of the process. In other words, this approach focuses on the subprocesses first. This detailed view of them helps developers and system architects to make the process work. However, a problem
Prohibida su reproducción © Copyright. All rights reserved.
59
Unit 2: Business Process Overview and Development Steps
occurs when this abundance of details has to be combined to form the overall model picture or when it comes to defining the key requirements the general model should fulfill. In the Process Composer, you can use the bottom-up approach to model a process focusing on the details of the process steps. After defining the process steps details, that is to say the business logic of the steps, you can combine them to create the process model. Process Modeling Steps ●
Creating and importing the business logic of the process steps (tasks, web services, rules)
●
Creating a process
●
Creating the process steps, represented by activities
Bottom-up Approach Guidelines ●
Vertical approach
●
Shows how a specific activity is performed to produce a value at the end of the process
●
Starts with defining the activities that stand as the base of the process model
●
●
Uses many different business processes, describing how low level business requirements are fulfilled Supports developers and system architects who make the process work
Inside-out Modeling Approach Unlike the top-down and bottom-up approaches, which are a rather vertical type of modeling, the inside-out one is a horizontal approach. It consists of defining key processes in the overall process and then complementing them with other processes. This approach may be helpful to modelers in different areas in case none of the vertical approaches is appropriate. Like both other approaches, this one has its downsides as well. One of them is that when using this approach, there might be difficulties in defining what the key processes are. In the Process Composer, you can use the inside-out approach and represent the key processes in the overall process as subprocesses. You can represent a complex task as a subprocess if you want to focus on the task as one of the key processes in the model. You can later add to the subprocess some human and automated activities, which could act like additional small processes whose details are not important. Inside-out Approach Guidelines ●
Horizontal approach to define key processes in the overall process and then complementing them with other processes
●
Support modelers in different areas, in case none of the vertical approaches is appropriate
●
Key processes represented in the overall process as subprocesses
●
Complex tasks represented as subprocesses, if the tasks are key processes in the model
●
Human and automated activities added to the subprocess, which act like additional small processes whose details are not important
Prohibida su reproducción 60
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
Process Modeling Perspective SAP NWDS enables you to create a process model and the business logic behind it in detail.
Figure 40: Process Modeling Perspectives
The Process Composer consists of two perspectives: the Process Development Perspective and the Process Modeling perspective. These perspectives offer different views of your process model and enable different process modeling roles to be assigned to specific steps within the process. Process Development Perspective The Process Development Perspective offers a full set of capabilities for designing, implementing, building, and deploying a process. A developer can open a process, which is designed by a business analyst in the Process Development Perspective, perform the required changes to make the process executable, and change the status of the process.
Prohibida su reproducción © Copyright. All rights reserved.
61
Unit 2: Business Process Overview and Development Steps
Figure 41: The Process Development Perspective
A developer can also design and implement a process using the Process Development Perspective as a starting point. Process models created in the Process Development Perspective have a Released for Build status and are checked for errors and constraint violations. Process Modeling Perspective The Process Modeling perspective is a subset of the Process Development Perspective. It offers the option of designing a draft process. This perspective can serve as a starting point for process modeling. Business analyst design the process in this perspective and then hand it over to a developer to add the necessary technical details.
Prohibida su reproducción 62
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
Figure 42: The Process Modeling Perspective
The Process Modeling perspective has a subset of views that are available in the Process Development Perspective. These views can be filtered to show only information relevant to the user. Process models created in the Process Modeling perspective have a draft status. These process models are not checked for errors and constraint violations and do not contain error markers. The status of draft process models can be changed to Released to Build when development is complete, which enables the process to be built and deployed. Abstract Flow Objects Abstract flow objects are objects with no specific type and are used when the object type is not important, for example, the abstract gateway shows where the sequence flow branches or merges. They can be converted to a specific object type later in the process model development. Process Development and Process Modeling Perspective Objects: ●
Abstract events
●
Activities
●
Gateways
SAP NWDS Development Infrastructure The topic Development Infrastructure is discussed in deeper detail in all Java courses. This section only provides a short introduction to the subject. SAP NWDS provides tool kits for various requirements of Java development. These tool kits are based on the corresponding type of project being developed. SAP NWDS also provides
Prohibida su reproducción © Copyright. All rights reserved.
63
Unit 2: Business Process Overview and Development Steps
integration with a robust SAP infrastructure development environment. The combination of these features produce a highly productive tool that covers the entire development cycle of Java-based projects, including the integration of a source management system and configuration of transport management.
Figure 43: SAP NetWeaver Development Infrastructure
SAP NWDS Services For large projects, SAP NWDS provides the following services: ●
●
●
The Design Time Repository (DTR) – a central repository for storing and versioning Java source code and other design time objects. The Central Build Service (CBS) – a central archive pool based on the SAP component model that holds the build results and the time required to build the environment (libraries, required to compile, generators, build scripts). The CBS is a J2EE application. The Change Management Service (CMS) – manages the transport of software changes within a Java development landscape.
Note: In order to transport packaged software, a description is required in the system landscape. All descriptions for system and transport landscapes are stored in the System Landscape Directory (SLD).
Prohibida su reproducción 64
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
Figure 44: Import Development Configuration Options
The Design Time Repository is not required for local development because development takes place on the local development PC. The archives required for local development (needed for compiling libraries, generators, and build scripts) must be downloaded to the local environment. This download occurs automatically when a local development configuration in the development infrastructure is created from scratch.
SAP NWDS Perspectives and Views The NWDS is the ONE tool for performing all required steps in creating integration scenarios. To be able to fulfill all different requirements in one tool, the NWDS works with different perspectives. The different perspectives offer access to different “places” in the system and offer different tools. Because SAP NWDS has been built on top of Eclipse (a well-known Java IDE), it has the same main functionalities and general features. To perform SAP BPM related activities, you will need to be in the right perspective in SAP NWDS. A perspective is a visual container for a set of views and editors, generally put together to help the developer easily implement a specific type of development component. In other words, with a perspective the developer has access to all the functionalities required for his development activities. To perform SAP BPM related activities, three perspectives can be used for specific situations. When developing SAP PO integration content, you will be working mainly with the following perspectives in SAP NWDS: ●
Design Time Repository
●
Development Infrastructure
Prohibida su reproducción © Copyright. All rights reserved.
65
Unit 2: Business Process Overview and Development Steps
●
Process Development
●
Process Modeling
●
Rules Composer (for building business rules)
●
SAP Process Integration Administration
●
SAP Process Integration Designer
●
SAP Process Integration Runtime
If you are developing an application which also contains GUI components such as forms, dashboards, or other type of views, then you will have to choose the relevant perspective (for example, Web Dynpro, Visual Composer, etc.) for that technology in NWDS. There are three ways to open a perspective, these are as follows: 1. By using the menu 2. By using the perspective icon 3. By using the last used icon To open a perspective in SAP NWDS, from the Studio screen, choose Window → Open Perspective → Other and select the correct perspective as shown in the figure, Open Perspective Menu.
Figure 45: Open Perspective Menu
Alternatively you can use the Open Perspective icon, as shown in the figure, Open Perspective Icon.
Prohibida su reproducción 66
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
Figure 46: Open Perspective Icon
Additionally, the system stores the recently used perspectives and offers a quick, direct access by a last used icon.
Process Creation The Process Composer to is used to create processes.
Figure 47: The Process Composer
Prohibida su reproducción © Copyright. All rights reserved.
67
Unit 2: Business Process Overview and Development Steps
Projects contain all the reusable elements and source files needed to model a process. Reusable Elements and Source files ●
Data types
●
Rules and functions
●
Service interfaces
●
Tasks
●
Processes
Processes contain all the graphical elements and connections needed to form one process model. Graphical Elements and Connections ●
Flow objects
●
Connection objects
●
Artifacts
●
Swimlanes
Palette Modeling Items ●
Activities
●
Events
●
Gateways
●
Connections
●
Artifacts
●
Swimlanes
●
Abstract flow objects
Projects Before you start modeling a process in one of the modeling perspectives, you must create a project of type process composer and a process. Both of them act as a container in which you store the different elements you use in process modeling. A Process Composer project contains all reusable elements and source files that you use to model a process. You make the reusable elements available by creating and importing them. You can use them to represent different steps in the process models. For example, you can use a task to create a human activity. It represents a step in the process where a human action is needed for the process to continue. Processes
Prohibida su reproducción 68
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
A process in the Process Composer contains all graphical elements and connections between them that together form one process model. The elements are specified by BPMN. You place the necessary objects representing the process steps and connect them in the sequence in which they are executed in the process. The process can contain another referenced subprocess, which allows you to model processes with different granularity.
Pool and Lanes Process Creation Pools and lanes let you assign tasks and activities to specific users. A pool is the business process and the lanes specify and structure roles and activities.
Figure 48: Pools and Lanes
Pool Business processes are created in pools. A pool represents one participant within a process. A participant can be a business entity or a business role, such as a buyer, seller, or manufacturer. A business process can contain multiple pools. The procedure for creating pools and lanes is shown in the figure, Using the Composite Designer to Create a Process — Pools and Lanes: 1. Create a new process (using the wizard). 2. Define a pool and the necessary lanes. 3. Call the Process Development Perspective to model your process.
Prohibida su reproducción © Copyright. All rights reserved.
69
Unit 2: Business Process Overview and Development Steps
Figure 49: Using the Composite Designer to Create a Process — Pools and Lanes
A pool acts as a container for the sequence flow between activities. A sequence flow can cross lanes within its pool, but cannot go outside the boundaries of the pool. The interaction between pools, for example in a business–to–business context, is managed through messaging. Even if a business process contains multiple pools, only one pool can be active at a time. A business process can only be modeled in the active pool.
Speed Buttons In addition to the palette, the Process Development Perspective provides speed buttons for quick and easy modeling. The speed buttons appear around pools and flow objects. In addition to the explained speed buttons there is a waste bin speed button that deletes the corresponding flow object or artifact with its connections. Note: Choosing the waste bin speed button causes the corresponding flow object or artifact to be deleted without a request for confirmation.
Figure 50: Speed Buttons
Prohibida su reproducción 70
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
●
Creates an activity (human, automated, mapping) or a sub-process
●
Creates a gateway (exclusive choice, parallel split, uncontrolled merge, parallel join)
●
Create an event (start, intermediate timer, end, end error, termination)
●
Creates a connection
●
Creates an artifact (data object, annotation)
You can use the speed buttons around a flow object in two different ways: ●
●
Click the speed button to open the menu. Drag and drop the speed button to the area in the pool where you want to place the new flow object.
There is no menu for the connection and the waste bin. The correct connection between objects is automatically created. While you are creating an activity, a gateway, an event or an artifact the correct connection is automatically added. For example, you create a connection between a start event and a data object, then a data flow connection is automatically created. If you create a connection between a start event and a human activity, a sequence flow connection is created and between the start event and an annotation an association connection is created. You cannot create activities, gateways, events, connections, and data objects outside of the pool. Annotations can also be placed outside of the pool. When you model your process, you may want to copy a single flow object, artifact, or a group of flow objects, and use them elsewhere in the process model or in another process model.
Hint: You can also copy a whole pool and its contents. You can copy and paste objects between processes created in the same project.
SAP Component Model The software component model combines software components (development components, or DCs) for delivery and deployment into larger units.
Prohibida su reproducción © Copyright. All rights reserved.
71
Unit 2: Business Process Overview and Development Steps
Figure 51: SAP Component Model, Built
The figure, SAP Component Model, Built, shows the build of the SAP component model. The product version is defined in the SLD. The following parameters apply to the product version: ●
Provides business solutions
●
Gets defined by management
The software component version (SC) is defined in the SLD. The following parameters apply to the software component version: ●
Groups DCs without overlapping
●
Gets defined by the team leader or planning team
In the SLD, products and software components are defined. The product itself belongs to the SLD, whereas the software component belongs to the component model.
Note: Often, the product and product version are not clearly separated. An example of correct usage would be the way in which SAP sells product versions such as SAP NetWeaver 04 and not products simply named SAP NetWeaver. Products Products provide business solutions. New products are decided upon by the management of a software company. Products are created as new items in the Software Landscape Directory (SLD) Software Catalog, with new software components. Software Component Units of delivery and installation as SCA (software component archives) are delivered in the following ways:
Prohibida su reproducción 72
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
●
New installations
●
Support packages
For group DCs without overlapping, each DC only belongs to one software component at a given moment (the software component may change over time). Software components can be used in more than one product (typically some basic components will be part of every product). Software components get a release number when shipped. Technically the release of a software component is defined by the state of the DC it contains. Software Component Model Parameters The following parameters apply when using the software component model: ●
●
Each top-level component must be assigned to only one software component. Internal components are always the same software component as the corresponding outer component.
●
The assignment of components is not static; it may change over time.
●
Software components cannot be nested.
Combining components into a single model does not effect the visibility of the individual components. Attributes for Software Components The following attributes apply for software components: ●
●
●
●
Software components are not subject to the black box principle (as DCs are). Software components do not define the which components are public; all components are automatically assigned to the public. Software components use each other and depend on each other, similar to the way DCs function. Since software components do not own development properties, they define dependencies only for their associated components.
A DC can only use another DC from a third party software component when its own software component defines a corresponding dependency. DCs can restrict their use by Access Control Lists (ACLs) to specific software components. Therefore, software components can be used for the implementation of software layers. Software components have globally unique names that are constructed according to the same rules as the names of DCs. The name must be defined when the software component is created and cannot be changed later. Names of software components are usually only a vendor identification and a single segment, for example, sap.com/crm. Development Components: Public Parts
Prohibida su reproducción © Copyright. All rights reserved.
73
Unit 2: Business Process Overview and Development Steps
Figure 52: Development Components, Public Parts
Development components are the central element of the SAP component model. The public part of a development component groups elements that may be used by other development components and packages components of the programming language (for example, Java). The main purpose of the public parts is: 1. Compile (build) the development component. 2. Physically pack the build results of the using development component. Public parts define the development component interfaces: All objects inside a development component that may be used by other development components. Most development components define one or more public parts (otherwise they can only use other development components, but cannot be used themselves). The following types of public parts are available: ●
A type that provides an API for developing or compiling other development components (compilation) This can contain one to all objects of a development component.
●
A type that can be packaged into other build results (assembly) This can contain one to all objects of a development component, too. However it’s not useful to put everything in a development component into its public parts: The application would lose structure by doing so.
In the example shown in the figure, Development Components, Public Parts, DC1 contains five objects (C1 to C5): ●
C1 and C2 are provided for compilation: The build result is the API.jar This is needed in typical interaction between Java classes, where one class uses the other.
Prohibida su reproducción 74
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
●
C1 to C5 are all included in the DC1 public part: The build result is an DC1.sda This is needed, for instance, if DC1 is an Java development component, which does not provide a deployable build result by itself.
Objects in public parts can be everything from single class files to package folder trees. Public part definitions go to the metadata of each development component to be read during the build process: If a class C11 from another development component tries to use an object of DC1, only those in PP API are allowed to be used during compilation (such errors are indicated by the SAP NetWeaver developer Studio even before the build process). Advanced control option: ACL can further restrict component (PP) usage: If an ACL is defined only those named in it are allowed to use a development component. Use Dependencies
Figure 53: Use Dependencies
Use dependences declare that a development component uses parts of other development components. Objects from other development components can only be used if the following conditions exist: ●
The used object is an element of a public part
●
A usage dependency exists
Violations of these rules are detected during the component build process. The example shown in the figure, Use Dependencies, illustrates which objects of DC2 can be accesses by other development components and which cannnot. ●
●
DC2 contains the objects (for example, Java classes) C3, C4, C5, C6, and C7. C3 and C4 are put into the public part of DC2. DC1 has declared a use dependency to DC2. DC3 has not declared a use dependency to DC2.
Prohibida su reproducción © Copyright. All rights reserved.
75
Unit 2: Business Process Overview and Development Steps
These rules are checked automatically as follows: 1. The developer of DC1 attempts to call C6 of DC2; this fails because C6 is not in the public part of DC2. 2. The developer of DC3 attempts to call C4 of DC2; this fails (even though C4 is in the public part of DC2) because DC3 has no use dependency to DC2. 3. The error that is shown in the SAP NetWeaver Developer Studio disappears as soon as the use dependency is declared. 4. The developer of DC1 attempts to call C3 of DC2: this is allowed because both public part and use dependency rules are fulfilled.
Organization of Java Projects in SAP NWDS Without the SAP extensions in SAP NWDS, the projects would be built by using different project types, like Eclipse does in the standard delivery. If necessary, these projects would be assigned by using dependencies. These individual projects are connected by dependencies. The Java code is then written and build scripts are created according to the organization of each project. SAP NWDS supports each of these recurring tasks using a standardized project structure supplied by the SAP component model and the given toolset. Because of this, the internal structure of Java, projects needs to be standardized. These standardized Java components are referred to as development components (DCs).
Figure 54: Dialog Box for Creating a New Development Component
There are several types of DCs available. For the BPMN model, there is the Process Composer DC. For Rules Management, there is the Rules Composer DC. All DC types are supported by prospects and editors. This allows standarized build scripts to be created. Development components are allocated to software components. Therefore, a .ear archive usually corresponds to a software component that can be installed on a J2EE server.
Prohibida su reproducción 76
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
Figure 55: Deployment Components in a Software Component
In the figure, Deployment Components in a Software Component, the right pane displays the individual projects already standardized. The left side of the screen displays the same projects integrated into the SAP development infrastructure as a component of the software development components below SC_BIT800_xx. As part of the SAP development infrastructure, SAP provides a considerable number of software components.
Figure 56: SAP Development Infrastructure
The Enterprise Archive (.ear) The result of a development, whether local or central, is always an executable application on the J2EE server. The standard J2EE format required for this is called the Enterprise Archive. Enterprise Archive, or Enterprise Application Archive (EAR) is a term used in Java programming.
Prohibida su reproducción © Copyright. All rights reserved.
77
Unit 2: Business Process Overview and Development Steps
The term EAR is used in the following ways: ●
For the file format to store files
●
As the realization of any data format
In general, an EAR is a file in a *jar, or *.zip format, containing a complete application, according to the Standard Java Platform, Enterprise Edition (Java EE). These files own the extension *.ear. EAR files allow the delivery of complex business solutions in one file. This format can be processed by any Java-application server, which fulfils the Java-EE standard.
Figure 57: Enterprise Application Archive Format
XML File Application Components Each Enterprise Archive contains a deployment descriptor named application.xml. This XML file describes the following the components of the application: ●
Web application archive (WAR) files that contain servlets
●
Java archive (JAR) files that include Enterprise JavaBeans (EJBs)
●
Other JAR files with Java class libraries
The Enterprise Archive is generated during the build process by build scripts. Build scripts contain instructions for processing such as syntax check, dependency check, compilation, compression, and so forth. These instructions are executed during the build process through a Java application (Ant).
Application Architecture The application architecture used has been designed for maximum flexibility and security.
Prohibida su reproducción 78
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
Figure 58: Application Architecture
The business layer of the architecture maps the business process and is user-centric. That is, users interact with the business layer/BPMN process using input masks. In certain circumstances, storage of local data is implemented using JavaBeans.
Prohibida su reproducción © Copyright. All rights reserved.
79
Unit 2: Business Process Overview and Development Steps
Prohibida su reproducción 80
© Copyright. All rights reserved.
Unit 2 Exercise 2 79
Set Up the Local Development Environment SP03 Business Example In this exercise, you will perform the following steps: ●
Create the software component (SC), SC_BIT800_xx/ sap.education.com
●
Create the Development Component (DC), bit800_xx/pm under SC_BIT800_xx
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Create the software component (SC), SC_BIT800_xx/ sap.education.com. 2. Create the development component (DC), bit800_xx/pm under SC_BIT800_xx.
Prohibida su reproducción © Copyright. All rights reserved.
81
Unit 2 Solution 2 80
Set Up the Local Development Environment SP03 Business Example In this exercise, you will perform the following steps: ●
Create the software component (SC), SC_BIT800_xx/ sap.education.com
●
Create the Development Component (DC), bit800_xx/pm under SC_BIT800_xx
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Create the software component (SC), SC_BIT800_xx/ sap.education.com. a) Go to Window →Open Perspective → Other Choose the Development Infrastructure perspective or Other and then Development Infrastructure. b) Choose LocalDevelopment → New → Software Component.
Figure 59: Entry Step for a New SC
c) Enter the following data: Field
Value
Name
SC_BIT800_xx
Vendor
sap.education.com
Prohibida su reproducción 82
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
Figure 60: New SC Entries
d) Choose Finish.
Figure 61: New SC Created
2. Create the development component (DC), bit800_xx/pm under SC_BIT800_xx. a) Choose the Development Infrastructure perspective. b) Choose LocalDevelopment → SC_Bit800_xx [sap.education.com]. c) Choose New → Development Component → Process Composer.
Figure 62: Entry Step for a New DC
d) To navigate to the detail page of New Development Component, choose Next. Enter the following data: Field
Value
Vendor
sap.education.com (select, if not created automatically)
Name
bit800_xx/pm (will be created in lower case automatically)
e) To close the wizard, choose Finish. Choose No to open the Process Development Perspective.
Prohibida su reproducción © Copyright. All rights reserved.
83
Unit 2: Business Process Overview and Development Steps
Figure 63: New DC Created
Prohibida su reproducción 84
© Copyright. All rights reserved.
Lesson: Discussing BPMN in NWDS
LESSON SUMMARY You should now be able to: ●
Develop business processes
●
Explore the development infrastructure
Prohibida su reproducción © Copyright. All rights reserved.
85
Unit 2 Lesson 3 84
Outlining Business Processes
LESSON OVERVIEW This lesson shows you how to outline business processes. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline business processes
The Use Case of the Business Processes In this training, we will create several business processes. The reason for this split is, to keep this example as simple and useful as possible. Each business in this training has a different use case. The high level process is outlined as follows: 1. Create a purchase order process. This is the leading, the main process. 2. Create the distribution process. In this process, we check the stage and create a mapping. 3. Create a dummy process, a helper process. 4. Create a procurement process, here we check, if a part is available. 5. Create integration centric processes, to start the integration. 6. Combine all processes to a big, challenging process.
Business Process Management Business Process Management (or BPM) is a method for defining an organization's workflows in order to control them and make them more efficient. BPM defines the responsible persons in an organization, what they do, and in which order or sequence. Often, ambiguous terms are used to describe the term BPM, leading to confusion. The abbreviation BPM is often used for Business Process Mapping or Business Process Modeling. For our purposes, BPM is used only for business process management or, more simply, process management. The process is a series of specified activities and tasks to be executed by humans or machines in order to achieve one or more objectives. The ultimate aim of BPM is to create value to the customer, thus generating added value to the organization. BPM uses a systematic approach to run, document, measure, monitor, and control both automated and nonautomated activities so that the organization's strategic goals can be met.
Prohibida su reproducción 86
© Copyright. All rights reserved.
Lesson: Outlining Business Processes
BPM describes the following points: ●
Who is performing a task?
●
What task is being performed?
●
When is the task being performed?
●
How is the task being performed?
●
What tool is being used to perform the task?
Increasingly, BPM involves IT-based solutions to determine, improve, and maintain end-to-end processes. When properly implemented, modern BPM solutions save organizations significant operating and processing costs. The use of recent BPM solutions can reduce the process costs of companies significantly. Unfortunately, it is estimated that 80% of all business processes worldwide are designed in office tools like Microsoft Excel, Microsoft Power Point, or Microsoft Access. Automated processing is not possible with these tools. Therefore, the acceptance of automated processing will likely not increase. Customer Complaints about BPM ●
It is too complicated
●
It will not be accepted by employees
●
It costs too much money and/or time to customize or optimize
●
It has no reliable monitoring
●
It does not provide simulations or trend forecasting
Customer Desires for BPM ●
Autonomy for departments to improve their own processes
●
User-friendly operation
●
Simple modeling
●
Ease in controlling, observing, and optimizing processes
●
Long-term investment protection
●
Cost reduction through automation
This course aims to clear up the confusion about BPM and show you how to use it for the benefit of your organization. We begin by describing the technical framework of the course and how to use process applications within a flexible architecture.
Process Controlled Solutions Process controlled solutions are based on the reuse of existing technical capabilities, rather than the reuse of their associated interfaces. They are technically oriented applications that support
Prohibida su reproducción © Copyright. All rights reserved.
87
Unit 2: Business Process Overview and Development Steps
differentiated end-to-end business processes, functional processes, and systems, and they cross organizational borders. Process Orchestration in SAP NetWeaver covers these needs precisely.
Process Controlled Solution Properties Process controlled solutions have the following properties: ●
●
Departments are the drivers of functional processes. Functional properties are user-centric (that is, participants interact via task-oriented user interfaces).
●
Standalone applications cover specific technical requirements.
●
Applications cross system and enterprise boundaries.
●
Existing applications and technical logic do not have to be used.
●
●
A layered architecture is followed, consisting of processes, user interfaces, and service and business object views. Users work only with the information needed to perform their specific tasks.
Process Controlled Solution Examples Process controlled solutions are well suited for the following scenarios: ●
Company-specific processes or gaps in processes that are not covered by existing applications
●
End-to-end scenarios that span systems, applications, and organizational boundaries
●
Scenarios requiring high amounts of communication, coordination, and collaboration
●
Solutions requiring reusable and easy to maintain business rules
●
Scenarios requiring separated processes, operations, and technologies to be simplified and combined
●
Processes with both interactive as well as automatically executable activities
●
Scenarios with lightweight B2B integration (without extensive mapping)
●
Self-service scenarios , such as vacation and travel requests, and citizen services such as applying for a passport or damage reports
●
Processes that frequently change
●
Scenarios with real- time requirements
An Example using a Pizza Order The figure, Pizza Order Example, shows a client requesting a pizza delivery. The zip code is determined through a REST service delivery location. The amount of the order determines whether or not the order should be checked.
Prohibida su reproducción 88
© Copyright. All rights reserved.
Lesson: Outlining Business Processes
Figure 64: Pizza Order Example
For this process to be successful, the order is passed to a supplier, who in turn confirms receipt of the order. In this case, there are no weather-related problems to prevent delivery of the order. The delivery is accessed through SOAP and the current weather is checked through a weather service. The order is acknowledged by email and accepted. In this example, the two main features of process controlled solutions are used, as follows: ●
●
REST: Representational State Transfer, a programming paradigm for Web applications. SOAP: Simple Object Access Protocol, a network protocol that allows data to be exchanged between systems so remote procedure calls can be made. SOAP is an industry standard of the World Wide Web Consortium W3C.
Introduction to Service-Oriented Architecture (SOA) The concepts behind Service-oriented architecture (SOA) and process controlled solutions are interelated. Unfortunately, there is no single, generally accepted and precise definition of SOA. SOA Definition from Wikipedia Definition of Service-Oriented Architecture (SOA) Wikipedia defines SOA with the following key points: ●
●
SOA is a paradigm for organizing and utilizing distributed functionality that is managed by different owners. SOA is different from Web services. SOA describes the isolation of specific implementation methods and techniques of an architectural paradigm.
●
SOA is not new.
Prohibida su reproducción © Copyright. All rights reserved.
89
Unit 2: Business Process Overview and Development Steps
It was implemented a over decade ago using the methods and procedures existing at that time. ●
SOA is not a solution for technical problems.
●
SOA is unique. There is no standard SOA, so organizations must always adapt SOA to their own needs.
SOA Definition from Stiehl Volker Stiehl defines SOA this way: "Service-oriented architecture is an architectural type that results from applying service orientation." (Stiehl, 2013, pp. 10-15).
SOA Properties In order to understand SOA for this course, we use the definition provided by Stiehl. Stiehl process applications are considered as a possible variant during SOA implementation.
BPMN Technical Components Overview The first step is to understand the basics of Business Process Modeling Notation (BPMN). BPMN Definition BPMN is a graphical specification language that represents the available symbols used to help business and computer specialists model and document business processes and workflows. BPMN and Object Management Group (OMG) In a document from the Object Management Group (OMG), BPMN is described as a formal metamodel developed for the modeling of processes. BPMN focuses on processes as a time-logical sequence of activities. BPMN models are not executable alone. The graphical description provided by BPMN is translated into a dialect of XML. This dialect is then interpreted and executed by a suitable process engine. Simple rules and symbols make it possible for this formal metamodel to meet the needs of individual departments, including IT, allowing the model to be accepted and understood by different viewers. In order for this to happen, however, all stakeholders must be willing to engage in the BPMN process. The primary goal of BPMN is to provide a notation that is immediately understandable to all users. This applies to the business analysts to whom the process provides the first initial process sketches, the technical developers performing the processes, and the professionals who manage and monitor the processes. Thus, BPMN provides a standardized bridge between the business process design and its implementation.
BPMN Technical Components Process Views Types of Process Diagrams The different perspectives of a process are mapped in the following types of diagrams: ●
Sequence Diagram
●
Collaboration Diagram
●
Choreography Diagram
●
Conversion Diagram
Prohibida su reproducción 90
© Copyright. All rights reserved.
Lesson: Outlining Business Processes
Sequence Diagram The sequence diagram is the most important method for charting a process. It describes the activities that are carried out, when they are carried out, and the order and conditions for carrying them out.
Figure 65: Example of a Sequence Diagram
Choreography, Collaboration, and Coversion Diagrams These types of diagrams describe the complex interactions between additional BPMN processes in A2A and B2B applications, and are outside the focus of this course.
Figure 66: Example of a Choreography Diagram
BPMN Technical Components Border Items that cannot be Mapped with BPMN 2.0 The following items cannot be mapped with BPMN 2.0: ●
Process landscape
●
Building organizations
●
Data
●
Strategies
●
Business rules
●
IT landscapes
For these situations, different modeling variants must be used. Inference
Prohibida su reproducción © Copyright. All rights reserved.
91
Unit 2: Business Process Overview and Development Steps
BPMN is ideal for professionally driven process applications. Using BPMN allows the following goals to be achieved: ●
●
The process model will be easy to read, allowing stakeholders to understand and accept it. The process model will satisfy the requirements of a formal model, capable of performing automatically given a suitable technical implementation (BPM Runtime).
LESSON SUMMARY You should now be able to: ●
Outline business processes
Prohibida su reproducción 92
© Copyright. All rights reserved.
Unit 2 Lesson 4 91
Sketching the BPMN process
LESSON OVERVIEW This lesson shows you how to sketch the BPMN process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline the elements of a BPMN process
Activities
Figure 67: Basic Activity Elements
There are eight categories of activities available for modeling a business processes. Human Activity A human activity is an activity in the process that is performed by a person. Human activities require assigned tasks. When the process reaches a human activity, the assigned task must be completed by a person before the process can continue. Tasks require input and output data mappings. Automated Activity An automated activity is an activity that is performed by a system. Automated activities require a service interface definition and an assigned operation. In addition, automated activities require input and output data mappings.
Prohibida su reproducción © Copyright. All rights reserved.
93
Unit 2: Business Process Overview and Development Steps
Referenced Subprocess A referenced subprocess is an activity in the process that is a graphical representation of another independent process. When the process flow reaches the referenced subprocess, the other independent process is called. The parent process and the referenced subprocess communicate through input and output data mappings. Embedded Subprocess An embedded subprocess is dependent on the parent process and cannot be executed independently like the referenced subprocess. The embedded subprocess has the local process context of data objects, which is not visible to the parent and root processes. Reporting Activity A reporting activity is used to collect data from the process context so that process data can be analyzed. The reporting activity references a reporting data source and indicates where in the process data is gathered for reporting. Input mapping is required for the reporting activity to specify which process context data is to be collected by the reporting activity. Notification A notification is used to send email updates from the process. You must specify the recipients of the email updates. You can also customize the subject and message texts that are sent. Mapping Activity A mapping activity is used to take complex data from data objects in the process context and convert it to a format that is easier to use. Rule sets can be used to convert data through a mapping activity. Mapping is required between the data objects in the process context to convert data. Looping Looping activities enable embedded subprocesses and simple activities to be executed multiple times in parallel based on a list in the process context.
Prohibida su reproducción 94
© Copyright. All rights reserved.
Lesson: Sketching the BPMN process
Pools and Lanes
Figure 68: Notation Elements: Pool with Lanes
Business processes are created in pools. There is always at least one default pool. The default pool is automatically created when you model a process in the Process Composer. Pool Characteristics: ●
A pool contains a single Business Process Modeling Notation (BPMN) process.
●
A sequence flow is constrained in exactly one pool.
●
A process diagram may contain several pools.
●
A pool can be either active or inactive.
●
A pool generally represents a logical collection of roles, organizational units, and systems.
A pool acts as a container for the sequence flow between activities. A sequence flow can cross the boundaries of lanes within a pool, but cannot cross the boundaries of the pool itself. The interaction between pools is managed through the message flow. A pool represents a single process and is a part of a cross-organization or cross-company business process. Each single process has its own pool within the larger business process, which can contain many pools. Only one pool can be active at any time. Processes are modeled in the active pool. A passive pool contains external activities that are relevant to the process in the active pool but are not an end-to-end process. External activities are a subset of an end-to-end process. Lane Characteristics A lane is part of a pool.
●
●
A pool may have one or several lanes.
Prohibida su reproducción © Copyright. All rights reserved.
95
Unit 2: Business Process Overview and Development Steps
●
In general, a lane represents a role or an organizational unit.
A pool is divided into lanes and is automatically created when you create a new process. A lane is a partition within a pool and is used for structuring and organizing activities. Lanes define the process roles that responsible for completing the activities in a process. Each process role is assigned to a particular lane and can represent internal roles, such as an account manager, or systems, like an enterprise application or an internal department.
Figure 69: Business Trip Approval Process
This example in the figure, Business Trip Approval Process, shows a process that is modeled in one pool. The activities and events in the process are organized in two lanes named Employee and Manager. The activities and events are connected within and across lanes by a sequence flow.
Categories of Elements Introduction to BPM
Prohibida su reproducción 96
© Copyright. All rights reserved.
Lesson: Sketching the BPMN process
Figure 70: Categories of Elements
BPMN defines the following categories for core elements: ●
●
●
●
Flow objects — Defines the graphical behavior of a business process and contains the activity, gateway, and event elements. Connection objects — Links flow objects to each other and contains the sequence flow, message flow, and association elements. Swimlanes — Groups flow and connection objects by accountability within a business process and contains the pool and lane elements. Artifacts — Provides additional information about a business process and contains the data object, group, and annotation elements.
Basic Elements
Figure 71: Basic Notation Elements
Prohibida su reproducción © Copyright. All rights reserved.
97
Unit 2: Business Process Overview and Development Steps
The following three basic notation elements are used in a business process model: ●
●
●
Activity — A step in a business process that requires a system or person to perform a specific action. Gateway — A gateway controls branching, merging, and parallel actions in a business process. A gateway does not represent an action. Event — An event shows a start, pause, resume, or interruption within an activity or the business process itself.
Gateways Overview
Figure 72: Basic Gateway Elements
There are five elements for notating gateways available for modeling a business processes. Exclusive Choice The exclusive choice gateway controls the sequence flow between activities. It is a question that is asked at a specific point in the process and has predefined set of answers to choose from. These answers are the gates. Each gate is assigned a predefined condition that is based on a boolean expression. The boolean expressions use values in the process data to determine which path has to be taken. Each gate has an outgoing sequence flow. Parallel Split The parallel split gateway lets you create parallel work flow. Although you do not need to use the parallel split gateway for parallel flow, with this gateway you can clarify the behavior of complex situations where a parallel flow is required. Each gate of the parallel split gateway has an associated sequence flow. No conditions are assigned to this gateway. Parallel Join The parallel join gateway merges a set of parallel sequence flows that were generated earlier in the process. The parallel split gateway and the parallel join gateway should always be used together.
Prohibida su reproducción 98
© Copyright. All rights reserved.
Lesson: Sketching the BPMN process
Event-Based Choice The event-based choice controls the sequence flow by choosing an outgoing gate based on events that occur at a specific point in the process. Unlike the exclusive choice where the gate is chosen based on an evaluation of expressions, the event-based choice is used to determine the outgoing gate based on a specific event, like receiving a message. In the Process Composer, the event-based choice is always followed by an intermediate event that either waits for the receipt of the message or waits for a certain amount of time to pass before continuing the process flow. Uncontrolled Merge The uncontrolled merge gateway is used to merge alternative sequence flows. There are a few special situations where you need an uncontrolled merge gateway. The most common use of an uncontrolled merge gateway is to join two alternative sequence flows that were generated by a decision earlier in the process. The alternative sequence flows are merged in preparation for a parallel join gateway that synchronizes a set of parallel sequence flows generated later. Without the uncontrolled merge gateway, any number of sequence flows more than three (for example, four sequence flows) might arrive at the parallel join gateway at the same time. Only three of the four sequence flows can pass a token at one time. The parallel join gateway would wait for the fourth token, which would never arrive. The process would be stuck at the point of the parallel join gateway.
Events
Figure 73: Basic Event Elements
There are nine elements of events available for modeling a business processes. Start Event A start event is an event that does not need or require a specific trigger, for example when designing a draft of a process model. When the process is finally designed, this event can be set by a message trigger to start the process. A message start event indicates that the process start is triggered when the event receives a Web Services Description Language (WSDL) message. You assign a message trigger that is created from a service interface and an operation to the message start event. Intermediate Timer Event
Prohibida su reproducción © Copyright. All rights reserved.
99
Unit 2: Business Process Overview and Development Steps
An intermediate timer event shows where the process pauses and waits for a certain time to pass before resuming. Intermediate Message Event An intermediate message event shows where the process pauses and waits for a WSDL message from outside the process before resuming. You cannot use intermediate message events in embedded subprocesses. Error Boundary Event A boundary event is a specific intermediate event that you place on the boundary of an activity but not in the process flow. You use boundary events for exception handling, which are triggered by an error or escalation. The boundary event handles an exception that has occurred while the activity has been performed. End Event An end event is an event that has no specific result. You can use it when the exact result of an end event is not important, for example when designing a draft of a process model. You can add a result to an end event later on, for example a message or error. You can also use an end event without a trigger in an embedded subprocess. A message end event ends a process and sends a WSDL message as a result. A process can have only one end event whose result is a message. You assign a message trigger created from a service interface and an operation to the message end event. You can assign the same WSDL file message trigger with a request and response to the message start and end event to model a synchronous process. Termination The termination event ends the process flow in a regular way. If a branch in the process reaches a termination event, all parallel flows in the process are also terminated. You can set all end events as terminating and make them behave as a termination event. Escalation Boundary Event A boundary event is a specific intermediate event that you place on the boundary of an activity but not in the process flow. You use boundary events for exception handling and thus they are triggered by an error or escalation. The boundary event handles an exception that has occurred while the activity has been performed. For escalation boundary events, the following exception types may occur: ●
Escalations in human activities
●
Escalations that you model including errors and exceptions
Escalation End The escalation end event represents an exception that occurs inside the process, for example, when a task is not completed until the defined deadline. The escalation is internal for the BPM system and is not visible for other systems. There can be more than one escalation end event in a process. You need to set an escalation type for the escalation end event and have the option of making an escalation critical. The escalation is thrown from an inner subprocess to the next outer process until the exception can be handled by an exception handler. If no exception handling is possible for a critical escalation, the process is suspended. You can analyze the exception in the SAP NetWeaver Administrator.
Prohibida su reproducción 100
© Copyright. All rights reserved.
Lesson: Sketching the BPMN process
Error End You use error end events to model an error that occurs in the process. This error triggers a WSDL fault, which can be defined in the service interface of the message trigger you assign to a message start event. Since the error is defined in the service interface, it is visible outside the BPM system and can be used to communicate with other systems.
Connection Objects
Figure 74: Basic Connection Elements
There are four elements of connection objects available for modeling a business processes. Sequence Flow The sequence flow element connects flow objects and defines the sequence of a business process. A flow has only one source and one target which is an element of the category Flow Objects. Message Flow The message flow element shows the interaction between two or more services. The Sequence Flow element is used for connecting the flow object and to define the sequence of business processes. The Message Flow object is used to show the interaction between multiple business processes. In this sense, a business process is just a service, which is invoked by other processes and do exchange data among each other. Data Flow A data flow element displays input and output data from and to an activity. Association The association element is used to attach notes, information, and other documentation to an activity. An association is either unidirectional or it has no direction. When an association is unidirectional, it is classified as a data flow connection object within SAP BPM. When an association has no direction, it allows users to add documentation to a flow object.
Prohibida su reproducción © Copyright. All rights reserved.
101
Unit 2: Business Process Overview and Development Steps
Notation Orchestration and Choreography
Figure 75: Orchestration and Choreography
Orchestration Orchestration Properties: ●
Models the process flow of control in a single interval (active pool)
●
Represented as a sequence flow
Orchestration describes the sequence flow of objects in a process within its pool and its lanes. The sequence flow is the logic behind a business process and defines its internal structure. The flow objects inside a process are limited by the boundaries of its pool. Orchestration is managed by a sequence flow. Choreography Choreography Properties ● Models the interaction between pools (not flow of control) ●
Represents message flow
Choreography defines the interaction between business processes or services. It describes the composition of the internal or external business processes of a company. It shows the entire chain of an order process and choreographs how the processes work together. Processes can be run from within a company (for example, the manufacturing department) or by another company (for example, a supplier or a customer) that belong to the chain of an order process. Choreography is managed by a message flow. Choreography is only for documenting a business process since only one pool is active at time. Choreography is initiated by the process engine.
Notation Artifacts As well as the modeling of a process flow, BPMN allows you to add artifacts to your process model. Artifacts include the following objects:
Prohibida su reproducción 102
© Copyright. All rights reserved.
Lesson: Sketching the BPMN process
●
●
Annotations – Purely descriptive objects, used for providing comments during process modeling. Data objects – Artifacts that store process context and are accessible during the entire process.
Data objects are usually forms that record the output information of an activity. The output of one activity is the input information for a subsequent activity in the process. Data objects manage the process context. The process context enables the sharing of data throughout a business process and makes that data available to all flow objects. Artifacts are managed by the Process Modeler. LESSON SUMMARY You should now be able to: ●
Outline the elements of a BPMN process
Prohibida su reproducción © Copyright. All rights reserved.
103
Unit 2 Lesson 5 102
Sketching the Purchase Order Process
LESSON OVERVIEW This lesson shows you how to sketch the purchase order process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Sketch the purchase order process
BPMN 2.0 Process Sketching When creating a BPM process you have to take several aspects into consideration. The following considerations are the basic guidelines: ●
●
It is preferable to keep a BPMN model as simple as possible. Try to limit the total number of process steps to below 50. Keep the signatures of interfaces used for SAP BPM as small as possible.
Note: For some objects in this training we may violate this guideline. This is done for the purpose of an easier understanding.
●
●
●
●
●
●
It is better to have small mappings rather than big ones that have more than 50 fields mapped. Keep the mapping complexity as low as possible. If not well-designed, a mapping can cause bad performance in SAP BPM. When mapping structures, use the move-corresponding feature when possible. Avoid using the same message trigger for multiple processes. It is better to create a different trigger for each process (when possible). Whenever a group of steps can be reused by multiple processes, consider creating a subprocess that can be referred to by other processes. Consider using parallel processing or a parallel split gateway when some actions or steps in your process can be performed concurrently. This will reduce the time needed to complete your process.
Prohibida su reproducción 104
© Copyright. All rights reserved.
Lesson: Sketching the Purchase Order Process
Caution: Be aware that parallelism might lead to high memory consumption.
Modeling Aids Based on the considerations above, please check the following basics for the different objects: ●
Gateways
●
Tasks
●
Data objects
●
Looping
●
Correlations
Gateways When your SAP Business Process Management (BPM) process uses a gateway, consider the following aspects: ●
●
●
When using a split gateway, pay special attention when updating the same data object concurrently, which can cause locks, data inconsistencies, and decrease performance. When dealing with an exclusive gateway (or exclusive choice), make sure that the conditions are designed in such a way that one gate will always be taken. Setting a default gate is a good practice. When using an event-based choice, ensure that you have a sanity check in case none of the events occurs. If none of the specified events occur, then the process might run forever! Consider including an event timer in the list of events to avoid keeping the process active for an undetermined time.
Tasks Tasks have a life of their own and might need to stay active for a long time. Keeping the total number of tasks on the lower side can dramatically improve your performance. Consider the following actions: ●
●
Create human tasks with reusability in mind. It is better to combine similar tasks into one and reuse it for multiple human tasks. When reusing the same task for many human tasks, you might need to use parameterized subjects and texts to give it more context.
Data Objects Data objects are used to hold process data. These data are modified and manipulated across the process lifecycle. Consider the following points while dealing with data objects: ●
Give meaningful names to your data objects. Others should be able to determine what the data object is used for from its name.
Prohibida su reproducción © Copyright. All rights reserved.
105
Unit 2: Business Process Overview and Development Steps
●
●
●
Only create data objects in a process when needed. Avoid large data objects by not adding unnecessary fields. Use defensive checks on data types in case you are expecting some constraints. For example, instead of directly accessing the second item in a collection, it might be a good idea to first check if an item at position 2 exists in the collection and is not null. These checks might save you from unnecessary runtime exceptions. If the same data object needs to be accessed in parallel, then consider splitting the data object into smaller ones. In that way, each parallel branch only accesses the data pertinent to it.
Looping Looping allows a group of steps to be repeated multiple times. When dealing with loops in your process, avoid creating infinite loops. This may occur when there are no proper conditions to exit the loop. Consider using any combination of counter-data objects, timer events, and gateways to exit your loop. Correlations Consider the following practices when dealing with correlations in your process: ●
●
Avoid implementing you own logic to correlate messages; use the standard features (in start or intermediary events) to achieve correlation. Make your correlation conditions as specific as possible to narrow the chance of unintended messages correlating to your process instance.
Further Considerations — Troubleshooting It is no surprise that error handling should be given attention in every process. It is important to think about all situations that might cause exceptions to an SAP BPM process and to make sure that each is correctly handled. When a high volume of errors is produced, SAP Process Orchestration’s (PO) performance can be severely affected in a negative way. Therefore, be aware of the following points: ●
●
●
●
When handling errors, make the error messages as specific as possible, and provide enough information to make life easy for the process administrator to handle the exception. This approach also aids traceability. Whenever you use an automated or human activity, use boundary events when possible. If many different types of errors are possible in a particular step, then use multiple boundary events to handle each exception separately. If exceptions in different processes can be handled in the same way, then consider creating a process that handles the exception so that it can be reused by many processes.
Further Considerations — Housekeeping Consider regularly running some housekeeping activities to clean up and reduce the size of your database. Some of the actions to be performed include the following: ●
As your processes run, a lot of business logs are written. Remove and delete business logs to keep to database size reasonable.
Prohibida su reproducción 106
© Copyright. All rights reserved.
Lesson: Sketching the Purchase Order Process
●
●
Change the log level setting to a low value to write fewer logs. This is especially important for a productive SAP PO machine. Consider archiving data of completed or canceled processes and those older than a certain period. The higher the process data volume, the shorter your archiving period should be.
Purchase Order Process Sketching The first process you will create in the exercise, Sketch the Purchase Order Process, is the Purchase Order Process. In this process, you will create a basic process model with one lane (to keep the exercise simple). Then you will create the first objects, using the speed buttons. The purchase order process is the leading process of the different processes, you will create in this training. When starting the business process, you will start the Purchase Order process. The first decision made, is the question, if a part is available or not. If yes, the distribution process is started and a reporting activity is started. If not, we make a differentiation in the process, if the part will be delivered later or not. Here we start a notification activity, to inform the customer about the late or the non-delivery. Data objects will be added later. The idea of the first exercise is to let you use the speed buttons. So the full process will consist of 10 objects: ●
The required start object.
●
The automated activity (to check, if a part is in the catalog).
●
A gateway, in which the process splits either in the branch procurement or the branch Distribution.
●
For both branches, we use a referenced Process object.
●
Then we use a parallel split.
●
For both exits of the parallel split we create a notification activity.
●
For the no-decision we use an automated activity (to remove the order).
●
In the distribution branch, we create an embedded activity (with own start and stop objects).
●
With a reporting activity.
●
The required end objects for all 3 branches.
Prohibida su reproducción © Copyright. All rights reserved.
107
Unit 2: Business Process Overview and Development Steps
Prohibida su reproducción 108
© Copyright. All rights reserved.
Unit 2 Exercise 3 107
Sketch the Purchase Order Process SP03
Business Example As a business process management expert, you need to understand the business requirements for your company. Defining these requirements is the first step in modeling and creating a business process. The next step after creating the product, is to sketch up the first process, in this example, a Purchase Order process. The Purchase Order process (PO) is the leading process. In this exercise you will perform the following steps: ●
Sketch the Purchase Order process
●
Model the Purchase Order process with Flow Objects
●
Pre-liminary configuration of PO_areSparePartsAvailible_XOR? with YES and NO true
●
Create the sub processes CheckAvailibility, Distribution, and Procurement
●
Link the sub processes with the Purchase Order process
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. This exercise is dependent on the completion of the exercise, Set up the Local Development Environment.
Figure 76: Sketch Purchase Order Process
1. Sketch the Purchase Order process. Enter the following data: Field
Value
Name
Purchase Order
Prohibida su reproducción © Copyright. All rights reserved.
109
Unit 2: Business Process Overview and Development Steps
Field
Value
Orientation
Left to right
New Pool
Select
New PoolName
PO_PoolAdministrator##
New PoolLanes
PO_LaneAdministrator##
2. Model the Purchase Order process with Flow Objects. Create the following objects: No
Name
BPMN 2.0 type
1
PO_Start_SE
Start Event (SE)
2
PO_End_EE
End Event (EE)
3
PO_goCheckAvailibility_RP
Referenced Sub-Process
4
PO_areSparePartsAvailible_XOR?
Exclusive Choice Gateway (XOR)
5
PO_goToProcurement_RP
Referenced Sub-Process (RP)
6
PO_goToDistributiontRP
Referenced Sub-Process (RP)
14
unnamed Merge
Uncontrolled Merge
Figure 80: BIT800_Exercise Puchase Order Process
3. Configure PO_areSparePartsAvailible_XOR? with YES and NO true. 4. Create the sub processes CheckAvailability, Distribution, and Procurement. Use the following data: Name
Orientation
New Pool → Name
New Lane → Name
CheckAvailability Process
Left to Right
C_PoolAdministratorxx
C_LaneAdministratorxx
Distribution Process
Left to Right
D_PoolAdministratorxx
D_LaneAdministratorxx
Procurement Process Left to Right
P_PoolAdministratorxx
P_LaneAdministratorxx
5. Link the sub processes with the Purchase Order process.
Prohibida su reproducción 110
© Copyright. All rights reserved.
Unit 2 Solution 3 109
Sketch the Purchase Order Process SP03
Business Example As a business process management expert, you need to understand the business requirements for your company. Defining these requirements is the first step in modeling and creating a business process. The next step after creating the product, is to sketch up the first process, in this example, a Purchase Order process. The Purchase Order process (PO) is the leading process. In this exercise you will perform the following steps: ●
Sketch the Purchase Order process
●
Model the Purchase Order process with Flow Objects
●
Pre-liminary configuration of PO_areSparePartsAvailible_XOR? with YES and NO true
●
Create the sub processes CheckAvailibility, Distribution, and Procurement
●
Link the sub processes with the Purchase Order process
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. This exercise is dependent on the completion of the exercise, Set up the Local Development Environment.
Figure 76: Sketch Purchase Order Process
1. Sketch the Purchase Order process. Enter the following data: Field
Value
Name
Purchase Order
Prohibida su reproducción © Copyright. All rights reserved.
111
Unit 2: Business Process Overview and Development Steps
Field
Value
Orientation
Left to right
New Pool
Select
New PoolName
PO_PoolAdministrator##
New PoolLanes
PO_LaneAdministrator##
a) Choose the Process Development perspective in Window → Perspective → Open Perspective → Other.
Figure 77: A New BPM Process
b) Choose New Process by right clicking over [LocalDevelopment] bit800_xx/pm/Process Modeling → Processes. A wizard starts. Create a new process using the data from the table provided.
Figure 78: Entries for the New Process
c) Check that [LocalDevelopment]bit800_xx/pm is set to yourDevelopment Component. d) To close the wizard, choose Finish.
Prohibida su reproducción 112
© Copyright. All rights reserved.
Lesson: Sketching the Purchase Order Process
Figure 79: Process after wizard is finished
2. Model the Purchase Order process with Flow Objects. Create the following objects: No
Name
BPMN 2.0 type
1
PO_Start_SE
Start Event (SE)
2
PO_End_EE
End Event (EE)
3
PO_goCheckAvailibility_RP
Referenced Sub-Process
4
PO_areSparePartsAvailible_XOR?
Exclusive Choice Gateway (XOR)
5
PO_goToProcurement_RP
Referenced Sub-Process (RP)
6
PO_goToDistributiontRP
Referenced Sub-Process (RP)
14
unnamed Merge
Uncontrolled Merge
Figure 80: BIT800_Exercise Puchase Order Process
a) In the Process Development perspective, under [LocalDevelopment] bit800_xx/pm/ Process Modeling → Processes → Purchase Order, create the flow objects as defined in the table and link them as shown in the figure. b) Delete the connection between the start and end object. Right-click the connection and choose Delete from the context menu. c) In the process, position the cursor over the Start event and choose the Square. Choose the little triangle at the lower right corner. A list opens. Choose Reference Sub-Process. d) Create all flow objects in the same manner. Select each of the objects and choose Properties → General → Name and rename the objects according to the table. e) Ensure the Yes and No branch are placed as shown in the figure, BIT800_Exercise Puchase Order Process. f) Format the process manually. Save. If you see re-crosses (errors) it is normal. 3. Configure PO_areSparePartsAvailible_XOR? with YES and NO true.
Prohibida su reproducción © Copyright. All rights reserved.
113
Unit 2: Business Process Overview and Development Steps
a) In the Process Development perspective under [LocalDevelopment] bit800_xx/pm/ Process Modeling /Processes/Purchase Order → PO_areSparePartsAvailible_XOR? → Properties, choose Condition Evaluation. b) In the Condition column, , select each line, choose Edit set both conditions to true. Hint: Set the flags in the Default Gate column to true.
Figure 81: PO_areSparePartsAvailable_XOR? Configuration
4. Create the sub processes CheckAvailability, Distribution, and Procurement. Use the following data: Name
Orientation
New Pool → Name
New Lane → Name
CheckAvailability Process
Left to Right
C_PoolAdministratorxx
C_LaneAdministratorxx
Distribution Process
Left to Right
D_PoolAdministratorxx
D_LaneAdministratorxx
Procurement Process Left to Right
P_PoolAdministratorxx
P_LaneAdministratorxx
a) In the Process Development perspective under, [LocalDevelopment] bit800_xx/pm/ Process Modeling /Processes, using the data from the table provided, create the following processes with using the wizard: ●
CheckAvailability Process
●
Distribution Process
●
Procurement Process
Each of the processes should look as follows:
Prohibida su reproducción 114
© Copyright. All rights reserved.
Lesson: Sketching the Purchase Order Process
Figure 82: New Processes After Wizard is Finished
The overall result should look as follows:
Figure 83: Overall Result
5. Link the sub processes with the Purchase Order process. a) If not open, open the Purchase Order process, in the Process Development perspective under [LocalDevelopment] bit800_xx/pm/Process Modeling /Processes. b) For each of the Reference Sub-Processes choose Properties → Process and assign the new processes to the Purchase Order process. The first Referenced Sub-Process should be the CheckAvailability Process, the second is the Procurement Process and the third one is the Distribution Process.
Figure 84: Linking
c) After each assignment, choose Save. All red error markers should be gone in the Purchase Order process. The result should look as follows:
Prohibida su reproducción © Copyright. All rights reserved.
115
Unit 2: Business Process Overview and Development Steps
Figure 85: Result of the Exercise
Prohibida su reproducción 116
© Copyright. All rights reserved.
Lesson: Sketching the Purchase Order Process
LESSON SUMMARY You should now be able to: ●
Sketch the purchase order process
Prohibida su reproducción © Copyright. All rights reserved.
117
Unit 2 Lesson 6 116
Understanding Tokens
LESSON OVERVIEW This lesson shows you how to sketch the distribution process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Understand the flow of tokens in a process
Tokens Rules for Token Use Tokens are used to understand and re-create the flow of a process. The following rules govern how tokens are used: ●
●
●
Tokens can only move along a sequence flow edge. Tokens are generated by incoming messages (Start Events and Intermediate Message Events) through parallel split gateways and boundary events. Tokens are deleted by a gateway-type parallel join.
The figure, Token Concept Introduction, shows an example of the token concept:
Prohibida su reproducción 118
© Copyright. All rights reserved.
Lesson: Understanding Tokens
Figure 86: Token Concept Introduction
In step 1, a token is generated by a Start Event. In step 2, the parallel gateway split duplicates the token. In step 3, the uncontrolled merge gateway is traversed by two tokens at the same time. Thus, step 2 is executed twice. In step 4, the Exclusive Choice Gateway determines the further course of the tokens, depending on the conditions.
Figure 87: Token Concept—Exclusive Choice
Prohibida su reproducción © Copyright. All rights reserved.
119
Unit 2: Business Process Overview and Development Steps
In step 5, the condition for the Exclusive Choice gateway ensures that only one token is passed. The other token is removed. In step 6, the one remaining token is awaiting a second token. This wait time occurs without any time limitation, dead-locking the process. To prevent this dead-lock, the parallel split in Activity 2 is replaced by an Exclusive Choice gateway, as shown in the following figure:
Figure 88: Token Concept—Second Token
In step 7, the parallel split produces a token for each incoming token. In step 8, the first parallel join waits for the second token. In step 9, the two token become a single token again. This token gets removed at the End Event.
Procedure Models A three stage procedure is used to form the basis for process development. The three parts of this model are as follows: ●
Strategic Process Model
●
Operational Process Model
●
Technical Process Model
The main objective of this three-stage model is to integrate IT departments with the rest of the business. This goal is best achieved when clear responsibilities within the process are defined and all stake-holders are involved and speak a "common language." The Strategic Process Model
Prohibida su reproducción 120
© Copyright. All rights reserved.
Lesson: Understanding Tokens
The primary target group of the strategic process model are process owners and process managers. In the early phases of process development, process participants and process analysts are also involved in the stragetic process model. The strategic process model is intended to provide a basic, results-oriented representation of the process. The main goal of a strategic process model is to provide the fastest possible understanding of the process sequences while requiring no special knowledge of BPMN. The strategic process model is developed from a high-level perspective without possible variations or errors. This error-free view of the process is also known as the "happy path." The Operational Process Model An operational process model is used to orient process participants to their daily work tasks. At this stage, a process anaylst also analyzes the weaknesses of the process and begins designing improvements. The process analyst then uses the operational process model to develop a technical process model, which is given to the process engineer for further refinement and subsequent implementation in the real world. The Technical Process Model The objective of the technical process model is to refine the technical aspects of the process developed in the operational process model, allowing the process to run in a process engine. This level of the BPMN process can only be mapped directly as of BPMN 2.0. Examples of the Three-Stage Procedure Models The figures that follow show an example of the three-stage modelling process at work:
Figure 89: Strategic Process Model for Vacancy
Prohibida su reproducción © Copyright. All rights reserved.
121
Unit 2: Business Process Overview and Development Steps
Figure 90: Operational Process Model for Vacancy
Figure 91: Technical Process Model for a Vacancy
Procedural Model Roles There are various individuals involved in the development of a process, and each one has a distinct role. The process owner is responsible for the strategic process and must assure that the performance of the process is optimized. The process owner is also responsible for budgeting the resources necessary for developing the process. In most organizations, the process owner is a senior management level employee with a wide range of responsibilities.
Prohibida su reproducción 122
© Copyright. All rights reserved.
Lesson: Understanding Tokens
The process manager is responsible for the operational process and reports directory or indirectly to the process owner. The process manager performs as a principle in process development and is usually a member of the organization's middle or lower management. Process participants do the actual work of the process. In most organizations, there are functional groups whose individuals make up the process participants, such as sales, logistics, and so forth. In this case, the leader of the functional group usually reports to a process manager. The process analyst is responsible for business process management in general and is knowledgeable about BPMN in particular. The process analyst supports the process manager in all phases of the process development cycle and is often the contact point for external service providers. Within an organization, the process analyst is usually positioned in a particular area of competence for BPM (as a member of the IT department, for example). A process analyst should possess excellent communication and organization skills, and is, above all, an analyst for the process and a bridge between the business and IT areas of the organization. The process engineer works with the process analyst to develop the technical flow of a process. Ideally, the implementation of the process takes place in the process engine, where process automation is created. The main work of the process engineer takes place during this implementation phase.
Business Process Development Tools The following tools are available for business process development: ● The System Landscape Directory (SLD) Landscape data is stored here. ●
The Enterprise Service Repository (ESR) Interfaces are defined here.
●
The Integration Directory (ID) Used to create integrated configuration objects.
●
SAP NWDS The central development platform for processes.
Prohibida su reproducción © Copyright. All rights reserved.
123
Unit 2: Business Process Overview and Development Steps
Figure 92: Interaction of the Data Modeling Tools
For the figure, Interaction of the Data Modeling Tools, the following abbreviations apply: ●
ID = Integration Directory
●
SLD = System Landscape Directory
●
ESR = Enterprise Service Repository
●
IB = Integration Builder
●
ESB = Enterprise Service Builder
●
BS = Business System
●
SC = Software Component
●
SI = Service Interface
●
IDT-P = SAP Integration Designer Tools Perspective
●
ESR-P = Enterprise Service Repository Perspective
The Integration Directory is available through the SAP Integration Designer tools perspective. Similarly, the Enterprise Service Repository is accessible through the Enterprise Service Repository perspective. All the development perspectives (including the Composite Designer perspective) are combined in a single, common development tool — SAP NetWeaver Developer Studio (SAP NWDS). The relationship between these components is shown in the figure, Interaction of the Data Modeling Tools. Business systems can be imported into the Integration Designer tools perspective. It is also possible to import SLD-scale software components into the Enterprise Service Repository perspective. In the Enterprise Services Repository, existing service interfaces can be imported through an import function in the Composite Designer perspective.
Prohibida su reproducción 124
© Copyright. All rights reserved.
Unit 2 Exercise 4 123
Test the Purchase Order Process for the First Time SP03 Business Example In this exercise you will perform the following steps: ●
Create and build the Java Sources
●
Deploy the Sources on the JEE Server NWKTDC00
●
Start the Purchase Order process from the Process Repository
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Create and build the Java Sources. 2. Deploy the sources on the JEE Server NWKTDC00. 3. Start the Purchase Order process from the Process Repository.
Prohibida su reproducción © Copyright. All rights reserved.
125
Unit 2 Solution 4 124
Test the Purchase Order Process for the First Time SP03 Business Example In this exercise you will perform the following steps: ●
Create and build the Java Sources
●
Deploy the Sources on the JEE Server NWKTDC00
●
Start the Purchase Order process from the Process Repository
Note: In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Create and build the Java Sources. a) In the Process Development perspective, right-click[LocalDevelopment] bit800_xx/pm/ and choose Development Component → Build.
Figure 93: Path to Built the Source
b) On the next screen, select everything and choose OK.
Prohibida su reproducción 126
© Copyright. All rights reserved.
Lesson: Understanding Tokens
Figure 94: Selecting All
c) Choose the Infrastructure Console. The result is displayed. The build is successful, when a green light is displayed. See the figure, Successful Build.
Figure 95: Successful Build
2. Deploy the sources on the JEE Server NWKTDC00. a) In the Process Development perspective, right-click[LocalDevelopment] bit800_xx/pm/ and choose Development Component → Deploy. If required log on with your Administratorxx user id and password.
Figure 96: Deploy
b) Choose Infrastructure Console. When the deployment is successful, it will be symbolized by another green light.
Figure 97: Successful Deployment
3. Start the Purchase Order process from the Process Repository.
Prohibida su reproducción © Copyright. All rights reserved.
127
Unit 2: Business Process Overview and Development Steps
a) Open a new tab in your internet browser, enter: http://nwktdc00.wdf.sap.corp:50000/ nwa. b) Enter the Username, Administratorxx and the password. c) Navigate to Configuration → Processes and Tasks → Process Repository. d) In the first blank line, enter bit800_xx and on your keyboard press Enter to filter.
Figure 98: Process Repository
e) On the Details of Component bit800_xx screen area, choose Purchase Order and Start Process. f) On the BPM Process Startup: Process screen, choose Start Process. No data has to be entered.
Figure 99: Start Process
g) Choose Details.
Figure 100: Detail Link
Prohibida su reproducción 128
© Copyright. All rights reserved.
Lesson: Understanding Tokens
h) Choose the Next Steps: View started process link.
Figure 101: View Started Processes Link
You are guided to the Manage Processes screen. Here you can check the running processes. i) Choose the black triangle. A list of all processed processes opens. The result:
Figure 102: List of Processed Processes
Prohibida su reproducción © Copyright. All rights reserved.
129
Unit 2: Business Process Overview and Development Steps
LESSON SUMMARY You should now be able to: ●
Understand the flow of tokens in a process
Prohibida su reproducción 130
© Copyright. All rights reserved.
Unit 2
129
Learning Assessment
1. After the users are activated in the Portal, the SAP NetWeaver Administrator, and the Web Services Navigator, you have to add a system and define one system as the default system. Determine whether this statement is true or false. X
True
X
False
2. Which of the following BPMN 2.0 elements belong to the Flow Objects? Choose the correct answers. X
A Activities
X
B Data Objects
X
C Events
3. Which of the following BPMN 2.0 elements belong to the Gateways? Choose the correct answers. X
A Parallel Join
X
B Exclusive Choice
X
C Inclusive Choice
4. Which of the following perspectives are the Process Composer perspectives? Choose the correct answers. X
A Process Desk perspective
X
B Process Development Perspective
X
C Process Modeling perspective
X
D Process Server perspective
Prohibida su reproducción © Copyright. All rights reserved.
131
Unit 2: Learning Assessment
5. Input masks are commonly used in technical processes in the business layer and are created using various technologies. Which of the following is a valid technology used in SAPBPM to create input masks? Choose the correct answer. X
A Visual Forms
X
B Web Dynpro
X
C Adobe Composer
6. On which of the following are process controlled solutions based? Choose the correct answer. X
A Nontechnically oriented applications supporting end-to-end business processes.
X
B Reuse of existing technical capabilities.
X
C Methods used for defining an organization's workflows.
X
D Reuse of interfaces associated with the process.
7. A business process is created in a pool. Determine whether this statement is true or false. X
True
X
False
8. Where can a sequence flow go? Choose the correct answer. X
A It must stay in its own lane.
X
B It can cross lanes within its own pool, but it cannot cross the boundary of its pool.
X
C It can cross lanes within its own pool and can cross pool boundaries.
Prohibida su reproducción 132
© Copyright. All rights reserved.
Unit 2: Learning Assessment
9. What does a lane represent? Choose the correct answer. X
A An activity
X
B A process model
X
C A process participant
X
D A process role
10. What does a pool represent? Choose the correct answer. X
A An activity
X
B A process model
X
C A process participant
X
D A process role
Prohibida su reproducción © Copyright. All rights reserved.
133
Unit 2
132
Learning Assessment - Answers
1. After the users are activated in the Portal, the SAP NetWeaver Administrator, and the Web Services Navigator, you have to add a system and define one system as the default system. Determine whether this statement is true or false. X
True
X
False
2. Which of the following BPMN 2.0 elements belong to the Flow Objects? Choose the correct answers. X
A Activities
X
B Data Objects
X
C Events
3. Which of the following BPMN 2.0 elements belong to the Gateways? Choose the correct answers. X
A Parallel Join
X
B Exclusive Choice
X
C Inclusive Choice
Prohibida su reproducción 134
© Copyright. All rights reserved.
Unit 2: Learning Assessment - Answers
4. Which of the following perspectives are the Process Composer perspectives? Choose the correct answers. X
A Process Desk perspective
X
B Process Development Perspective
X
C Process Modeling perspective
X
D Process Server perspective
5. Input masks are commonly used in technical processes in the business layer and are created using various technologies. Which of the following is a valid technology used in SAPBPM to create input masks? Choose the correct answer. X
A Visual Forms
X
B Web Dynpro
X
C Adobe Composer
6. On which of the following are process controlled solutions based? Choose the correct answer. X
A Nontechnically oriented applications supporting end-to-end business processes.
X
B Reuse of existing technical capabilities.
X
C Methods used for defining an organization's workflows.
X
D Reuse of interfaces associated with the process.
7. A business process is created in a pool. Determine whether this statement is true or false. X
True
X
False
Prohibida su reproducción © Copyright. All rights reserved.
135
Unit 2: Learning Assessment - Answers
8. Where can a sequence flow go? Choose the correct answer. X
A It must stay in its own lane.
X
B It can cross lanes within its own pool, but it cannot cross the boundary of its pool.
X
C It can cross lanes within its own pool and can cross pool boundaries.
9. What does a lane represent? Choose the correct answer. X
A An activity
X
B A process model
X
C A process participant
X
D A process role
10. What does a pool represent? Choose the correct answer. X
A An activity
X
B A process model
X
C A process participant
X
D A process role
Prohibida su reproducción 136
© Copyright. All rights reserved.
UNIT 3
A BPMN Process
Lesson 1 Outlining the Roles and Authorizations of a BPMN Process Exercise 5: Assign the Required Authorizations to Use the OData Interface SP03
139 143
Lesson 2 Importing Objects
147
Lesson 3 Outlining Start and End Events for the PO Process Exercise 6: Create PO_StartProcess_Trigger and Assign It SP03
150 163
Lesson 4 Handling Service Interfaces Exercise 7: Test the Catalog Service with WS Navigator SP03
173 183
Lesson 5 Explaining Automated Activities for the PO Process
190
Lesson 6 Adding Activities to a Business Process
195
Lesson 7 Calling a Web Service from an Automated Activity Exercise 8: Model and Configure the CheckAvailability Process SP03
203 213
UNIT OBJECTIVES ●
Outline the roles and authorizations of the main process in BPMN
●
Import objects into a process
Prohibida su reproducción © Copyright. All rights reserved.
137
Unit 3: A BPMN Process
●
Explain Start and End Events for PO
●
Explain service interfaces
●
Explain automated activities for PO
●
Add activities to a business process
●
Call a web service from an automated activity
Prohibida su reproducción 138
© Copyright. All rights reserved.
Unit 3 Lesson 1 137
Outlining the Roles and Authorizations of a BPMN Process LESSON OVERVIEW This lesson outlines the roles and authorizations of a BPMN process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Outline the roles and authorizations of the main process in BPMN
Roles and Authorizations Overview The SAP NetWeaver platform contains the following roles: ●
●
User Management Engine (UME) roles and portal roles define a set of authorizations for static content. Process roles are used for allowing a dynamic role based access control from artifacts available during a process lifecycle.
Process roles use the following guidelines: ●
A role defines a set of rights and obligations for principals.
●
Process principals are assigned to process roles.
●
Permissions are assigned to process roles.
●
Principals as members of roles acquire permissions to perform an action on one or more objects.
Task processors can only execute the particular task he or she is assigned to. The processor who assigned to a human activity overrides the task processor. There might be different processors for a task because the task as reusable entity can be assigned to multiple human activities. The processor who is assigned to a lane can execute all tasks that are assigned to human activities in this lane. The lane processor overrides the task and human activity processors. If you use a task within a process, the potential processor definition of the surrounding lane takes precedence. The processor is evaluated while the task instance is created at runtime. During this process, UME groups and roles are resolved into UME users. This means that changes to the group or role after the task has been instantiated do not have any effect on the task instance that is currently being created. If a user is assigned to a group or role that allows the user to execute a task during the task instance creation, the user could continue to work on the task and complete the task
Prohibida su reproducción © Copyright. All rights reserved.
139
Unit 3: A BPMN Process
even if the assignment to the group or role is changed or canceled. These changes only take effect on the future task instances.
Figure 103: Process Roles Overview
There are three types of roles for tasks, activities, and lanes: potential owners, excluded owners, and task contributors. Potential Owners Potential owners are used to identify users authorized to complete a task, activity, or activities in a lane. A potential owner becomes the actual owner, or processor, only when the task is opened. Once a task is claimed by a potential owner, the task is removed from the task list of all potential owners. Potential owners and task authorizations are defined at the task, human activity, and lane levels. When using principal propagation, the principal information of the actual owner is propagated in the process flow to be used later by an automated activity. Tasks can be accessed in the Universal Worklist. In Business Process Management (BPM), portal roles are assigned to users to enable them to access and execute tasks (of a BPM process) in the universal worklist (UWL). Excluded Owners Excluded owners are principals who are not allowed to process a task in the process model. This construct is necessary to prevent users from approving their own requests. Excluded owners are defined on the task, human activity, or lane levels. Task Contributors An actual owner of a task can invite other contributors to work on the task instance while the task is active. Any user can be a contributor, except excluded owners. Task contributors can see the whole process context, monitor the task execution, and add notes and attachments, but cannot complete the task. When a user is invited to be a task contributor, the task displays in their UW. When the contributor opens the task, they can see the actual owner and the task description.
Prohibida su reproducción 140
© Copyright. All rights reserved.
Lesson: Outlining the Roles and Authorizations of a BPMN Process
Business Process Administrators Process Roles: Administrators A business process administrator can execute administration tasks for processes, activities, or tasks. At least one administrator must be available for each process. A process cannot be deployed without an administrator. Process administration allows a process to be suspended, resumed, and terminated. Task administration allows you to execute, forward, suspend, or resume a task, change deadlines, and prioritize activities and tasks. Troubleshooting allows for the debugging of running processes in the Process Composer to locate and analyze errors. The troubleshooting tool is integrated into the SAP NetWeaver. Administrator is used to check for the availability of BPM components and subsystems. There are also tools to monitor and manage processes and tasks.
Administrators for Tasks, Lanes, and Pools When maintaining the attributes of the Administrator tab, you can define the administrator(s) of a pool via the notion of principals. A principal represents any user, user role, or user group responsible for some aspects of the process. The Administrators category is used to define a process’s Pool Administrator, which can perform administrative tasks on the process, such as canceling, suspending, or resuming. A minimum of one administrator is mandatory in the process. While defining an administrator, you can choose between selecting an administrator directly from the UME of the SAP Process Orchestration (PO) server or using an expression. The administrator subject is covered in more detail in the next section. You can select multiple users (principals) as administrators for a pool. Any of the selected principals can act as administrators for the pool. Specifying a principal as a specific user might not always be a good approach. This is because you are required to know the names of the users in advance, that is, during the development time. This approach does not provide much flexibility. If you hard-code the name of a specific user in a task, then only this specific person can perform the task in question. What if he or she is absent? Note that changing this attribute’s value requires a transport — not very useful if your process is in production and you need to change it. A better approach would be to use roles or groups. In that way, you only need to add users to the appropriate role or group, and they will automatically be able to administer the process. Assigning a role to a user or adding the user to a group can be directly performed in the UME of the required environment (for example, production) and does not require objects to be transported. As a result, this approach has less risk and offers more flexibility. Additionally, you can use an expression to define a pool administrator. When using an expression to define the pool administrator, it’s possible to make use of default functions provided by SAP to select the correct users or administrators during runtime. Use the getPrincipal function to specify the administrator. This is an easy and flexible way to access the principals without having to connect to the server.
Purchase Roles and Participants in the Purchase Order Process In general, the following roles and participants will occur in the notification of a business process:
Prohibida su reproducción © Copyright. All rights reserved.
141
Unit 3: A BPMN Process
●
the lane administrator
●
the pool administrator
For each lane, you will have an administrator. To keep the example simple and understandable the number of roles and participants in the purchase order process was limited to one. In this example, both possible roles are taken by the user Administrator##. In a real example, you could have more lanes, with different administrators. These administrators can be roles or users.
Roles and Rights of Users in UME If you assign a user as Administrator for a pool or lane, the user inherits the roles and rights (Authorizations) that are stored in the UME. Each user may have multiple roles assigned to him or her in the UME. In an implementation, these roles can be recreated or enhanced by the customer.
How to Set the Required Authorizations For the demonstration steps, see the exercise, Assign the Requires Authorizations to Use the Odata Interface.
Prohibida su reproducción 142
© Copyright. All rights reserved.
Unit 3 Exercise 5 141
Assign the Required Authorizations to Use the OData Interface SP03 Business Example The UI5 Implementation is based on the use of the ODATA Interface. To use this interface, various roles must be added to the process: ●
com.sap.bpem.Enduser
●
UnifiedInboxUserRole
●
SAP_BPM_ODATA
●
SAP_BPM_ODATA_INBOX
In this exercise you will perform the following steps: ●
Assign the role com.sap.bpem.Enduser to Requestorxx
●
Assign the role UnifiedInboxUserRole to Requestorxx
●
Assign the roles SAP_BPM_ODATA and SAP_BPM_ODATA_INBOX
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. Assign the role com.sap.bpem.Enduser to Requestorxx 1. Assign the role com.sap.bpem.Enduser to Requestorxx
Assign the role UnifiedInboxUserRole to Requestorxx 1. Assign the role UnifiedInboxUserRole to Requestorxx
Assign the roles SAP_BPM_ODATA and SAP_BPM_ODATA_INBOX 1. Assign the roles SAP_BPM_ODATA and SAP_BPM_ODATA_INBOX
Prohibida su reproducción © Copyright. All rights reserved.
143
Unit 3 Solution 5 142
Assign the Required Authorizations to Use the OData Interface SP03 Business Example The UI5 Implementation is based on the use of the ODATA Interface. To use this interface, various roles must be added to the process: ●
com.sap.bpem.Enduser
●
UnifiedInboxUserRole
●
SAP_BPM_ODATA
●
SAP_BPM_ODATA_INBOX
In this exercise you will perform the following steps: ●
Assign the role com.sap.bpem.Enduser to Requestorxx
●
Assign the role UnifiedInboxUserRole to Requestorxx
●
Assign the roles SAP_BPM_ODATA and SAP_BPM_ODATA_INBOX
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. Assign the role com.sap.bpem.Enduser to Requestorxx 1. Assign the role com.sap.bpem.Enduser to Requestorxx a) Execute http://nwktdc00.wdf.sap.corp:50000/useradmin , choose User from the dropdown and search for Requestorxx. b) Select the row and in the lower area, Details of User Requestorxx and choose Modify. c) Move to the Roles tab and into the Search Criteria field enter *Enduser and choose Go. d) You should see com.sap.bpem.Enduser. e) Select the row and choose Add to take it to the right side. f) Choose Save.
Prohibida su reproducción 144
© Copyright. All rights reserved.
Lesson: Outlining the Roles and Authorizations of a BPMN Process
Figure 104: Add the com.sap.bpem.Enduser Role
Assign the role UnifiedInboxUserRole to Requestorxx 1. Assign the role UnifiedInboxUserRole to Requestorxx a) In the same manner search for Unified* . b) Assign the role UnifiedInboxUserRole by marking it, and choosing Add.
Figure 105: Add UnifiedInboxUserRole Role
Assign the roles SAP_BPM_ODATA and SAP_BPM_ODATA_INBOX 1. Assign the roles SAP_BPM_ODATA and SAP_BPM_ODATA_INBOX a) In the same manner search for *ODATA*. b) Assign both roles to Requestorxx. c) Choose Save.
Prohibida su reproducción © Copyright. All rights reserved.
145
Unit 3: A BPMN Process
LESSON SUMMARY You should now be able to: ●
Outline the roles and authorizations of the main process in BPMN
Prohibida su reproducción 146
© Copyright. All rights reserved.
Unit 3 Lesson 2 145
Importing Objects
LESSON OVERVIEW This lesson shows you how to import objects. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Import objects into a process
ESR Interface Importation You can create required objects in the Enterprise Services Repository (ESR) of a Java AS. These objects can then imported into the process in SAP NetWeaver Developer Studio (NWDS). The easiest way to import interfaces from the ESR is to choose the Import function of service interfaces in the product. The import starts with a selection from which source an object shall be imported. Here the ESR can be chosen. A prerequisite is, that the locally installed NWDS is linked to a ESR of an AS Java. If the assignment works, the ESR is displayed, and the required object can be chosen. Import Method To export the ESR objects, use the high level procedure as follows: 1. From the SAP PI landing page of the source system, launch the ESR. 2. In the ESR, right-click on the software component or namespace that you would like to export, and then choose the Export button. 3. You are then required to specify a location on your local file system in which to save the TPZ file. Don’t forget to properly name the TPZ file. If you want like to export multiple software components, then repeat steps 1 to 3 for each software component. To import the data that you just exported from the previous steps, use the high level procedure as follows: 1. From the target SAP Process Orchestration (PO) landing page, launch the ESR. 2. On the menu, choose Tools, and select Import Configuration objects. You will then see a popup menu, from which you need to select Client and choose the TPZ file from your local file system. 3. Once you have selected the file, choose Import.
Prohibida su reproducción © Copyright. All rights reserved.
147
Unit 3: A BPMN Process
4. Steps 1 to 3 can be repeated multiple times if you want to export more software components or namespaces.
Interfaces for Trigger Creation Depending on the business process and application functionality to be supported by a service interface belongs to one of these categories: ● Inbound ●
Outbound
●
Abstract
Service interfaces represent the principle deliverable as a result of the activities performed during design time in the ES Repository. Once the service interface is ready, it can be released for proxy generation and further implementation on the application side (for example, an SAP ABAP or Java backend system). During the process of proxy generation, the following development objects will automatically be created on the application side: ●
Proxy development objects (that is, classes, methods, and data types) A service definition for mediated or point-to-point communication using the Web service runtime.
●
Inbound (service provider) You want to expose specific application functionality available on the backend system to service consumers. The consumers of your services can be either other application systems or humans. From an SAP PO perspective, the system receiving or processing the requests is the inbound or server (proxy) application.
●
Outbound (service consumer) You need to consume information provided by an external system from your backend system. The invocation of an outbound service can be either automatically or manually triggered from the backend system. From an SAP PO perspective, the system sending the messages is the outbound or client (proxy) application.
Figure 106: Outbound Application ●
Abstract (only applicable for SAP Process Integration (PI) dual-stack systems)
Prohibida su reproducción 148
© Copyright. All rights reserved.
Lesson: Importing Objects
A special type of interface used in integration processes, and part of the cross component Business Process Management (ccBPM) framework. Abstract interfaces cannot be used to generate and implement service interfaces on the backend system. Furthermore, they can only run under dual-stack (ABAP) systems and therefore are not applicable for SAP PO Javaonly systems. LESSON SUMMARY You should now be able to: ●
Import objects into a process
Prohibida su reproducción © Copyright. All rights reserved.
149
Unit 3 Lesson 3 148
Outlining Start and End Events for the PO Process LESSON OVERVIEW This lesson outlines the start and end events for the po process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain Start and End Events for PO
Event Models The events in the process have different triggers and results, and effect the flow of the process. You use events to indicate that a process has started or ended, or that the flow is delayed and is waiting for a certain time before resuming. You can also use events to represent the interaction between different processes. To model events, perform the following high level procedure: 1. Create the event. 2. Assign a trigger to the event or configure the trigger time for intermediate timer events. 3. Use triggers to indicate the reason for an event to occur (for example, a message or an exception). 4. Define a start condition for a message event and a correlation condition for an intermediate message event. Start Condition Start conditions are defined for start message events to specify which messages can start a process. The start condition compares the payload of an incoming message to a predefined constant. For example, a start condition is configured to begin a process when an order for 10,000 units or more is received. When an order is received with a value of 10,000 or more, then the process begins. If the incoming order is less than 10,000 units, then the process does not start. You can also use the default value True, which means that any message can trigger the start event. Start conditions can be configured in great detail. Correlation Condition If you use intermediate message events in your process, you have to configure correlation conditions for them. A correlation condition matches an incoming message to the process context and evaluates which particular message the intermediate message event expects. In contrast to other conditions, correlation conditions can only consist of equality predicates with the conjunction operator AND. The following example shows a correlation condition:
Prohibida su reproducción 150
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
event/customerID = process/customerID AND event/orderItem = process/ orderItem AND event/type = "ORDER". Depending on the event type, an input or an output mapping may be required.
Start and End Events
Figure 107: Start and End Events
Start Event A start event creates a new process instance or indicates the start of a referenced sub-process. A start event is an event that does not need or require a specific trigger. A message start event indicates that the process start is triggered when the event receives a Web Services Description Language (WSDL) message. You assign a message trigger that is created from a service interface and an operation to the message start event. End Event An end event is an event that has no specific result. You can use it when the exact result of an end event is not important. A result, such as a message or error, can be configured at any time, but is not required. You can configure the following end event attributes: ●
Name
●
Trigger Type
●
Description
An end event can be used without a trigger in an embedded sub-process. Message End Event A message end event ends a process and sends a WSDL message as a result. A process can have only one end event whose result is a message. A message trigger is created from a service interface and an operation and assigned to the message end event. The same message trigger created from a WSDL file with a request and response is assigned to the message start and end events to model a synchronous process.
Prohibida su reproducción © Copyright. All rights reserved.
151
Unit 3: A BPMN Process
Intermediate Events
Figure 108: Intermediate Events
An intermediate event pauses a process and has no specific trigger to continue. Use an intermediate event when the exact trigger of an event is not important. You can set a trigger, for example a message or timer, to an intermediate event at any time, but it is not required. Intermediate Timer Event An intermediate timer event shows where the process pauses and waits for a certain time to pass before resuming Intermediate Message Event An intermediate message event shows where the process pauses and waits for a WSDL message from outside the process before resuming. Intermediate message events cannot be used in embedded sub-processes.
Error Boundary Events
Figure 109: Boundary Events
An error boundary event is a specific intermediate event that you place on the boundary of an activity, but it is not in the actual process flow. Error boundary events handle exceptions that occur during an activity and are triggered by an error or escalation. A sequence flow connection starting at a boundary event shows the process flow after an exception. Exceptions can occur in the following areas within a process: ●
Root process
Prohibida su reproducción 152
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
If the exception occurs in the root process, it is handled by a default handler at runtime and you model only the exception in your process. When the exception occurs, the whole process is suspended and an administrator can inspect the process. ●
Referenced sub-process If the exception occurs in a referenced sub-process, it can be handled by a boundary event in the referencing process. In this case you model both the exception and the exception handling. You place the boundary event on the boundary of the sub-process flow object in the referencing process. The sub-process flow object represents the referenced sub-process.
When the exception occurs, the whole process is suspended. Depending on the type of exception, the sub-process and the process may behave in the following ways: ●
Critical exception If a boundary event can handle the exception, the sub-process is canceled and process execution continues from the boundary event. If no boundary event is available, the exception is handled by the default handler and the sub-process remains suspended. The root process is also suspended and an administrator can inspect it.
●
Non-critical exception If a boundary event can be found, the branch, which created the exception in the sub-process, ends and processing continues from the boundary event. If no boundary event can be found, the sub-process remains suspended and the root process is also suspended. The default handler handles the exception and an administrator can inspect the process.
●
Embedded sub-process If an exception occurs in an embedded sub-process, it can be handled by a boundary event in the parent or root process. The embedded sub-process depends on the parent process and cannot be suspended alone but together with the surrounding process. Only an escalation exception type can occur in an embedded sub-process. You model both the exception and the exception handling. You place the boundary event on the boundary of the embedded subprocess, or on the boundary of a parent process up in the hierarchy.
●
Activity If the exception occurs within an activity, you model only the exception handling because the exception is not visible outside the activity. You can place a boundary event on the boundary of a human and automated activity to show how the exception that occurred while the activity was being performed is handled.
●
Caution You can create a boundary event only for human and automated activities for which an exception or respectively WSDL fault has been defined.
●
End of the caution An exception can also occur in a branch of a parallel process or sub-process. In this case, the whole process instance is suspended until the exception is handled by a boundary event or by the default handler. If the exception is handled by the default handler, the process instance remains suspended and an administrator can inspect it.
Prohibida su reproducción © Copyright. All rights reserved.
153
Unit 3: A BPMN Process
Error End, Escalation End, and Termination Events
Figure 110: Other Events
Error End Event An error end event terminates a process that has reached an error state. An error end event is used to model an error that occurs in a process. This error triggers a WSDL fault, which can be defined in the service interface of the message trigger assigned to a message start event. Since the error is defined in the service interface, it is visible outside the Business Process Management (BPM) system and can be used to communicate with other systems. There can be as many error end events in a process as the number of faults defined, but a synchronous process ending with an error end event cannot be modeled because a WSDL fault response is not supported. Error end events cannot be used in embedded sub-processes. An error that occurs in a referenced sub-process is handled by an error boundary event, which is placed on the boundary of the sub-process flow object in your process. Escalation End Event The escalation end event represents a business error that has occurred and needs to be processed (for example, when a task is not completed by the defined deadline). The escalation is internal to the BPM system and is not visible to other systems. There can be more than one escalation end events in a process. The escalation type and importance of the event can be configured in the process. An escalation is thrown from an inner sub-process to an outer external process until the exception can be handled by an exception handler. If exception handling is not possible for a critical escalation, the process is suspended. Exceptions are analyzed in the SAP NetWeaver Administrator. Termination A termination event stops the process or sub-process immediately. A termination event, by default, is triggered by a message, but also can be triggered by an error or escalation. A termination event ends a process flow by design. If a branch in the process reaches a termination event, all parallel flows in the process are also terminated. Termination events can be configured in detail.
Prohibida su reproducción 154
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
Exceptions indicate problems that have occurred or changes from the normal flow of the process. When an exception occurs in the process, the process execution stops at that point. There are the following two types of exceptions in the process composer, differentiated by their triggers: ●
Errors
●
Escalations
To model exceptions and exceptions handling, you create the following event types: ●
Error end event
●
Escalation end event
●
Boundary event
Exception Types in Human Activities An exception that occurs in the inner flow of a task is of type escalation and can be critical or noncritical. Depending on the type of the escalation in the inner task flow, you can create a critical or noncritical boundary event for the human activity to which the task is assigned. Critical and noncritical boundary events have different graphical representations on the boundary of the human activity. The following are exception types for human activities: ●
Critical escalation When the escalation occurs, the task execution is canceled and the critical boundary event handles the exception. The process continues from the critical boundary event and does not follow the regular flow out of the human activity.
●
Noncritical escalation A noncritical escalation does not cancel the task execution and you can work on the task and complete it at runtime. The noncritical boundary event handles the escalation and the process continues from the boundary event. When the task is completed, another token of the process continues independently following the regular flow out of the human activity.
To use exceptions, perform the following high level procedure: 1. Create the necessary events. 2. Define the input mapping Input mapping defines the information that the exception needs. 3. Define the output mapping. The output mapping for boundary events shows how information about the exception is used in the process
Reusable Event Triggers You create service interface definitions or WSDL files to use them in your business process model so you can execute it. You define operations for the service interface definitions you use in your process. The operation is an abstract description of an action supported by the service. The WSDL files are included in a Service Group to be able to configure upon deployment.
Prohibida su reproducción © Copyright. All rights reserved.
155
Unit 3: A BPMN Process
Figure 111: Creating Reusable Event Triggers (1/2)
Figure 112: Creating Reusable Event Triggers (2/2)
Creating reusable event triggers enables you to model events more easily and quickly. You make the necessary settings once and then assign the trigger to more than one event in your process. The event trigger represents the Web service endpoint of the process at runtime. You can also use one and the same event trigger in multiple processes that are contained in the same project. Note that assigning the same message trigger to start events of multiple processes may result in starting all these processes together when the service interface is invoked. You have to specify different start conditions if this behavior is undesired. You can create the following types of reusable event triggers: ●
Message Trigger You use message triggers for modeling message start, intermediate message, and message end events. You create the message trigger from an operation of a service interface. To make
Prohibida su reproducción 156
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
service interfaces available, you can either import or create service interface definitions or WSDL files in your project. When there is a WSDL fault defined for an operation in the service interface definition, an error trigger is automatically created together with the message trigger. You cannot create a separate error trigger manually, but you can add a fault in the WSDL file and then create message and error triggers. You can use the error trigger to model error end events in your process. ●
Escalation Trigger You use escalation triggers to model escalation end events in the process. Escalation end events represent a business error that occurs in the process, for example, an item runs out of stock in a purchase order process. All the deadlines you define in a task can also trigger escalations when they are reached. When you create escalation triggers, you define the escalation type, which is a XSD type. In this way you define which data the escalation transports from the place it is thrown to the place where it is handled. You have the option of marking an escalation as critical. Error and escalation end events can be handled by a respective boundary event. When you have created your event triggers, you can assign them to the events you model. You can also create start and end events directly from event triggers when you drag and drop them on the modeling surface, or intermediate events when you drop a trigger on a sequence flow connection. When you drop an event trigger on an already modeled event, the trigger is updated with the one you dropped on the event.
Figure 113: Intermediate Event Message (1/2)
Intermediate event messages in BPM are used to receive asynchronous messages. The process instance stops until the message is received. Correlation conditions are used to determine to which process instance the incoming message belongs. If the comparison of a key value(s) from the incoming message to a key value(s) in the process instance context match, then the message belongs to the process instance. At this point the process instance continues to the next step. Any unique data value could be used as a key value, for example, a product ID, an order ID or a business partner ID. In general, key values must uniquely identify the process instance.
Prohibida su reproducción © Copyright. All rights reserved.
157
Unit 3: A BPMN Process
Figure 114: Intermediate Event Message (2/2)
Intermediate event messages are bound to the event message. Event messages are in turn bound to service interfaces. When the BPM project is deployed, the service interface is exposed as a Web service. Clients make call to this Web service, which is turn executes the BPMN intermediate message step.
Flow Objects that Can Receive a Message Flow objects are grouped into 3 different groups: ●
Events
●
Tasks
●
Activities
And each group consists of various different objects. A special detail is with flow objects, which can receive a message, these are as follows: ●
Start message events
●
Intermediate message events
Start Message Events (WS Provider) The Start Message Event can be created as follows: ●
WSDL abstract (ESR)
●
WSDL concrete (WS Provider)
●
WSDL self created
A message start event can receive only one message.
Prohibida su reproducción 158
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
Figure 115: Data Flow of a Start Message Event
The figure, Data Flow of a Start Message Event, shows the process flow for a start message event. Intermediate Message Event (WS Provider) The Intermediate Message Event can be created as follows: ●
WSDL abstract (ESR)
●
WSDL concrete (WS Provider)
●
WSDL self created
An intermediate message event can receive any number of messages.
Prohibida su reproducción © Copyright. All rights reserved.
159
Unit 3: A BPMN Process
Figure 116: Data Flow of an Intermediate Message Event
The figure, Data Flow of an Intermediate Message Event, shows the process flow for an intermediate message event.
Flow Objects that can Send a Message The next special groups are flow objects, which can send a message. These are as follows: ●
Automatic activity
●
Message (Error, Escalation) end event in the synchronous case
Automatic Activity (WS Consumer) The Automatic Activity can be created as follows: ●
WSDL abstract (ESR)
●
WSDL concrete (WS Provider)
●
WSDL self-created
Prohibida su reproducción 160
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
Figure 117: Process Flow of An Automated Activity
The figure, Process Flow of An Automated Activity, shows the process flow for an automatic activity. Message End Event (WS Consumer) The Message End Event can be created as follows: ●
WSDL abstract (ESR)
●
WSDL concrete (WS Provider)
●
WSDL self created
The Trigger comes from a Message Start Event as follows: ●
Exclusively at synchronous communication
●
Using an Input Mapping, a Response can be created
Prohibida su reproducción © Copyright. All rights reserved.
161
Unit 3: A BPMN Process
Figure 118: Process Flow of a Message End Event
The figure, Process Flow of a Message End Event, shows the process flow of a message end event.
How to Create and Assign a Trigger For the demonstration steps, see the exercise, Create PO_StartProcess_Trigger.
Prohibida su reproducción 162
© Copyright. All rights reserved.
Unit 3 Exercise 6 161
Create PO_StartProcess_Trigger and Assign It SP03 Business Example Note: In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. In this exercise, you will perform the following steps: ●
●
Import the asynchronous service interface, PO _startProcess from ESR Create the data object, PO_purchaseOrder_DO to hold the order data in the Purchase Order process
●
Create the trigger, PO_StartProcess_Trigger and assign it to the Purchase Order process
●
Create a 1:1 output mapping from PO_Start_SE/ PO_Start_SE to PO_purchaseOrder_DO
The process should looks as follows:
Figure 119: The Whole Process
1. Import the asynchronous service interface, PO _startProcess from ESR. The following data is used:
Prohibida su reproducción © Copyright. All rights reserved.
163
Unit 3: A BPMN Process
Figure 120: Data Used In This Process
2. To hold the order data in the Purchase Order process, create the data object, PO_purchaseOrder_DO. 3. Create the trigger, PO_StartProcess_Trigger, and assign it to the Purchase Order Process. 4. Create a 1:1 output mapping from PO_Start_SE/ PO_Start_SE to PO_purchaseOrder_DO.
Prohibida su reproducción 164
© Copyright. All rights reserved.
Unit 3 Solution 6 163
Create PO_StartProcess_Trigger and Assign It SP03 Business Example Note: In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. In this exercise, you will perform the following steps: ●
●
Import the asynchronous service interface, PO _startProcess from ESR Create the data object, PO_purchaseOrder_DO to hold the order data in the Purchase Order process
●
Create the trigger, PO_StartProcess_Trigger and assign it to the Purchase Order process
●
Create a 1:1 output mapping from PO_Start_SE/ PO_Start_SE to PO_purchaseOrder_DO
The process should looks as follows:
Figure 119: The Whole Process
1. Import the asynchronous service interface, PO _startProcess from ESR. The following data is used:
Prohibida su reproducción © Copyright. All rights reserved.
165
Unit 3: A BPMN Process
Figure 120: Data Used In This Process
a) Choose the Process Development perspective. b) Choose [LocalDevelopment] bit800_xx/pm/Process Modeling /Service interfaces/. c) Right-click over Service Interfaces. d) In the context menu, choose Import WSDL. This opens a wizard. e) On the WSDL Import screen, choose Enterprise Service Repository and choose Next.
Figure 121: Access to ESR to Import Service Interfaces
f) To log on, enter the Username, Administratorxx and password. On the Enterprise Services Repository screen, the available software components are displayed.
Prohibida su reproducción 166
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
Figure 122: SC in ESR
g) Navigate to SC_SELLSPAREPARTS_BIT800 and expand it by clicking the + symbol. h) Navigate to your group number and open the folder, Service Interfaces. i) Choose PO_startProcess.
Figure 123: Objects in the SC, PO_startProcess
j) Choose Next. k) On the Service Reference screen, choose Create new. In the Name and Description fields, enter StartProcesses.
Figure 124: Service Reference
l) Choose Finish. The result looks as follows:
Prohibida su reproducción © Copyright. All rights reserved.
167
Unit 3: A BPMN Process
Figure 125: Result of the Import
2. To hold the order data in the Purchase Order process, create the data object, PO_purchaseOrder_DO. a) Choose the Flow Object in Palette → Artifacts → Data Object and drag it into the Purchase Order lane. b) In the Textfield, enter PO_purchaseOrder_DO. c) Alternatively, choose Properties of this object, and under General, in he Name field, enter PO_purchaseOrder_DO.
Figure 126: Data Object PO_purchaseOrder_DO
d) Choose the data type, DT_PO_startProcess - urn:bit800:xx:com from the PO_purchaseOrder_DO → Properties— Data Type.
Figure 127: Data Object PO_purchaseOrder_DO, Configuration
The result looks as follows:
Prohibida su reproducción 168
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
Figure 128: Result
e) Choose Save. 3. Create the trigger, PO_StartProcess_Trigger, and assign it to the Purchase Order Process. a) Choose the Process Development perspective. b) Choose the Purchase Order process under [LocalDevelopment] bit800_xx/pm/Process Modeling /Processes / Purchase Order. c) Choose PO_Start_SE. d) Choose PO_Start_SE → Properties → Event Trigger. e) Choose Trigger and from the menu choose New. This starts a wizard.
Figure 129: Wizard to Create a Trigger
f) In the Name field, enter PO_startProcess_Trigger. g) Choose Next. h) On the New Message Trigger screen in the Service field, select the service interface PO_startProcess, and choose Finish.
Prohibida su reproducción © Copyright. All rights reserved.
169
Unit 3: A BPMN Process
Figure 130: Properties of the New Trigger
The result looks follows:
Figure 131: Trigger Assignment
Figure 132: The Result
4. Create a 1:1 output mapping from PO_Start_SE/ PO_Start_SE to PO_purchaseOrder_DO. a) Choose PO_Start_SE. b) Choose PO_Start_SE → Properties → Output Mapping. c) Drag and drop the mapping as displayed in the figure, drag MT_PO_startProcess and drop it over PO_purchaseOrder_DO using the secondary mouse button (normally righ-click) button and choosing the Execute Default Matcher function:
Figure 133: Execute Default Matcher
Prohibida su reproducción 170
© Copyright. All rights reserved.
Lesson: Outlining Start and End Events for the PO Process
Figure 134: Result of the 1:1 Output Mapping at PO_Start_SE
d) In the process, drag an arrow link from PO_Start_SE to PO_purchaseOrder_DO.
Figure 135: Connection of PO_purchaseOrder_DO to PO_Start_SE
Prohibida su reproducción © Copyright. All rights reserved.
171
Unit 3: A BPMN Process
LESSON SUMMARY You should now be able to: ●
Explain Start and End Events for PO
Prohibida su reproducción 172
© Copyright. All rights reserved.
Unit 3 Lesson 4 171
Handling Service Interfaces
LESSON OVERVIEW This lesson shows you how to handle service interfaces. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain service interfaces
Service Interfaces Overview Service interfaces are required at the following locations: ●
For automatic activities in BPMN processes where service interfaces act as start and end events
●
For automatic activities where intermediate events act as trigger events
●
In integration scenarios as outbound or inbound service interfaces
A Web Service Description Language (WSDL) file is used to describe service interfaces. The actual data structure for service interfaces is defined by an embedded XML-schema.
Web Service Description Language (WSDL) File Design and Structure
Figure 136: WSDL File Structure
Prohibida su reproducción © Copyright. All rights reserved.
173
Unit 3: A BPMN Process
A WSDL file is an XML file defined by the following elements: ●
type (Data Type)
●
message
●
portType (Interface Type)
●
binding (Binding)
●
port (Port)
●
service (Service)
In detail: 1. type (Data Type) Definition of the data types used for exchanging the messages. 2. message Abstract definitions of the transmitted data, consisting of a plurality of logical components, each of which is associated with a data type definition. 3. portType (Interface Type) A set of abstract operations involving the exchange of the following message types: Table 2: Message Types Message Type One way
The service receives a request (message input) from the client and sends a response (output message).
Request response
The service receives a request (message input) from the client and sends a response (output message).
Solicit response
The service sends a message and waits for a response from the client.
Notification
The service sends an output message.
4. binding (Binding) Determines the specific protocol and data format for the operations and messages that are given by a particular port type. 5. port (Port) Specifies an address for a binding (that is, a communication interface), typically a URL. In WSDL 2.0, the name of this element was changed to endpoint. 6. service (Service)
Prohibida su reproducción 174
© Copyright. All rights reserved.
Lesson: Handling Service Interfaces
Summarizes the number of ports or a port type together.
Abstract and Concrete WSDL The main elements of WSDL files are broken into two different groups, abstract and concrete definitions. Each group contains specific elements. Abstract Group Elements ●
type
●
message
●
portType (Ab WSDL 2.0: Interfaces)
Concrete Group Elements ●
binding
●
port (ab WSDL 2.0: Endpoints)
●
service
Service interfaces, which are stored in the Enterprise Service Repository, only represent the abstract part of service interfaces. Complete WSDL files are provided by service providers. Service Registry WSDL files, whether abstact or concrete, are delivered through a URL. This URL is listed along with descriptive data in a standardized directory service known as the Universal Description Discovery and Integration (UDDI). The SAP implementation is the service registry. The WSDL files are listed across domains.
Web Services Inspection Language (WSIL) WSDL files can be stored in a Web Services Inspection Language (WSIL) document. This document contains the URLs of the WSDls on a J2EE server. A WSIL document lists only complete WSDLs. WSIL is accessed through the following url: http://:/ inspection.wsil.
Prohibida su reproducción © Copyright. All rights reserved.
175
Unit 3: A BPMN Process
Figure 137: WSDL File in WSIL Format
Service Interface Creation in the ESR Builder An abstract WSDL file is created when a service interface is created in the ESR builder. The figure, Service Interface Creation, schematically shows the methods by which service interfaces can be created. Additionally the cardinalities between the different objects are displayed. Beside the most right branch, all other branches can be created in the ESR perspective of the SAP NetWeaver Developer Studio (NWDS).
Figure 138: Service Interface Creation
Prohibida su reproducción 176
© Copyright. All rights reserved.
Lesson: Handling Service Interfaces
Service Interface Creation in the NetWeaver Developer Studio The procedure for creating a service interface in SAP NWDS is nearly identical to the steps you perform in the Enterprise Service Builder (ESB). The main difference lies in the use and operation of masks. A specific change list is used for creating these objects.
Figure 139: Service Interface Creation in the ESR
1. In the ESR perspective, the connection to the ESR is established with the Connect button. 2. Connection data must have already been stored in Windows → Preferences → Web Services → Enterprise Service Browser. 3. The type of mapping is defined here.
Prohibida su reproducción © Copyright. All rights reserved.
177
Unit 3: A BPMN Process
Figure 140: Service Interface Creation—Advanced Options
4. In the Overiew → Advanced screen, metadata such as direction can be entered. 5. In the Detail view → Definition screen, additional operations can be added to the marking operation.
Figure 141: Service Interface Creation—Adding Operations
Prohibida su reproducción 178
© Copyright. All rights reserved.
Lesson: Handling Service Interfaces
6. The input node is marked. 7. Now the Add button is active. Choose it. The right side of the screen opens to choose additional options. 8. Choosing the Browse button opens a new dialog box. 9. Choosing the option Include Message Types allows message types to appear.
Figure 142: Service Interface Creation—Assigning Message Types
10. Message types that are successfully assigned to a service interface appear. Now Save and Activate.
Service Interface Creation in the WSDL Editor The WSDL Editor allows WSDL files to be created by hand, as shown in the figure, Creating a Service Interface with the WSDL Editor.
Figure 143: Creating a Service Interface with the WSDL Editor
Differences in Service Interfaces Due to Creation Method The Category property must be selected for service interfaces created in the ESR. This property can be set to inbound or outbound. Inbound service interfaces are used by service providers. Outbound service interfaces are used by consumers. The Category property is useful for integration scenarios in which one sender is configured to 1-n receivers.
Prohibida su reproducción © Copyright. All rights reserved.
179
Unit 3: A BPMN Process
The Category property is visible in the configuration of provided services within the NetWeaver Administrator.
Figure 144: Provided Services Configuration View
The figure, Provided Services Configuration View, shows an example service interface, SI_CallBackTechnicalProcess, created in the ESR-builder. The Category property for this service interface is set to inbound. This entry must be included in the abstract WSDL. The connectivity for the service interface (WS in the example) appears in the NetWeaver Administrator under the Provided Services tab. You cannot assign a profile to the XI connectivity setting (see example).
Service Interface Usage Service interfaces are used in BPMN processes for sending messages in automated activities or end events. Service interfaces are also used to receive messages with intermediate message events or within start trigger event service interfaces.
Prohibida su reproducción 180
© Copyright. All rights reserved.
Lesson: Handling Service Interfaces
Figure 145: Using Service Interfaces
The figure, Using Service Interfaces, shows the following steps involved in service interface usage: 1. Service interfaces are used in the BPMN process on the node Service Interface by importing the WSDL file. 2. The available WSDL sources include the Enterprise Service Repository, the Services Registry, and remote access. 3. The URL of the WSDL is set after remote access is granted. One potential source could be the WSIL document. 4. The WSDL service interface appears under the target namespace in the WSDL file after the WSDL service interface is imported.
Figure 146: WSDL Service Interface in WSDL File
Prohibida su reproducción © Copyright. All rights reserved.
181
Unit 3: A BPMN Process
How to Test the Catalog Service with WS Navigator For demonstration steps, see the exercise, Test the Catalog Service with WS Navigator.
Prohibida su reproducción 182
© Copyright. All rights reserved.
Unit 3 Exercise 7 181
Test the Catalog Service with WS Navigator SP03 Business Example In this exercise, you will perform the following steps: ●
Call the SOAP Test tool WSNAVIGATOR
●
Perform test case 1: the article number is not listed in the Catalog (article cannot be ordered)
●
Perform test case 2: the article number is listed in the Catalog (article can be ordered)
Figure 147: Business Example
Note: In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. 1. Start WSNavigator and test the SI_CatalogService in the Provider System. Don’t forget the Invocation Parameters. 2. Testcase 1: Article number is not listed. Use the following data:
Prohibida su reproducción © Copyright. All rights reserved.
183
Unit 3: A BPMN Process
Figure 149: Testcase item number is not listed in the catalog
3. Testcase 2: Article number is listed. Use sparePartNo=600.
Prohibida su reproducción 184
© Copyright. All rights reserved.
Unit 3 Solution 7 183
Test the Catalog Service with WS Navigator SP03 Business Example In this exercise, you will perform the following steps: ●
Call the SOAP Test tool WSNAVIGATOR
●
Perform test case 1: the article number is not listed in the Catalog (article cannot be ordered)
●
Perform test case 2: the article number is listed in the Catalog (article can be ordered)
Figure 147: Business Example
Note: In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. 1. Start WSNavigator and test the SI_CatalogService in the Provider System. Don’t forget the Invocation Parameters. a) To start the WSNavigator, open a new tab in your internet browser, in the URL field, enter: http://nwktdc00.wdf.sap.corp:50000/wsnavigator. Select Provider System and in the Search for field, enter SI_CatalogService, choose Search.
Prohibida su reproducción © Copyright. All rights reserved.
185
Unit 3: A BPMN Process
Figure 148: Test SI_CatalogService in WSNAVIGATOR
b) Choose Next twice, until the screen for making entries is displayed. c) Deselect the Skip option to be able to maintain the values for Purchase order, customer and address 2. Testcase 1: Article number is not listed. Use the following data:
Figure 149: Testcase item number is not listed in the catalog
a) On the screen, enter the data you find in the previous figure b) Save the testdata. Choose Export, as file name enter TestData_SI_CatlogService_500.xml, as path use Y:/groupxx/Testdata. c) Under Invocation Parameters, choose and enter the following data: Field
Value
Authentication
HTTP Autentication
User Name
Administratorxx
Password
Your password
Prohibida su reproducción 186
© Copyright. All rights reserved.
Lesson: Handling Service Interfaces
Figure 150: Invocation Parameters
d) Choose OK. e) Choose Next. The call will be executed. The following results are expected: Field
Value
isSparePartAvailable
false (the flag at True is not set)
alternativeSparePart
9999
Figure 151: Test Case 1 Result
3. Testcase 2: Article number is listed. Use sparePartNo=600. a) Start the WSNavigator if you are not already there with:http://nwktdc00.wdf.sap.corp: 50000/wsnavigator and test the Si_CatalogService again. b) Import the TestData_SI_CatlogService_500.xml from the file Y:/groupxx/Testdata. c) In the sparePartNo field change the value to 600. d) Choose Invocation Parameters and check if the Administratorxx user id and password is already there, if not add them to the HTTP Authentication. e) Choose Next. The call will be executed.
Prohibida su reproducción © Copyright. All rights reserved.
187
Unit 3: A BPMN Process
The following results are expected: Field
Value
isSparePartAvailable
true (the flag at True is set)
alternativeSparePart
600
Figure 152: Test Case 2 Result
Prohibida su reproducción 188
© Copyright. All rights reserved.
Lesson: Handling Service Interfaces
LESSON SUMMARY You should now be able to: ●
Explain service interfaces
Prohibida su reproducción © Copyright. All rights reserved.
189
Unit 3 Lesson 5 188
Explaining Automated Activities for the PO Process LESSON OVERVIEW This lesson explains automated activities for the PO process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain automated activities for PO
Tasks Overview A task is a request for a human to perform an action. In process modeling, you use tasks to assign them to the human activities in your process. A human activity is a type of flow object in the process you model that illustrates an activity that a human performs. When you create a human activity, it has a default task assigned to it, which you can change with another task. The following settings can be configured at the task level: ●
Task priority level
●
Principals for process roles (potential owners, excluded owners, administrators)
●
Dynamic user texts for task titles
●
Time constraints to control when the task start/stops
Tasks Definition A task is a set of instructions that describe how to perform a specific action. In process modeling, tasks are assigned to the human activities in a process. When you create a human activity, a default task is automatically assigned to it. The task is easily edited or changed. After creating a task and assigning it to a human activity, you can edit the task to define its attributes. When working with tasks, you can assign the following attributes: ●
Task name and description
●
User interface
●
Task owners
●
Task administrators
●
Time constraints
●
Task priorities
Prohibida su reproducción 190
© Copyright. All rights reserved.
Lesson: Explaining Automated Activities for the PO Process
●
User texts
Task Creation To create a task, use the following high level procedure: 1. Create the task. Specify a name for the task and a description. 2. Assign a user interface to the task. Assign either a Web Dynpro or Visual Composer UI component or an Adobe Form. Alternatively, you can use the UI Task Generation template. 3. Define task owners. Define owners of the tasks on one of the following levels: lane level, human activity level, or task level 4. Define task administrators. 5. Define time constraints (optional). 6. Define task priorities (optional). 7. Define user texts (optional). The Task Editor has a number of views that allow you to configure different elements of the task. In the Overview tab of the Task Editor, you can perform the following tasks: ●
Turn on or off the ability of task owners to seek contribution from others.
●
Set the UI component used by the task.
●
Change the name of the task.
●
Set the priority of the task.
Define Name and Description of the Task You specify a name for the task when you create the task. In the Task Editor you have the option to rename the task, as follows: 1. Expand Process Modeling, then expand Tasks. 2. In the context menu of a task, choose Open. The Task Editor opens. 3. On the Overview tab, under General Information, choose the Rename... button. 4. In the dialog box that appears, specify a new name for the task in the New Name field and choose the Finish button. 5. (Optional) In the Documentation field, specify a description of the task. User Interface A task's user interface allows users to interact and complete tasks using customized windows and screens within the business process on the system computer. Tasks can use a default UI task generation template or a custom UI created using Web Dynpro, Visual Composer, or Adobe Offline Forms. The default template allows quick and easy creation of multiple tasks and Web
Prohibida su reproducción © Copyright. All rights reserved.
191
Unit 3: A BPMN Process
Dynpro and Visual Composer UI components. Tasks can share and reuse UI components or have their own unique UI component. Web Dynpro or VC Components To assign a Web Dynpro or VC component to a task, perform the following steps: 1. Select the Choose button to launch the wizard. 2. Choose Unified UI Import Wizard. 3. Choose UI Technology: Web Dynpro or VC, then choose Search and select the applicable component. 4. Choose the complete event and mark any other events and boundary events. In the process, the human activity illustrates an activity that triggers a task. This task is executed by a human. The interaction between a human and the process is enabled through a user interface (UI). The UI assigned to a task allows the user to access and execute that task. This procedure shows how you assign a UI to a task. You can assign UIs of the following technologies: ●
Web Dynpro
●
Visual Composer
You can search for UI components in the WD and VC projects available in your workspace. When you assign a UI component to a task, a dependency between the Process Composer DC and the DC containing the UI component is automatically set.
Note: You must make a DC dependency to public parts of WD/VC DCs that contain UI components. If this is not done, nothing will display in the wizard for you to select. Boundary events can be caught at the BPM level. The Show All Components radio button allows you to see UI components that do not meet requirements to be integrated into BPM. Task Owners Task owners are the people who are responsible for completing a specific task or activity in the business process. You can assign task owners to the following business process components: ●
Lanes
●
Human activities
●
Tasks
Task owners can invite other people to contribute to a task or activity once it is deployed. This enables multiple users to work on a single task at the same time. Contributors help and support the task owner, but the task owner is responsible for managing and completing the task or activity. Defining Time Constraints (Optional)
Prohibida su reproducción 192
© Copyright. All rights reserved.
Lesson: Explaining Automated Activities for the PO Process
The time constraints are deadlines that refer to the activation, start, completion, and expiration time of the task. Defining Task Priorities (Optional) Task priorities set the importance of a task from very high to low. To add task priorities, perform the following steps: 1. Expand Process Modeling, then expand Tasks. 2. In the context menu of a task, choose Open. The Task Editor appears. 3. On the Overview tab, under Priority, select a priority from the drop-down menu. Defining User Text (Optional) User texts provide a short description or brief instructions for the person responsible for completing the task. User texts of tasks that have a Web Dynpro or Visual Composer UI component assigned to them are displayed in the Universal Worklist. User texts for tasks that have an Adobe form assigned to them are sent in an email to the task owner or potential owners with the form attached. You can configure user text with dynamic content so that data and information is always accurate. To create user text, perform the following steps: 1. Expand Process Modeling, then expand Tasks. 2. In the context menu of a task, choose Open. 3. In the Task Editor, choose the Add button to add a variable. 4. Choose the value in the Name field to rename the variable.
Caution: You can only use the letters A through Z, the numerals 0 through 9, and the underscore character in the variable name. 5. From the Type drop-down menu, choose a type for the variable if necessary. Choose the Edit button to define an expression. Choose OK. The return value of the expression you create must match the type you chose in the Type field of the Variables table. 6. Specify a subject for the task in the Subject field and a description in the Description field. Use braces { } to reference the variables you defined. You reference a variable by putting the variable's name between the braces. Note: If you decide to send custom email notifications to the potential owners once the task is created, the Subject and Description will also be used as the subject and body of the email.
Prohibida su reproducción © Copyright. All rights reserved.
193
Unit 3: A BPMN Process
Task Roles Task Roles for Human Activities ●
Potential owners — A list of people who can be assigned to a task.
●
Excluded owners — A list of people who cannot be assigned to a task.
●
Administrators — A list of people who are assigned to a task.
You can assign and change task role assignments for a task from the human activity in the business process. The principals available to assign to task roles are from the User Management Engine (UME) of the CE AS Java. The role assignments can be overwritten at the activity level. The Roles view of the Task Editor allows you to assign principals to roles of the task. The User Texts view of the Task Editor allows you to create parameterized texts for the task subject and description.
Time Constraints Time constraints are the time frames defined for a task. The following time constraint settings are available for a task: ●
●
●
●
Activation Time — The time when a task becomes active. A task will not be available to the task owner until the activation time begins. Start Deadline — The time when a task must be started. If a process is not started on time, an exception can be thrown. Completion Deadline — The time when a task must be completed. If a process is not completed on time, an exception can be thrown. Expiration Time — The time when a task becomes inactive and is no longer available to the task owner. The process continues on to the next step if the expiration time is reached.
The Time Constraints view of the Task Editor allows you to set time constraints for when a task is activated, started, completed, and expired. LESSON SUMMARY You should now be able to: ●
Explain automated activities for PO
Prohibida su reproducción 194
© Copyright. All rights reserved.
Unit 3 Lesson 6 193
Adding Activities to a Business Process
LESSON OVERVIEW This lessons will show you how to add activities to a business process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Add activities to a business process
Referenced Subprocesses
Figure 153: Referenced Subprocess Activities
Referenced subprocesses use the following guidelines: ●
●
●
●
The subprocess must reference a process that is defined in the same process development component. Processes referenced by subprocesses must have a start and end point, like the main process. A process used as a subprocess must maintain its own process context, just like the main process. The rest of the configuration, input and output mapping, and boundary events, are done in the same way as the other activities.
The referenced subprocess is a type of activity in the business process model. Use referenced subprocesses to reference another independent process by the parent process. You can
Prohibida su reproducción © Copyright. All rights reserved.
195
Unit 3: A BPMN Process
reference processes contained in the same development component (DC) as the parent processes or in a different DC. When you reference a process in a different DC, you have to define the DC dependencies. A process used as a subprocess must contain its own process context. The referenced subprocess has a start event and end event containing the same event trigger. When a subprocess is created, the start event and end event for that subprocess can be created from a selected trigger. When modeling referenced subprocesses, choose between a top-down or a bottom-up approach. The difference between these approaches is the sequence in which the steps are executed to model the referenced subprocess. Top-down approach In a top-down approach, a referenced subprocess activity is created in the parent process being modeled. A new process is modeled containing events, activities, and connections and then assigned to the referenced subprocess activity created in the parent process. Bottom-up approach In a bottom-up approach, the new process is created separately from the parent process being modeled. A referenced subprocess activity is created in the parent process and the new process is assigned to the referenced subprocess activity created in the parent process. As a result, the subprocess activity references the process you have modeled and assigned to it. When modeling referenced subprocesses, data mappings can be defined to show how the referenced subprocesses use data for input and output communications with the parent process.
Embedded Subprocess Activities
Figure 154: Embedded Subprocess Activities
An embedded subprocess is a compound activity that is defined as a flow of other activities. The compound activity can be expanded to show the contained flow of activities and collapsed to make the parent process easier to view. The embedded subprocess is dependent on the parent process and cannot be executed independently like a referenced subprocess. The embedded
Prohibida su reproducción 196
© Copyright. All rights reserved.
Lesson: Adding Activities to a Business Process
subprocess has a local process context of data objects that is not visible to the parent and root processes. However, the process context of the parent and root processes is visible for the embedded sub-process. Embedded Sub-process Guidelines ●
Can access both its own and parent's process context
●
Can be shown expanded or collapsed
●
Contain no lanes
A subprocess can be embedded in another embedded subprocess and then embedded in another one to create a hierarchy. As a result, there can be multiple parent processes but only one root process at the top. An embedded subprocess in a hierarchy has access to the process contexts of all its parent processes and the root process. There is no data mapping between a parent process and an embedded subprocess. Because the embedded subprocess depends on other processes, it does not have all the features of an independent business process. There are no participants and roles in an embedded subprocess, which means there are no pools and lanes. The embedded subprocess can have multiple outgoing tokens. If, for example, there is a parallel split gateway inside the embedded subprocess, all tokens that reach the end event continue outside the embedded subprocess. The embedded subprocess can only contain a subset of the events available in the Process Composer. The following events and event triggers can be used in an embedded subprocess: ●
Start Events – 1 None (without a trigger)
●
Intermediate Events – 0..n Timer
●
End Events – 1..1, 0..n Escalation
Use an embedded subprocess and its local context to model exceptions and exception handling. Exceptions are a type of escalation and are handled by boundary events. Boundary events are placed on the boundary of an embedded subprocess where an escalation is thrown or on the boundary of a parent process higher up in the hierarchy.
Looping Activities All activity types can be configured to be looped over multiple times. Looping is controlled by a bound list in the process context. For each item in the list, the activity is executed. The item in the collection being looped over can be accessed for input mapping from the currentCollectionItem node.
Prohibida su reproducción © Copyright. All rights reserved.
197
Unit 3: A BPMN Process
Figure 155: Looping Activities
To model multiple, parallel instances of an activity in a process model, create a looping activity. All activity types in a process model can be configured in the Process Composer to loop multiple times. At runtime, a dynamic number of activity instances can run in parallel. The exact number of instances to be executed at runtime with a loop context is defined in the Process Composer. To define the loop context, select a specific data object with an XSD element, which is a list from the process context, or use an expression, which evaluates a list of elements. The number of elements in the list defines how many instances are executed. All the instances of an activity are executed in parallel. The process flow continues after all of the parallel instances of the activity have been completed. Multiple Instances Activities ●
Referenced subprocesses
●
Embedded subprocesses
●
Automated activity
●
Human activity
●
Mapping activity
●
Reporting activity
The following additional loop-specific data objects are automatically created when using the Parallel for Each loop option: 1. NumberOfCompletedIterations – This data object contains the number of completed loop instances.
Prohibida su reproducción 198
© Copyright. All rights reserved.
Lesson: Adding Activities to a Business Process
2. CurrentCollectionItem – This data object contains the list element assigned to each loop instance. These two data objects are only relevant for loops and are part of the local context of the activity with the multi-instance loop. Loop-specific data objects can be used when input and output data mappings are defined for this activity, but the two loop-specific data objects cannot be used for data mappings of other activities in the process. The loop-specific data objects can only be used as a source when defining data mappings, but they cannot be used as a target. To transport information from within the loop context to a data object outside the loop context, the corresponding output mapping must be defined and appended. Dynamic Parallel Looping Dynamic parallel looping with use case follows these guidelines: ●
Parallel batch processing or task routing for multiple line items
●
Dynamic number of line items (not known at design time)
●
Synchronization upon completion
Dynamic parallel looping with variants follows these guidelines: ●
Continue outer flow before all line items were completely processed
●
Cancel remaining line items when certain criteria is met
●
Number of line items changes at runtime
The dynamic parallel looping uses the workflow patterns according to the following guidelines: ●
Multiple instances without synchronization
●
Multiple instances with prior design time knowledge
●
Multiple instances with prior runtime knowledge.
●
Multiple instances without prior runtime knowledge
●
Static partial join for multiple instances
●
Canceling a partial join for multiple instances
●
Dynamic partial join for multiple instances
The dynamic parallel looping, as shown in the figure, Advanced Patterns (1), displays a workaround using a thread split, asynchronous trigger, and thread merge pattern, as well as alternative multiple instance activity.
Prohibida su reproducción © Copyright. All rights reserved.
199
Unit 3: A BPMN Process
Figure 156: Advanced Patterns (1)
You can also have each subflow instance process a unique line item. Referenced subflows cannot "read through" to the context of the outer process. The invoking flow is asynchronously notified upon successful subflow start. Non-interrupting escalation end events are used.
Figure 157: Advanced Patterns (2)
Dynamic parallel looping requires significant modeling effort, including the following: ●
Thread split or merge pattern implementations
●
Complex mapping expressions for extracting line items from batch
●
Extra subflow for spawning the asynchronous escalation event
Most cases can be natively handled using plain multiple instance activities (BPMN).
Prohibida su reproducción 200
© Copyright. All rights reserved.
Lesson: Adding Activities to a Business Process
Figure 158: Advanced Patterns (3)
Outer processes may need to be continued before all line items are fully processed, as per the following: ●
Remaining line items still need to be processed
●
Downstream discriminator synchronization
●
Complex mapping expressions for extracting line items from batch
●
Extra subflow for spawning the asynchronous escalation event
Mapping Activities
Figure 159: Mapping Activities
Mapping activities are simple activities that allow you to map the context itself, while calling rules and functions. Mapping Activities Guidelines ●
●
They are useful when you want to modify the process context data without having the execute human or automated activities. They can execute rules and functions in the mapping.
Prohibida su reproducción © Copyright. All rights reserved.
201
Unit 3: A BPMN Process
The mapping activity is a type of flow object in the process. Use a mapping activity to transform complex data from data objects in the process context into simpler data. When working with mapping activities, a mapping activity is created as a flow object in your process. Mappings are defined between the data objects in the process context. LESSON SUMMARY You should now be able to: ●
Add activities to a business process
Prohibida su reproducción 202
© Copyright. All rights reserved.
Unit 3 Lesson 7 201
Calling a Web Service from an Automated Activity LESSON OVERVIEW This lesson shows you how to call a Web service from an automated activity. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Call a web service from an automated activity
Service Interfaces Introduction to Service Interfaces A service interface (SI) is used to describe operations that are required later for an implementation in the application, independent of platform or programming language. Depending on the category of a service interface, the following use cases are possible: ●
●
●
Inbound (Provider Role): A service in an application system, which can be called by a user. Outbound (Consumer Role): A call from a service of a provider is required. To do so, you require the outbound service interface that matches the inbound service interface. Abstract: In enhanced communication using the integration server, you want to exchange messages with a buffered integration process.
In the application system, a proxy generation is used to generate development objects for implementation based on the service interfaces. Proxy generation generates the following objects automatically: ●
Proxy objects (for example, classes, methods, and data types)
●
A service definition for communication using the Web service runtime
Note: In the case of the stateless (XI 3.0 compatible) interface pattern, a service definition is only created if the operation is a synchronous operation. In general, the interface pattern in the Enterprise Service Repository (ESR) is used to determine which protocol is used by the service interface. As with all design objects, service interfaces are organized using Repository namespaces, which are assigned to a software component version. You can construct service interfaces using the following methods:
Prohibida su reproducción © Copyright. All rights reserved.
203
Unit 3: A BPMN Process
●
Through message types and data types This two-layer structure uses WSDL (Web Service Description Language) and is oriented towards maximum reusability. Customers can also use data type enhancements to add their own fields to a message. To handle application specific errors, you have the option of using fault message types.
●
●
Through RFC or IDoc messages as counterparts for an RFC or IDoc in the SAP system for A2A or B2B integration Through external WSDL, XSD, and DTD definitions, and the message schemas contained in them
These objects, as well as business objects and context objects, are referred to as interface objects.
Note: The introduction of an intermediate message type layer seems at first glance unnecessary; however it is required in XML so that a message can be handled as a separate instance. Data types in XML schema do not yet define an instance of this type because a data type does not yet define an element. Building a Service Interface In general, service interfaces are built in a service interface editor. In the editor you can switch between the design and the source (code) tabs. Category and Interface Pattern The interface pattern determines the type of communication. Service interfaces of the categories outbound or inbound are used for the implementation of communication in the application system. In this case you can select all interface patterns. Service interfaces of the category abstract are intended for communication with an integration process on the Integration Server. In this case you can only use the interface patterns stateless and stateless (XI 3.0 compatible). Abstract Service Interfaces Abstract service interfaces are required for the execution of cross-system integration processes. The execution of such processes enhances communication using the Integration Server as follows: an integration process on the Integration Server can relate messages to each other according to a specified model (also known as orchestration ). An integration process is therefore executed after a message has been sent and before it has been received by a receiver. An integration process receives and sends messages by using abstract service interfaces. In an integration process, a service interface in this category can take on the role of an inbound or outbound service interface depending on whether it is used for sending or receiving a message. For this reason, no direction is specified during definition. In integration processes, you can use the same abstract interface to receive and send a message. Abstract service interfaces generally receive the message from an outbound interface of a sender system and send it to an inbound interface of a receiver system, thus performing a complementary role. You also use abstract service interfaces for particular adapters. You cannot generate proxies for service interfaces of this category since abstract interfaces are not designed to be implemented in an application system.
Prohibida su reproducción 204
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
Interface Patterns and Operations Each service interface can have multiple operations. Depending on the interface pattern, the service interface editor provides you with appropriate operation patterns and modes from which to select. Table 3: Service Interface Operations Interface Pattern
Operation Pattern
Mode of Operations Available
Security Profile
stateless
normal operation
Synchronous and Asynchronous
No Low Medium High
stateless (XI 3.0 compatible)
normal operation
stateful
normal operation
Synchronous and Asynchronous
Basic
Synchronous
No
Strong
Low Medium High commit operation
Synchronous
rollback operation
Synchronous
TU@C/C
normal operation
Synchronous and Asynchronous
No Low Medium High
tentative-update oper- Synchronous ation confirm operation
Asynchronous
compensate operation Asynchronous
Note: Data may be lost if you change the interface pattern of a service interface, because not every operation pattern is available in every interface pattern. Furthermore, the change may require you to make a change to an existing implementation. You must therefore commit to one interface pattern at the start.
Prohibida su reproducción © Copyright. All rights reserved.
205
Unit 3: A BPMN Process
The structure of the data to be exchanged is defined by the reference to a message schema. Depending on the mode, in the service interface editor you can reference message types, RFC messages, IDoc messages (for requests only), or external messages for the relevant direction of message exchange. Table 4: Mode and Message Types Mode
Messages
Asynchronous
Request, fault (optional and only for inbound service interfaces)
Synchronous
Request, Response, Fault (optional)
From the ES Repository release of 7.31 SP11 and 7.4 SP06 onwards, it is also possible to model services based on mode Asynchronous Best Effort. Services modeled using this mode cannot be used in Process Integration for BPM use cases.
Note: For more details, please refer to SAP note 1928204. If you want to handle application-specific errors or persist them in monitoring, assign corresponding fault message types to the operation. Fault messages transfer errors on the receiver side to the sender or to monitoring. For this reason, it is not possible to define fault messages for asynchronous operations of abstract service interfaces or for asynchronous operations of outbound service interfaces. Security Profile You can assign security levels to the service interfaces in the ESR. These values form the metadata descriptions which influence the behavior during implementation of this service definition. This feature is applicable only for point to point communication. You can assign different sets of values to security profiles. Depending on the type of interface pattern selected, you can choose from a different set of values for the security profile. If you select the interface pattern as Stateless (XI 3.0 compatible), you can choose from the following values: ●
Basic Basic Authentication using user ID and password and no transport security
●
Strong Strong Authentication (SSL or SSO) and transport security
If you select the interface pattern as Stateful, Stateless, or TU&C/C, you can choose from the following values: ●
No No Authentication and no transport security
Prohibida su reproducción 206
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
●
Low Basic Authentication using user ID and password and no transport security
●
Medium Basic Authentication using user ID and password and transport security
●
High Strong Authentication (SSL or SSO) and transport security
Note: The Security Profile field is available only if you select the Point-to-Point Enabled checkbox.
Service Interface Definition Task Assignment
Figure 160: Service Interface Definition Task in the Process
Services are called by integrating automated activities into the process and assigning the service and operation to be called. When the execution of the process reaches the automated activity, the service is called. As shown in the figure, Assign the Service, services are assigned in the Interface view.
Prohibida su reproducción © Copyright. All rights reserved.
207
Unit 3: A BPMN Process
Figure 161: Assign the Service
Service Group Details
Figure 162: Creating a Service Group
By assigning the service and operation, you do not specify from where this service is provided. This mapping of the service call to a system providing this service has to be done in the runtime configuration. To ease this runtime configuration, you additionally have to assign a service group. Assigning multiple service calls to one service group enables you to do the runtime configuration
Prohibida su reproducción 208
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
for all of them together instead of having to configure each service. A common case is to use one service group for each provider system from which the process is consuming Web services. This way, the runtime configuration can quickly be configured to call the right system for the Web service calls. If the Web service to be called is provided by an application that is running on the BPM system, you can also mark the local provider system flag for the service group to be able to skip the runtime configuration completely.
Figure 163: Service Groups
You can find the existing service groups and their references to services below the Connectivity node in the project tree.
Principal Propagation Overview
Figure 164: Principal Propagation Overview
Prohibida su reproducción © Copyright. All rights reserved.
209
Unit 3: A BPMN Process
You can forward user contexts using principal propagation, which means you can transfer principal information from start events, intermediate message events, and human activities to an automated activity. The automated activity is then executed with the given user information.
Principal Propagation An incoming message that is transferring principal information can come from a start event, intermediate message event, or a human activity. Messages from a start event or intermediate message event are triggered by an incoming request. The incoming request provides the principal information, which is copied to the main token of the process flow. When a human activity is transferring principal information, the information is only transferred when the task is complete. Owner information is taken from the active task. The main flow token is then populated with the principal information.
Figure 165: Principal Propagation
●
With Principal Propagation, the user context is forwarded -
-
●
Principals from incoming events and human activities are transferred to an automated activity The automated activity is then executed with the given user information
Principal Propagation is enabled in the properties view of the process
Incoming Principal Information The incoming message transferring the principal information can be one of the following:
Prohibida su reproducción 210
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
●
●
Start event or Intermediate message event -
Triggered by an incoming request
-
The principal information is given by the incoming request
-
The principal attributes are copied to the main token of the process flow
Human activity -
The principal attributes are only propagated when a task is completed
-
The actual owner information is taken from the involved task
-
The main flow token is populated with the principal information
Service Call Users ●
●
●
When an automated activity is reached in the process flow, it consumes the principal information It switches to the user that is set in the principal attributes for the time when calling the Web service Default hierarchy of used credentials to start an automated activity: -
Principal propagation If principal propagation is activated for the process flow and the token contains a principal, this is consumed by the automated activity.
-
Connectivity If no credential is provided by principal propagation, the user and password that is used to set up the connection in the NetWeaver Administrator SOA Management is consumed by the automated activity.
-
BPM Service User If no credential is provided by principal propagation or connectivity the default user BPM Service User is consumed by the automated activity.
Propagation of Principal Information in the Process Flow ●
●
When modeling a process with active principal propagation: -
Consider when in the process flow the principal information is forwarded
-
Consider when it is removed
Behavior of a token (with principal information) in a process flow: -
-
-
Exclusive choice — The token is forwarded including the principal information. Parallel split — The token is forwarded including the principal information. If new tokens are generated the principal attributes are set accordingly for them. Uncontrolled merge — The token is forwarded including the principal information.
Prohibida su reproducción © Copyright. All rights reserved.
211
Unit 3: A BPMN Process
-
-
-
-
-
Parallel join — Any principal information is removed. Loops — Due to token merge semantic, the out token flow does not propagate the principal. Boundary events — Due to cancel semantic, the out token flow does not propagate the principal. Embedded sub-process — The token propagates the principal information from the main process flow into the embedded sub-process (and back). Referenced sub-process — Due to independency semantic, the in and out token flow for referenced sub-process flow does not propagate the principal.
Embedded subprocess The token propagates the principal information from the main process flow into the embedded subprocess. The principal information is also effective in the subprocess flow. There, the principal can be set by task activities and can be used by automated activities. When a token leaves an embedded subprocess flow, it propagates the latest principal information into the main process flow.
Prohibida su reproducción 212
© Copyright. All rights reserved.
Unit 3 Exercise 8 211
Model and Configure the CheckAvailability Process SP03 Business Example In this exercise, a CatalogService, available as a Web Service is used to check if the requested article number can be ordered (is available in the catalog). In this example, the service is implemented in such a way, that only article numbers, starting with a 5 cannot be ordered. Based on this, decisions will be made, later.
Figure 166: CheckAvailability Process
You will perform the following steps: ●
Sketch CheckAvailibility process
●
Create a DO CA_CheckAvailibility_DO based on the data type DT_CA_startProcess
●
Create the trigger, CA_StartProcess_Trigger, configure it, and assign it to the CheckAvailibility process
●
Create and configure the automatic activity, CA_Call_viaAEX_CatalogService_AA
●
Configure the service consumer over the service reference services in NWA
●
Configure the service provider, CA_startProcess_Trigger and PO_startProcess, trigger
●
Test the CheckAvailibility process with the WS Navigator
Prohibida su reproducción © Copyright. All rights reserved.
213
Unit 3: A BPMN Process
Note: In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. 1. Sketch the CheckAvailibility process. Create the following objects: Object
Type
CA_Start_SE
Start Event
CA_End_EE
End Event
CA_Call_viaAEX_CatalogService_AA
Automated Activity
Figure 167: CheckAvailability Process
2. Create a DO CA_CheckAvailibility_DO based on the data type DT_CA_startProcess and under the StartProcesses service reference. 3. Create the trigger, CA_StartProcess_Trigger, configure it, and assign it to the CheckAvailibility process. Create and Configure the Automatic Activity CA_Call_viaAEX_CatalogService_AA In this task, you will perform the following steps: ●
Import the CatalogService WSDL
●
Assign the service interfaces SI_CatalogService
●
Create a mapping 1. Import the CatalogService WSDL.
2. Assign the service interfaces, SI_CatalogService to CA_Call_viaAEX_CatalogService_AA automated activity 3. Create a mapping. Note: The procedure was explained in an earlier exercise. This is a shortened description. Remember to use the secondary button in the mouse and choose Execute Default Matcher.
Configure the Service Consumer Over the Service Reference Services in NWA In this task, you will perform the following steps:
Prohibida su reproducción 214
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
●
Check the service reference
●
Build and deploy the development component [LocalDevelopment] bit800_xx/pm]
●
Configure the service reference services in NWA 1. Check the service reference.
2. Build and deploy the development component, [LocalDevelopment] bit800_xx/pm]. Note: The procedure was explained in an earlier exercise. This is a shortened description. 3. Configure the service reference, Services, in NWA. Configure the Service Provider CA_startProcess_Trigger and PO_startProcess Trigger 1. Configure the service provider, CA_startProcess_Trigger and PO_startProcess trigger. Test the CheckAvailability Process with WS Navigator 1. Test the CheckAvailability process with WS Navigator. The process flow looks like:
Figure 192: CheckAvailability Process Flow
Prohibida su reproducción © Copyright. All rights reserved.
215
Unit 3 Solution 8 214
Model and Configure the CheckAvailability Process SP03 Business Example In this exercise, a CatalogService, available as a Web Service is used to check if the requested article number can be ordered (is available in the catalog). In this example, the service is implemented in such a way, that only article numbers, starting with a 5 cannot be ordered. Based on this, decisions will be made, later.
Figure 166: CheckAvailability Process
You will perform the following steps: ●
Sketch CheckAvailibility process
●
Create a DO CA_CheckAvailibility_DO based on the data type DT_CA_startProcess
●
Create the trigger, CA_StartProcess_Trigger, configure it, and assign it to the CheckAvailibility process
●
Create and configure the automatic activity, CA_Call_viaAEX_CatalogService_AA
●
Configure the service consumer over the service reference services in NWA
●
Configure the service provider, CA_startProcess_Trigger and PO_startProcess, trigger
●
Test the CheckAvailibility process with the WS Navigator
Prohibida su reproducción 216
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
Note: In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. 1. Sketch the CheckAvailibility process. Create the following objects: Object
Type
CA_Start_SE
Start Event
CA_End_EE
End Event
CA_Call_viaAEX_CatalogService_AA
Automated Activity
Figure 167: CheckAvailability Process
a) In the Process Development perspective, under [LocalDevelopment] bit800_xx/pm/ Process Modeling /Processes / CheckAvailibility Process , create a process by using the flow objects and assign them according to the figure and table provided. First delete the line from the Start event to the End event and then use the speed buttons to create the flow. The activity in the middle is an Automated Activity b) Choose Save. 2. Create a DO CA_CheckAvailibility_DO based on the data type DT_CA_startProcess and under the StartProcesses service reference. a) Import the synchronous service interface, CA _startProcess from ESR. Store it under the service reference, StartProcesses. To do this, right click over Services Interfaces and choose Import WSDL, then choose from Enterprise Service Repository and the interface should be under the SC_SELLSPAREPARTS_BIT800 and your namespace. When asked choose theStartProcesses service reference
Prohibida su reproducción © Copyright. All rights reserved.
217
Unit 3: A BPMN Process
Figure 168: Service Interfaces and Data Types
b) Create a data object and name it CA_CheckAvailibility_DO.Drag and drop from the Palette Data Object from the Artifacts category. c) In the Data Type field in the Properties, enter DT_CA_startProcess urn:bit800:xx:com, to the data object, CA_CheckAvailibility_DO.
Figure 169: Data Object for the CheckAvailability Process
3. Create the trigger, CA_StartProcess_Trigger, configure it, and assign it to the CheckAvailibility process. a) In the [LocalDevelopment] bit800_xx/pm/Process Modeling /Process/Check Availability , in the properties of the CA_Start_S, go to the Event Trigger tab b) From the drop down of Trigger, choose New c) Enter the name, CA_StartProcess_Trigger, and choose Next. In the next step choose the interface, CA _startProcess and then choose Finish
Figure 170: Event Trigger for the CA_Start_S event
d) Create a 1:1 output mapping in the CA_Start_S event from CA_Start_SE/ MT_CA_startProcess to CA_CheckAvailibility_DO. In the Output Mapping tab drag
Prohibida su reproducción 218
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
MT_CA_startProcess using the secondary button of the mouse and drop it over CA_CheckAvalability_DOand choose the Execute Default Matcher.
Figure 171: Output Mapping in the CA_Start_S event
e) Create a 1:1 input mapping in the CA_End_EE event from CA_CheckAvailibility_DO to CA_End_EE/ MT_CA_startProcess. In the Input Mapping tab drag CA_CheckAvailability_DO using the secondary button of the mouse and drop it over MT_CA_startProcessand choose the Execute Default Matcher.
Figure 172: Input Mapping in the CA_End_EE event
f) Create arrows using the flow objects. Use the speed buttons of the Ca_Start_SE create a connection to the Data Object and from the CA_CheckAvailability_DO to theCA_End_EE .
Figure 173: Data Flow
g) Choose Save. Create and Configure the Automatic Activity CA_Call_viaAEX_CatalogService_AA In this task, you will perform the following steps: ●
Import the CatalogService WSDL
●
Assign the service interfaces SI_CatalogService
●
Create a mapping 1. Import the CatalogService WSDL. a) Navigate to http://nwktdc00.wdf.sap.corp:50000/inspection.wsil. There you will find the service. b) To open the search screen, on our keyboard press Ctrl+F, and search for the SICatalogServiceImplBean. c) Copy the URL you find at the endpointURL element.
Prohibida su reproducción © Copyright. All rights reserved.
219
Unit 3: A BPMN Process
Note: Be careful, you will find a lot of entries. Choose the one in the picture below
Figure 174: SI_CatalogService endpoint URL
d) Open a browser and enter URL + ?wsdl.
Figure 175: WSDL URL
The concrete WSDL opens. Use File->Save As from the browser in your Documents. Make sure you change the extension to .wsdl. e) In the Process Development perspective, choose [LocalDevelopment] bit800_xx/pm/ Process Modeling /Service Interfaces right click and choose Import WSDL …. f) In the wizard, on the WSDL Import screen, choose Remote Location /File System.
Figure 176: Importing a WSDL based in URL
g) To open the next WSDL URL Access screen, choose Next. h) Paste the WSDL URL. Example: http://nwktdc00.wdf.sap.corp:50000/SI_CatalogService_Service/ SICatalogServiceImplBean?wsdl.
Prohibida su reproducción 220
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
Figure 177: WSDL URL Access
i) To open the next Service Reference screen, choose Next. j) Create a new service reference, set Create New and in the Name field, enter Services.
Figure 178: Creation of Services Service Reference
k) To close the Import wizard, choose Finish. . The result looks as follows:
Figure 179: Imported Service Interfaces
l) Choose [LocalDevelopment] bit800_xx/pm/Connectivity/Service References. The result looks as follows:
Prohibida su reproducción © Copyright. All rights reserved.
221
Unit 3: A BPMN Process
Figure 180: Services References
2. Assign the service interfaces, SI_CatalogService to CA_Call_viaAEX_CatalogService_AA automated activity a) Open your CheckAvailability Process. On the Properties tab, of the automated activity CA_Call_viaAEX_CatalogService_AA → Properties → Interface, choose the service interface, SI_CatalogService.
Figure 181: Assign Service Interface to Automated Activity
b) Save 3. Create a mapping. Note: The procedure was explained in an earlier exercise. This is a shortened description. Remember to use the secondary button in the mouse and choose Execute Default Matcher. a) Create a 1:1 input mapping of the CA_Call_viaAEX_CatalogService_AA automated activity from CA_CheckAvailibility_DO to MT_CatalogService_IN.
Prohibida su reproducción 222
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
Figure 182: Input Mapping of the CA_Call_viaAEX_CatalogService_AA Automated Activity
b) Create a 1:1 output mapping of the CA_Call_viaAEX_CatalogService_AA automated activityfrom MT_CatalogService_OUT to CA_CheckAvailibility_DO.
Figure 183: Output Mapping in the CA_Call_viaAEX_CatalogService_AA Automated Activity
c) Create arrows using the flow objects. Using the speed buttons create connection as displayed in the next figure.
Figure 184: Data Flow in the CheckAvailability Process
d) Save
Configure the Service Consumer Over the Service Reference Services in NWA In this task, you will perform the following steps: ●
Check the service reference
●
Build and deploy the development component [LocalDevelopment] bit800_xx/pm]
●
Configure the service reference services in NWA
Prohibida su reproducción © Copyright. All rights reserved.
223
Unit 3: A BPMN Process
1. Check the service reference. a) In the Process Development perspective, under [LocalDevelopment] bit800_xx/pm/ Connectivity/ , choose Service References. b) On the Detail screen of Service References you should see the following entries:
Figure 185: Services References
2. Build and deploy the development component, [LocalDevelopment] bit800_xx/pm]. Note: The procedure was explained in an earlier exercise. This is a shortened description. a) In the Process Development perspective, build the bit800_xx/pm Development Component. Right Click and choose Development Component → Build
Figure 186: Result of the Build
b) Deploy bit800_xx/pm Development Component, on the JEE Server, in the Process Development perspective. Right Click and choose Development Component → Deploy
Figure 187: Deploy Result
Prohibida su reproducción 224
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
c) Optionally: to check if the development component deployed, switch to the Deployment Perspective.
Figure 188: Deployment Perspective
3. Configure the service reference, Services, in NWA. a) On http://nwktdc00.wdf.sap.corp:50000/nwa, below SOA → Application and Scenario Communication → Application Communication, search for bit800_xx. b) To see if an entry with the service reference name, Services is available, with a green processing status, check the Consumed Service Groups tab. c) Select the Services row and choose Edit , in the Provider System column choose NWK on nwktdc00.wdf.sap.corp from the drop down menu. Choose Save and Refresh the table. Status should change to Processed with a green light as displayed in the figure below.
Figure 189: Consumed Service Groups for your sap.education.com/bit800_xx/pm
Configure the Service Provider CA_startProcess_Trigger and PO_startProcess Trigger 1. Configure the service provider, CA_startProcess_Trigger and PO_startProcess trigger. a) On http://nwktdc00.wdf.sap.corp:50000/nwa, under SOA → Application and Scenario Communication → Application Communication, search for bit800_xx.
Prohibida su reproducción © Copyright. All rights reserved.
225
Unit 3: A BPMN Process
b) Below the Provided Services tab, the following service interfaces should be listed: ●
CA_startProcess
●
PO_startProcess
c) To assign a profile to both service interfaces, choose Edit → Assign Profile → SAP_DEFAULT_PROFILE → OK.
Figure 190: Assign SAP_DEFAULT_PROFILE to Service Interfaces
d) Choose OK. e) Choose Refresh several times, until the processing state turns green.
Figure 191: Provider Interfaces Result
Test the CheckAvailability Process with WS Navigator 1. Test the CheckAvailability process with WS Navigator. The process flow looks like:
Prohibida su reproducción 226
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
Figure 192: CheckAvailability Process Flow
a) Start the WSNavigators with http://nwktdc00.wdf.sap.corp:50000/wsnavigator. b) Flag the Provider System field and search for CA_StartProcess. Choose Search.
Figure 193: WSNavigator
c) Test case: Article number is not listed in the catalog (cannot be ordered). Enter the data displayed in the next figure and execute. Remember to enter the Invocation Parameter
Prohibida su reproducción © Copyright. All rights reserved.
227
Unit 3: A BPMN Process
Figure 194: Tes Case: Article Number Is Not Listed
In the isSparePartAvailible field, we expect: false (True is not flagged). In the alternativeSparePart: field, we expect 9999.
Note: If the Tree view is not visible, choose XML Content.
Figure 195: Result
d) Test case: Article number is listed in the catalog (can be ordered). Enter the data below and execute. Remember to enter the Invocation Parameter.
Prohibida su reproducción 228
© Copyright. All rights reserved.
Lesson: Calling a Web Service from an Automated Activity
Figure 196: Test Case: Article Number Is Listed In The Catalog
In the isSparePartAvailible field, we expect: true (True is flagged). In the alternativeSparePart: field, we expect 600.
Note: If the Tree view is not visible, choose XML Content.
Figure 197: Result
Prohibida su reproducción © Copyright. All rights reserved.
229
Unit 3: A BPMN Process
LESSON SUMMARY You should now be able to: ●
Call a web service from an automated activity
Prohibida su reproducción 230
© Copyright. All rights reserved.
Unit 3
229
Learning Assessment
1. What is an intermediate event message used for? Choose the correct answer. X
A Sending out notifications
X
B Triggering a start event
X
C Placing a pause in a business process
X
D Handling message exceptions
2. A Web Service Description Language (WSDL) file is an XML file used to describe service interfaces. Determine whether this statement is true or false. X
True
X
False
3. Which of the following basic atomic data types is not provided in the XML schema for context objects in a BPM process? Choose the correct answer. X
A xs:string
X
B xs:decimal
X
C xs:join
X
D xs:float
4. A data type can only be created in the Enterprise Service Repository perspective. Determine whether this statement is true or false. X
True
X
False
Prohibida su reproducción © Copyright. All rights reserved.
231
Unit 3: Learning Assessment
5. Which process components can task owners be assigned to? Choose the correct answers. X
A Automated activities
X
B Human activities
X
C Lanes
X
D Tasks
6. What is a referenced subprocess used for? Choose the correct answer. X
A To reference another dependent process by the parent process
X
B To reference another independent process by the parent process
X
C To reference another dependent process by a child process
X
D To reference another independent process by a child process
7. What is a mapping activity used for? Choose the correct answer. X
A To find the active event in the business process
X
B To map input and output data
X
C To convert complex data into simple data
X
D To provide instructions on how to complete an activity
Prohibida su reproducción 232
© Copyright. All rights reserved.
Unit 3
231
Learning Assessment - Answers
1. What is an intermediate event message used for? Choose the correct answer. X
A Sending out notifications
X
B Triggering a start event
X
C Placing a pause in a business process
X
D Handling message exceptions
2. A Web Service Description Language (WSDL) file is an XML file used to describe service interfaces. Determine whether this statement is true or false. X
True
X
False
3. Which of the following basic atomic data types is not provided in the XML schema for context objects in a BPM process? Choose the correct answer. X
A xs:string
X
B xs:decimal
X
C xs:join
X
D xs:float
Prohibida su reproducción © Copyright. All rights reserved.
233
Unit 3: Learning Assessment - Answers
4. A data type can only be created in the Enterprise Service Repository perspective. Determine whether this statement is true or false. X
True
X
False
5. Which process components can task owners be assigned to? Choose the correct answers. X
A Automated activities
X
B Human activities
X
C Lanes
X
D Tasks
6. What is a referenced subprocess used for? Choose the correct answer. X
A To reference another dependent process by the parent process
X
B To reference another independent process by the parent process
X
C To reference another dependent process by a child process
X
D To reference another independent process by a child process
7. What is a mapping activity used for? Choose the correct answer. X
A To find the active event in the business process
X
B To map input and output data
X
C To convert complex data into simple data
X
D To provide instructions on how to complete an activity
Prohibida su reproducción 234
© Copyright. All rights reserved.
UNIT 4
Connectivity with the Advanced Adapter Engine Extended (AEX)
Lesson 1 Configuring Scenarios in the ESR Browser
236
Lesson 2 Explaining the Communication between the BPM and AEX
246
Lesson 3 Explaining the SAP Process Integration Designer Exercise 9: Create the Integration iFlows of CallCatalogService_## SP03
256 259
Lesson 4 Monitoring with Process Integration Monitoring (PIMON) Exercise 10: Assign the CheckAvailability Process with the iFlow CallCatalogservice_##SP03
276 281
Lesson 5 Testing a Process with AEX
301
UNIT OBJECTIVES ●
Explain the business case AEX
●
Explain the communication between BPM and AEX
●
Explain the SAP Process Integration Designer
●
Monitor Messages with Process Integration Monitoring (PIMON)
●
Test the procurement process with AEX
Prohibida su reproducción © Copyright. All rights reserved.
235
Unit 4 Lesson 1 234
Configuring Scenarios in the ESR Browser
LESSON OVERVIEW This lesson shows you how to configure scenarios in the ESR browser. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain the business case AEX
The ESR Browser In order to develop a Java proxy, we will need to use SAP NetWeaver Developer Studio (NWDS) as the IDE. One of the first steps is to configure your SAP NetWeaver Developer Studio environment as follows: ●
●
SAP Application Server for Java (AS Java). This configuration points to the SAP Process Orchestration (PO) server. Enterprise Service Browser Points to the ES Repository.
While implementing a Java proxy, you will need to switch SAP NWDS to the Development Infrastructure perspective. In this perspective, you will need to create a number of development components (DCs).
ESR Browser Versus ESR Builder Enterprise Services Repository The role of the Enterprise Services Repository (which we refer to as the ES Repository) within the context of an enterprise service bus (ESB) such as SAP PO, is to maintain specific operational metadata about the services that SAP PO provides and consumes. The ES Repository provides developers with a complete modeling environment for creating SOA style enterprise services. The ES Repository supports the design time in SAP PO and stores metadata related to the services’ versions, namespaces, deployment status, access and security rules, mapping and transformations, service operations, data and message types, and external message definitions, such as Web service (WSDL) and XML definitions (XSD).
Prohibida su reproducción 236
© Copyright. All rights reserved.
Lesson: Configuring Scenarios in the ESR Browser
Figure 198: ES Repository
The ES Repository is also used to import and maintain SAP standard content (ESR content), provided as part of different SAP (industry) solutions or by certified third-party software suppliers. The ESR content is also called business content and can be downloaded via the SAP Service Marketplace or via the ES Workplace. You will need proper SAP Service Marketplace credentials in order to download any content. The business content imported into the ES Repository normally contains repository objects, such as service interfaces and messages types, but it can also offer additional content, such as mappings, integration processes, and so on. The ES Repository may also use external sources from other third-party repositories (Services Registry needed), such as existing UDDI directories and Active Directory. Understanding the ES Repository One of the challenges we commonly encounter as SAP integration specialists is how to explain what the roles and functions of the different products contained within the SAP NetWeaver suite to nontechnical and business folks. After many years of dealing with this challenge, we have found a simple yet effective way of achieving that goal by using analogies from our daily lives. Explaining the Enterprise Services Builder (ES Builder) is no exception. Here’s how it works: Try to picture a large, blue, plastic bucket filled with lots of building pieces, all of them in different colors, shapes, and sizes. Now, imagine that you are building an airplane or any other object you would like to build with building bricks. When you have that picture and the process of designing and assembling new objects using different building blocks clear in your mind, you are more than halfway to understanding what the function and role of the ES Repository really is. The building bricks in the bucket are similar to the ES Repository. When you start building your new creation by searching, selecting, and assembling different building bricks, it is similar to using the ES Repository Builder to build new service interfaces by creating or reusing repository objects stored in it. Local or Central ES Repository In SAP PO, you have the option to configure one local ES Repository per SAP PI instance (which is the default setup) or to have a central ES Repository connected to all SAP PI systems that are available in your system landscape. We discuss these options in the following subsections. Local ES Repository per SAP PO Instance
Prohibida su reproducción © Copyright. All rights reserved.
237
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
With this option, each SAP PI instance within the system landscape has its own dedicated ES Repository directly connected to the “local” Integration Directory and runtime engine (AEX). The advantage of this setup is in its simplicity and that there is less initial installation effort required from SAP Basis team. Central ES Repository for All PI Instances In this setup, a single ES Repository is hosted on the central SAP PO instance. The Integration Directory and the runtime engine (AEX) of the local SAP PO instance are directly connected to the central ES Repository. The advantage of this architecture is that you can minimize total cost of ownership (TCO), because the number of ES Repositories is reduced. At the same time, you save time by removing the need for transport scenarios and administration tasks. Enterprise Services Builder We use the ES Builder to access and create content for the ES Repository. It can also be seen as the implementation of the ES Repository and a core component of SAP PO. The ES Builder is a development tool with which you design and develop logical building blocks to support integration applications that follow SOA principles. Object types created in the ES Builder are stored and maintained in the ES Repository.
Stateless and Stateful Patterns Enterprise Integration Patterns (EIP) help in solving recurring problems faced in the integration of enterprise applications. Most patterns consist of a mix of SAP PI Integration Flow (iFlow) configurations and SAP Business Process Management (BPM) process implementations. That is, they rely on the power of SAP Process Orchestration, which combines both of these technologies. The figure, Patterns by Category, shows all the patterns offered by SAP BPM.
Figure 199: Patterns by Category
Patterns can be differentiated between stateful and stateless patterns, as shown in the figure, Pattern States and Availability.
Prohibida su reproducción 238
© Copyright. All rights reserved.
Lesson: Configuring Scenarios in the ESR Browser
Figure 200: Pattern States and Availability
Stateless patterns can be implemented either as Integration Flows on PI (AEX) or as processes in BPM. As a general guideline, stateless patterns are best implemented as Integration Flows on AEX. This applies especially if the integration process consists of a single pattern only and no additional business logic is executed in the Process Orchestration system (that is, a pure ESB scenario). In such cases, the overhead of starting, executing, and completing a BPM process instance is typically very prohibitive. If the pattern is part of a larger business process involving multiple integration or workflow patterns, it could be implemented within SAP BPM, as the overhead costs become less relevant in the overall scenario.
Note: All patterns are described in the help portal at the following url: http:// scn.sap.com/community/process-orchestration/blog/2012/09/15/sapprocess-orchestration-integration-patterns. Connectivity PI and SAP BPM SAP BPM now supports the XI 3.0 protocol for service endpoints (configurable on the service reference). This means that messages can be sent reliably between PI to BPM.
Figure 201: Inbound Communication from SAP PI to SAP BPM
Prohibida su reproducción © Copyright. All rights reserved.
239
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
The message received by PI will be processed by the Java Proxy Runtime (JPR), which delivers it via the Web Service Runtime (WSRT) to BPM. The message could start new process instances or trigger intermediate message events in BPM. The message will be discarded if it does not match either a process start interface or an intermediate trigger.
Figure 202: Outbound Communication from SAP BPM to SAP PI
Outbound communication (automated activity triggering a message) happens in a similar way. Here the sender component name can be specified in the service configuration in BPM.
Conditional Start Patterns A process uses the Conditional Start feature if the same message trigger is used in the start event and in at least one intermediate message event of the process. In BPM, a Web service endpoint is represented by a reusable message trigger. The start condition and the correlation condition can be independently defined. Usually, the correlation condition is a more specific variant of the start condition. In the conditional start use case, a new process is started only if there are no running processes that match the correlation condition of the incoming message. The start event is not directly triggered by the message. First, the matching evaluation is done and if there is no running process, the process start for the active version is initiated. That means, all messages that come in at any point in time will then be received by exactly one process instance. For a running instance of a conditional start process, messages with matching correlation criteria will be received by the intermediate message event. If there is no running process instance with matching correlation criteria, the message will be received by the start event, given the start condition is satisfied, thereby spawning a new process instance.
Content Enricher Patterns A content enricher pattern is a message transformation pattern. It is a stateless pattern and is available with NetWeaver 7.3, SP4. Enterprise Integration Patterns (EIP) are design patterns that help in solving recurring problems faced in the integration of enterprise applications. One of the message transformation patterns is needed if the target system requires data fields that the originating system cannot supply. In numerous integration scenarios, for instance, System B needs additional data that System A has not provided. Such instances are tailor made for the Content Enricher pattern. It has the ability to look up missing information or compute it from the available data. The Content Enricher allows you to communicate with another system if the message originator does not have all the required data items available. Example 1 — Service Technicians As a service technician, Kevin's daily job is to visit customers for servicing and repairs of appliances. His supervisor Emil wants a summary of the tasks each of his technicians worked on during the day. For each of his technicians, Emil gets a daily report of customers visited and tasks undertaken. He would like to get better insight into the kinds of service calls conducted by his technicians than what is already provided in the daily report.
Prohibida su reproducción 240
© Copyright. All rights reserved.
Lesson: Configuring Scenarios in the ESR Browser
Emil wants a list of all visited customers (including name, address, phone number, issue or regular service, and service date and time) served by Kevin on that particular day. Emil will input Kevin’s employee ID to the process and the requisite details would be retrieved from the system.
Figure 203: Illustration of the Content Enricher Pattern
Example 2 — Integration Scenario The Content Enricher helps gather additional information from a system using the available information. In this example, Kevin enters his direct report's ID into Business System S1. A generated message in SAP Process Integration (PI) (AEX) is delivered to SAP BPM (Inbound). Web service calls in SAP BPM aid in looking up additional information based on the ID and the enriched message from SAP BPM (Outbound) is relayed through Integration Configuration 2, eventually providing Business System S1 with the requested information.
Figure 204: An Integration Scenario for the Content Enricher Pattern
Prohibida su reproducción © Copyright. All rights reserved.
241
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
As shown in the figure, An Integration Scenario for the Content Enricher Pattern, the following integration scenarios exist: ●
●
Integration Configuration1 (ICO1) – A message flow can be triggered in Business System S1 that flows through SAP PI (AEX) to SAP NetWeaver BPM. Integration Configuration2 (ICO2) - To send the enriched content back to SAP PI (AEX) from SAP BPM and store it as a file in your specified folder using File adapter.
Note: The message flow from Business System S1 could also be simulated by using the Web Services Navigator. Example 3 – Process Modeling in SAP BPM For creating the Content Enricher pattern in NetWeaver Developer Studio, the following prerequisites apply: 1. The service interfaces to be used in the process model–starting interface and automated activity–should be created first and then imported from the SAP PI ES Repository. 2. For testing the BPM Process from the BPM Process repository, the UME action SAP_BPM_TRIGGER_EVENT should be assigned to the specific user role.
Figure 205: A Content Enricher Scenario Modeled in SAP BPM
The steps for modeling the process are enumerated as follows: 1. The pattern starts with a service interface. 2. An Employee ID is provided as input to the system. 3. A Web service call retrieves the order list (List of Order IDs). 4. The order details are then retrieved for each Order ID using Web service calls.
Prohibida su reproducción 242
© Copyright. All rights reserved.
Lesson: Configuring Scenarios in the ESR Browser
5. These details are consolidated and a summary (the enriched content) is returned to the sender system.
Note: Use the ‘XI’ service reference instead of ‘WS’ in the configuration settings of the automated activity. The sender component also needs to be specified. Use the SAP PI Integration Flow Designer to create the configuration objects in SAP PI.
Aggregator Patterns The aggregator pattern is a stateful filter that is used to analyze and store input messages until a complete set of (related) messages are received. It can then produce a single refined message from the messages that were received. It is used in cases where subsequent message processing is contingent upon the successful processing of multiple input messages. Dealing with asynchronous messaging systems presents challenges like correlating the messages, particularly since the incoming messages may arrive in any order. While some of the other routing patterns can be stateless, the aggregator needs to store each incoming message until the set of messages is complete for further processing. The aggregation is limited to a completion condition, either time bound or quantity bound. Example 1 One division of the company manufactures stationery supplies like colored pencils and graphite writing pencils. Graphite pencils are manufactured and placed into bins on a conveyor belt so that they can be packed by a machine. Each package contains 10 graphite writing pencils. The company would like to increase throughput without compromising on quality.
Figure 206: Illustration of the Aggregator Pattern
The aggregation is not dependent on the order of messages received, which means the Aggregator may receive related messages at any time (within a reasonable limit) and in any order. Each time the Aggregator receives a new message, it should check if the message is part of
Prohibida su reproducción © Copyright. All rights reserved.
243
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
an existing aggregate and create a new aggregate if a related aggregate doesn't exist, and then add the message to the appropriate aggregate. In our example for the graphite writing pencils, we need to aggregate a set of 10 pencils. The pencils are collected into the next bin and once the count reaches 10, the bin is conveyed to the machine that packages them. Example 2 — Integration Scenario
Figure 207: Integration Scenario for the Aggregator Pattern
This example deals with these three integration configurations: ●
●
●
Integration Configuration1 (ICO1) – A message flow can be triggered in Business System S1 that flows through SAP PI (AEX) to SAP BPM. Integration Configuration2 (ICO2) – For triggering intermediate message(s) that flow to SAP BPM via SAP PI. Integration Configuration3 (ICO3) – For sending the aggregation to SAP PI (AEX) from SAP BPM using a File Adapter.
Note: The message flow from Business System S1 could also be simulated by using the Web Services Navigator. Example 3 – Process Modeling in SAP BPM The steps for modeling the process are enumerated as follows:
Prohibida su reproducción 244
© Copyright. All rights reserved.
Lesson: Configuring Scenarios in the ESR Browser
Figure 208: An Aggregator Scenario Modeled in SAP BPM
1. The pattern starts with a service interface with the message counter reset to zero. 2. As long as the counter is within defined bounds, incoming message(s) that match the correlation key are collected. 3. The message counter is incremented for each collected message (matched correlation key). 4. Once the counter has met the completion condition, all the collected messages are processed (aggregated) and this aggregation is sent to the receiver.
Note: Use the ‘XI’ service reference instead of ‘WS’ in the configuration settings of the automated activity. The sender component also needs to be specified. Use the SAP PI Integration Flow Designer to create the configuration objects in SAP PI.
LESSON SUMMARY You should now be able to: ●
Explain the business case AEX
Prohibida su reproducción © Copyright. All rights reserved.
245
Unit 4 Lesson 2 244
Explaining the Communication between the BPM and AEX LESSON OVERVIEW This lesson gives you an explanation of the communication between the BPM and AEX. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain the communication between BPM and AEX
Advanced Adapter Engine Extended (AEX) Process Orchestration Runtime Components ●
Business Process Management (BPM)
●
Business Rules Management (BRM)
●
Advanced Adapter Engine Extended (AEX)
●
J2EE application server
Prohibida su reproducción 246
© Copyright. All rights reserved.
Lesson: Explaining the Communication between the BPM and AEX
Figure 209: Runtime Components
All of the runtime components are optimized to cooperate and work together, for example, the transfer of messages from the XI message protocol between the BPM runtime and AEX. The Business Rules Management runtime works as a callable Web service outside of the Business Process Model and Notation (BPMN) process. All runtime components are installed on the same J2EE application server, minimizing efforts and costs. Advanced Adapter Engine Extended (AEX) The AEX is an installation option of SAP Process Integration. AEX installation is performed exclusively on the Java stack of a SAP NetWeaver Application Server, which is different from the traditional installation on a dual stack (ABAP/Java).
Prohibida su reproducción © Copyright. All rights reserved.
247
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 210: Advanced Adapter Engine Extended
The AEX is used as an architectural layer to the legacy systems. All communications to and from the BPMN process run through the AEX, allowing for flexibility when connecting different end systems. Support for QoS EO and EOIO offers added value in the interaction of components. The AEX runs on the same J2AA application server (Java 2 platform, Enterprise Edition) as the BPM and BRM runtimes. Configuration Message configuration for the AEX is performed at http://:/pimon. This includes the configuration of background processes, archiving, and custom alerts. Application configuration for the AEX is performed through the AS Java system configuration. Additional settings are configured at http://:/nwa. Survey Monitoring A summary of processed XI messages is available at http://:/nwa, under Availability and Performance → Process Monitoring. This monitor is a part of the PI monitoring tools, accessible at http://:/piMon. Additional monitors to view the state of the AEX, communication channels, and so on, can be found at http://:/piMon, under Monitoring. Business Process Management Runtime (BPM) The BPM processes the formally created BPMN 2.0 model. The BPM runtime is implemented in Java and sends and receives messages. In addition, the BPM runtime takes care of process instances, correlations, mappings and other details.
Prohibida su reproducción 248
© Copyright. All rights reserved.
Lesson: Explaining the Communication between the BPM and AEX
The BPMN model must be deployed as an executable application on the installed J2EE application server. Configuration of additional applications on the J2EE server is carried out through AS Java system configuration at http://:/nwa, under Configuration. Business Rules Management (BRM) The BRM runtime works as a standalone Java application. Business rules are usually created in the Composite Designer perspective. Communication with the BRM runtime occurs through Web service communication. This setup allows the BRM runtime to be used by any application with existing business rules. The BRM runtime's management view allows you to alter business rules outside of the implementation by experienced business users to react quickly and flexibly to meet changing requirements. AS Java System A fully certified J2EE application server is an integral part of the SAP NetWeaver Application Server.
Figure 211: AS Java System Overview
J2EE Server Layers ●
The Java Enterprise runtime, containing low-level subsystems with functionalities such as class loading, cluster communication, and data management
●
AS Java system components, containing interfaces such as libraries and programming APIs
●
The application layer, containing the installed Java applications
Prohibida su reproducción © Copyright. All rights reserved.
249
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 212: SAP NetWeaver Administrator System Overview
The SAP NetWeaver Administrator contains a system overview with a status view at http:// :/nwa, under Availability Performance → System Overview.
AEX Configuration The SAP Management Console ( MC) is one of the tools used for administrating AS Java, and allows a central basic administration and monitoring of the AS Java. It allows task such as starting and stopping the application server. The operation and performance of the system and log files can also be monitored. The SAP MC allows the following by offering several monitors: ●
●
Monitor and control the SAP system and its Instances (start, stop, restart, and so on) Display SAP log and trace files, start profiles, Instance parameters, the Internet Communication Manager, queue statistics, and so on
●
Display and monitor Java processes
●
Display and monitor system alerts
●
●
●
View information such as sessions, caches, aliases, Enterprise JavaBeans sessions, and distant objects Display and monitor the Java Virtual Machine garbage collection and heap memory for the application server Start external tools (such as Telnet and Config Tool)
Prohibida su reproducción 250
© Copyright. All rights reserved.
Lesson: Explaining the Communication between the BPM and AEX
The SAP Management Console is launched through a URL that is created according to the standards found at: http:// : 5 <13> The actual URL will look similar to the following: http://nwktdc00.wdf.sap.corp:50013. The console launches automatically after being chosen (that is, a Java applet starts within the browser).
Figure 213: SAP Management Console
Eclipse-based Management Console The SAP NetWeaver Developer Studio contains an Eclipse-based Management Console used to perform tasks such as monitoring the Internet Communications Manager. In such a case, you can view the application protocols and the ports through which they are accessible. This is analogous to the transaction /nSMICM in the AS ABAP.
Prohibida su reproducción © Copyright. All rights reserved.
251
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 214: Eclipse-Based Management Console
Patterns Patterns describe solutions to recurring business and technical requirements. There are stateful patterns that are implemented as BPMN processes, as well as stateless patterns that are implemented in the AEX. Many patterns are contained on the Developer Network at the following URL: http:// scn.sap.com. A detailed description of some 40 patterns is given by Sören Balko. In another document, the Claim Check pattern is described (see the figure, Patterns in the Directory Structure).
Figure 215: Patterns in the Directory Structure
Prohibida su reproducción 252
© Copyright. All rights reserved.
Lesson: Explaining the Communication between the BPM and AEX
SAP offers numerous patterns as BPMN 2.0 files packed in a .sca file. This file can be downloaded and imported as a product. These examples are not executable but are used as a template for your own implementations. The following table gives an overview of available patterns: Table 5: Patterns Stateful Patterns
Available from this Release
Aggregator
SAP NetWeaver 7.3 EhP1 SP5
Claim Check
SAP NetWeaver 7.3 EhP1 SP5
Composed Message Processor
SAP NetWeaver 7.3 EhP1 SP5
Scatter-Gather
SAP NetWeaver 7.3 EhP1 SP5
Sync/Async Bridge
SAP NetWeaver 7.3 EhP1 SP4
Stateless Patterns Content Enricher (w/BPM)
SAP NetWeaver 7.3 EhP1 SP4
Splitter (w/BPM)
SAP NetWeaver 7.3 EhP1 SP4
Async/Sync Bridge
SAP NetWeaver 7.3 EhP1 SP4
Pure AEX implementation of these stateless patterns: ●
Content Based Router
●
Recipient List
●
Dynamic Router
●
Splitter
●
Message Filter
●
Content Enricher
●
Content Filter
●
Message Translator
Additional information can be found at: http://scn.sap.com/community/processorchestration/blog/2012/09/15/sap-process-orchestration-integrationpatterns
Advantages of XI Message Protocol Versus SOAP Message Protocol The XI Message protocol is based on the SOAP standard.
Prohibida su reproducción © Copyright. All rights reserved.
253
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
There are important differences between the XI Message protocol and the SOAP Message protocol: ●
Header In SOAP, the header element is optional, but in the XI Message protocol it’s mandatory.
●
Body In SOAP, the body contains the message payload (the real XML message), but in the XI Message protocol the body only contains a reference to the actual payload.
●
Attachment In SOAP, the attachments contains attachment files, but in the XI Message protocol the message payload (the real XML message) is placed as the first attachment. Other attachment files are placed in the second attachment position.
Figure 216: Composition of the XI Message Protocol
The XI 3.0 protocol is an SAP proprietary message protocol that is based on SOAP and enhanced with extra information, such as routing and monitoring. Most importantly, the XI 3.0 message protocol supports reliable messaging. The XI 3.0 message protocol is used in the following scenarios: ●
●
Calling a service provided by the AEX from an SAP BPM process. In this case, the AEX plays a mediation role. It goes without saying that the service that is being called from the AEX can point to any system (SAP backend or legacy). Calling the SAP BPM process. The SAP BPM process exposes an XI 3.0 endpoint that can be consumed from the AEX.
The XI Message format can be generated and used by both SAP ABAP (SAP backend) and Javabased systems. This message format provides a huge benefit, because the same message format is used everywhere in a consistent manner.
Prohibida su reproducción 254
© Copyright. All rights reserved.
Lesson: Explaining the Communication between the BPM and AEX
The Endpoint URL in the SOAP Sender Adapter The Services Registry (SR) contains vital details about the functionality offered by services available in a particular SOA landscape. You can query the SR to retrieve the Web Services Description Language (WSDL) of registered services and their operations and endpoints. The SOA configuration of your process will enable you to indicate the actual endpoint of the services to be consumed by your SAP BPM process. ●
Choose http:// :/nwa/appcommunication. From this page, you can configure the endpoints of the services used in an SAP BPM DC.
Note: The ability of SAP PO to configure different endpoints after deployment is a very useful feature that provides flexibility. If the service provider moves or changes its URL, you only need to reconfigure the service provider, and then you’re ready to proceed. You do not need to change or redeploy the SAP BPM development component. Using XI 3.0 message protocol, is used for Calling the SAP BPM process. The SAP BPM process exposes an XI 3.0 endpoint that can be consumed from the AEX. 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. The WSDL URL can be retrieved from the Endpoint Name field. The endpoint name can be, for example, http:// :/nwa/appcommunication. LESSON SUMMARY You should now be able to: ●
Explain the communication between BPM and AEX
Prohibida su reproducción © Copyright. All rights reserved.
255
Unit 4 Lesson 3 254
Explaining the SAP Process Integration Designer
LESSON OVERVIEW This lesson gives you an explanation of the SAP Process Integration Designer. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain the SAP Process Integration Designer
The SAP Process Integration Designer SAP NetWeaver Developer Studio is a client-side tool that must be set up with server connections in order to create and deploy iFlows, as well as other necessary design objects and related artifacts. The essential activities to be performed include connecting the SAP Process Integration (PI) Tools configuration to the SAP Process Orchestration (PO) server and setting up the Web service connection to the Enterprise Services Repository (ES Repository). SAP PI Tools Configuration The SAP PI Tools configuration provides the connectivity necessary with the Application Server for Java (AS Java) for creating, configuring, and deploying iFlows, and repository objects. When connected to the AS Java, the following four perspectives exist, via which the different development activities are performed: ●
ES Repository Perspective This perspective allows you to create repository related objects, such as inter- face objects, mapping objects, and namespaces. It supports the import of software component versions (SWCVs) that have been created in the SLD. Most functions that could be performed by the Enterprise Service Builder are supported.
●
SAP PI Administration Perspective Two types of objects can be created from this perspective: iFlows and communication components (systems). This same perspective is used to deploy iFlows after they have been created.
●
SAP PI Runtime Perspective This perspective provides a detailed overview of all runtime-related activities for iFlows. In addition, this perspective allows the status of each iFlow to be retrieved and monitored.
●
SAP PI Designer Perspective
Prohibida su reproducción 256
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
This perspective makes it possible to work with the repository and directory objectives concurrently. When in this perspective, you can switch to the PI Explorer tab to create iFlows or switch to the Enterprise Service Browser tab to create repository objects.
Stateless Pattern for iFlows Integration specialists use integration patterns as design and implementation guides; these patterns help classify and develop integration solutions. Integration patterns are very popular among integration specialists and are widely used by various platforms. There exist different integration patterns that support various business processes, and iFlows support a number of standard integration patterns by default. It is also possible to create your own user-defined template that can be reused. The following custom enterprise integration patterns are available in SAP NetWeaver Developer Studio for creating iFlows: ●
Point-to-point A point-to-point channel ensures that messages are sent to one receiver only.
●
Recipient list A recipient list allows you to specify one or more recipients. This message router examines the incoming message and routes it to one or more different receiver channels specified on the recipient list.
●
Message translator A message translator converts the data structure of a component into another data structure to use in a different context.
●
Recipient list (dynamic conditions) A recipient with dynamic conditions uses a mapping program to dynamically determine a target receiver and routes the incoming messages to the identified receiver system.
Figure 217: Patterns for iFlow Supported by NWDS
Prohibida su reproducción © Copyright. All rights reserved.
257
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
The figure, Patterns for iFlow Supported by NWDS, displays a screenshot of the integration pattern options available in the SAP PI Designer perspective of the SAP NetWeaver Developer Studio (NWDS).
iFlows iFlows are the equivalent of the traditional Integration Configurations (ICOs) created in the Integration Builder tool of SAP PI or SAP PO. When an iFlow is created and deployed, an ICO is also automatically generated in SAP PI and SAP PO as one of the directory objects. This is because iFlows and ICOs share the same database. We already learned how to configure interfaces using the ICO, which can be built from the Integration Directory (Java Web Start or Swing client). The SAP NWDS tool is gaining popularity and becomes the tool of choice for performing various development tasks within the SAP NetWeaver platform. As a result, SAP has also made it possible to develop ICO like configurations from SAP NWDS. These configurations are known as Integration Flows (iFlows). iFlows are built on BPMN like artifacts. This type of artifact gives a good overview of systems and components involved in end-to-end messaging and connectivity. It also presents an insight into the architecture of the process flow. Even though they are developed from SAP NetWeaver Developer Studio, an iFlow plays the same role as an ICO, and invariably iFlows provide an alternative to ICOs. The use of SAP NetWeaver Developer Studio for designing, configuring, and deploying iFlows presents a unique and simplified way of working in the SAP PO platform. Enhanced capabilities of SAP NetWeaver Developer Studio (for example, as a unified IDE tool for designing, configuring, and deploying iFlows, SAP BPM, SAP BRM, EJBs and related projects) presents a new approach to working with composite services. SAP NWDS supports the creation of both SAP PO ES Repository and Integration Directory (ID) objects. These objects are used for end-to-end messaging via the middleware layer without the use of the Enterprise Service Builder and Integration Builder Java clients (swing GUI tools). The SAP NetWeaver Developer Studio was already used by you as the development tool for SAP BPM, SAP BRM, and many other SAP technologies.
Prohibida su reproducción 258
© Copyright. All rights reserved.
Unit 4 Exercise 9 257
Create the Integration iFlows of CallCatalogService_## SP03 Business Example This is the process flow in this exercise:
Figure 218: CallCatalogService_xx iFlow ●
A direct call of a Service from a BPM Process is not recommended. So, in this exercise we will call the Service by an iFlow. This is an “Integration centric stateless Process
●
From CA_Call_viaAEX_CatalogService_AA a request to the AEX is sent over a SOAP adapter
●
The Mesage is not mapped and will be directly sent by the SOAP adapter to the CatalogService
●
The complete call is synchronous
In this exercise, you will perform the following tasks: ●
Create the Design objects
●
Create the Communication profile for the Sender
●
Create the Communication profile for the Receiver
●
Create the iflow CallCatalogService_##
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Create the Design objects 1. Save the CatalogService WSDL in theFileSystem 2. Import of the saved CatalogService WSDL in the ESR as external definition this will be use to create the identical Service Interfaces SI_CallCatalogService_outb and SI_CallCatalogService_inb in the next task. 3. Create the outbound Service Interface SI_CallCatalogService_outb as external definition
Prohibida su reproducción © Copyright. All rights reserved.
259
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
4. Create inbound Service Interface SI_CallCatalogService_inb. Use the following data: Field
Value
Interface Operation Input Name
SICatalogServiceImplBean
Namespace
urn:bit800:xx:com
Message Name
MT_CatalogService_IN
Message Namespace
urn:bit800:services:com
Type
External Message
Interface Operation Output Name
SICatalogServiceImplBean
Namespace
urn:bit800:xx:com
Message Name
MT_CatalogService_OUT
Message Namespace
urn:bit800:services:com
Type
External Message
Create the Communication profile for the Sender 1. Create the Sender Business Component CA_Process_xx. 2. Create the SOAP – Sender Communication channel CC_SOAP_SENDER_xx. Use the following data: Field
Value
Direction
Sender
Adapter Type
SOAP
Message Protocol
XI 3.0
Create the Communication Profile for the Receiver 1. Create the Receiver Business Component CatalogService_xx 2. Create the SOAP – Receiver Communication channel CC_SOAP_RECEIVER_xx. Use the following data: Field
Value
Direction
Receiver
Adapter Type
SOAP
Message Protocol
SOAP 1.1
Adapter Specific
Prohibida su reproducción 260
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
Field
Value
Target URL
http://nwktdc00.wdf.sap.corp:50000/ SI_CatalogService_Service/SICatalogServiceImplBean
SOAPAction
SI_CatalogService
Create the iFlow CallCatalogService_xx In this task, the following process flow is used:
Figure 238: CallCatalogService_xx iFlow
1. Create the iflow CallCatalogService_xx. Use the following data: Field
Value
Name
CallCatalogService_xx
Select a pattern to create an integration flow
Point-to-Point Channel
Sender System Communication Component
CA_Process_XX
Type
Business Component
Interface
SI_CallCatalogeService_outb
Receiver System Communication Component
CatalogService_XX
Type
Business Component
Interface
SI_CallCatalogeService_inb from your own namespace
Prohibida su reproducción © Copyright. All rights reserved.
261
Unit 4 Solution 9 260
Create the Integration iFlows of CallCatalogService_## SP03 Business Example This is the process flow in this exercise:
Figure 218: CallCatalogService_xx iFlow ●
A direct call of a Service from a BPM Process is not recommended. So, in this exercise we will call the Service by an iFlow. This is an “Integration centric stateless Process
●
From CA_Call_viaAEX_CatalogService_AA a request to the AEX is sent over a SOAP adapter
●
The Mesage is not mapped and will be directly sent by the SOAP adapter to the CatalogService
●
The complete call is synchronous
In this exercise, you will perform the following tasks: ●
Create the Design objects
●
Create the Communication profile for the Sender
●
Create the Communication profile for the Receiver
●
Create the iflow CallCatalogService_##
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Create the Design objects 1. Save the CatalogService WSDL in theFileSystem a) Call http://nwktdc00.wdf.sap.corp:50000/inspection.wsil and search for Catalog. b) Copy the Endpoint URL and call the WSDL in theChrome Browser:
Prohibida su reproducción 262
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
●
●
Endpoint-URL + ?WSDL e.g.: http://nwktdc00.wdf.sap.corp:50000/SI_CatalogService_Service/ SICatalogServiceImplBean?wsdl
c) Store the WSDL under Documents/WSDL with Save as. Change the extension manually from XML to WSDL. The name should be: SICatalogServiceImplBean.wsdl
Figure 219: SICatalogServiceImplBean.wsdl
2. Import of the saved CatalogService WSDL in the ESR as external definition this will be use to create the identical Service Interfaces SI_CallCatalogService_outb and SI_CallCatalogService_inb in the next task. a) In the Enterprise Service Browser perspective navigate to your own namespace in SC_SELLSPAREPARTS_BIT800 1.0 of education.sap.com and choose External Definitions → External Definition → Import External Definitions to start the Import Wizard. b) In the Import Files window, choose Add and select the recently stored WSDL, SICatalogServiceImplBean.wsdl. Make sure the extension is .wsdl .
Figure 220: Import External Definitions
c) Choose Next twice. d) If necessary, assign a new Change List with a name of your choice, e.g. New ChangeList.
Prohibida su reproducción © Copyright. All rights reserved.
263
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 221: New Change List
e) Choose Finish to end the Wizard. f) As result, you see the imported Message Types
Figure 222: External Definitios — Result
3. Create the outbound Service Interface SI_CallCatalogService_outb as external definition a) In your own namespace, choose Service Interface —> New Service Interface to create a new Service Interface, name it SI_CallCatalogService_outb. Figure 223: Create the SI_CallCatalogService_outb Service Interface
b) Choose Finish, to navigate to the Service Interface Overview details screen c) In Service Interface Overview choose the Overview /Advanced tab. Enter the following: Field
Value
Category
Outbound
Interface Pattern
Stateless(XI30-Compatible)
Figure 224: Service Interface
d) In Service Interface Overview choose the Definition tab. Choose the Operation SI_CallCatalogService_outb. Change the value in the Type field to Synchronous. e) In the tree of the Service Interfaces, you will see an additional Output, to the Input.
Prohibida su reproducción 264
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
f) In Service Interface Definition choose the Definition Input tab. Choose Add Input Message. From the PopUp choose MT_CatalogService_IN in the namespace urn:bit800:xx:com. Figure 225: Service Interface Definition- Input Message
g) The following data is displayed: Field
Value
Name
SICatalogServiceImplBean
Namespace
urn:bit800:xx:com
Message Namespace
urn:bit800:services:com
h) In Service Interface Definition choose the Definition Output tab. Choose Output. Then in Details browse and chooseMT_CatalogService_OUT in the namespace urn:bit800:xx:com.
Figure 226: Service Interface Definition- Output Message
i) The following data is displayed: Field
Value
Name
SICatalogServiceImplBean
Namespace
urn:bit800:xx:com
Message Namespace
urn:bit800:services:com
j) Choose Save. k) The result:
Prohibida su reproducción © Copyright. All rights reserved.
265
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 227: Outbound Service Interface — Result
4. Create inbound Service Interface SI_CallCatalogService_inb. Use the following data: Field
Value
Interface Operation Input Name
SICatalogServiceImplBean
Namespace
urn:bit800:xx:com
Message Name
MT_CatalogService_IN
Message Namespace
urn:bit800:services:com
Type
External Message
Interface Operation Output Name
SICatalogServiceImplBean
Namespace
urn:bit800:xx:com
Message Name
MT_CatalogService_OUT
Message Namespace
urn:bit800:services:com
Type
External Message
a) You will assign the same Input und Output Messages as in the task above. b) Choose Service Interface Definition —> Service Interface Operation Input —> Details and enter the data from the table above under the Interface Operation Input section. c) Choose Service Interface Definition —> Service Interface Operation Output —> Details and enter the data from the table above under the Interface Operation Output section. d) Perform the following edits:
Prohibida su reproducción 266
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
Field/Path
Value
Service Interface Overview —>Advanced — Inbound >Category Service Interface Overview —>Advanced — Stateless (XI30-Compatible) >Interface Pattern Service Interface Definition —> Mark Serv- Synchronus ice Interface Operation —> Details —> Type e) The result: Figure 228: Inbound Service Interface — Result
f) Choose Save. g) If My Change List view is not visible, choose Window → Show View → My Change List . Right-click on your change list and choose Activate. Create the Communication profile for the Sender 1. Create the Sender Business Component CA_Process_xx. a) Choose the SAP Process Integrations Designer perspective. b) Choose Process Integration → Connect and enter nwk to link to the NWK.
Figure 229: Connect to NWK
c) Log on with the credentials Adaministratorxx and the password, which you get from your trainer. d) Choose PI Explorer → Systems → New Business Component to create a new BC,name it: CA_Process_xx. e) Choose Business Component → Sender Interfaces → Add to add the service interface SI_CallCatalogService_outb urn:bit800:xx:com as sender. The Service Interface is unique, because it is assigned to the group specific namespace.
Prohibida su reproducción © Copyright. All rights reserved.
267
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 230: Add Service Interface to CA_Proces_xx Business Component
f) Choose OK to finalize the assignment. g) Choose Refresh if you don’t see it. 2. Create the SOAP – Sender Communication channel CC_SOAP_SENDER_xx. Use the following data: Field
Value
Direction
Sender
Adapter Type
SOAP
Message Protocol
XI 3.0
a) Choose PI Explorer → CA_Process_xx → New Channel to start the wizard. b) In the next screen, enter CC_SOAP_SENDER_xx as Channel Name. c) Choose Finish. In the next screen, enter the data from the table above.
Figure 231: Communication Channel CC_SOAP_SENDER_xx
d) Don`t change other settings. e) Choose Save, then choose Activate. f) The result:
Figure 232: CC_SOAP_SENDER_xx
g) Right click over the newly create communication channel CC_SOAP_SENDER_xx and Choose Activate. Only the Communication channel has to be activated, not the Business Component Create the Communication Profile for the Receiver
Prohibida su reproducción 268
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
1. Create the Receiver Business Component CatalogService_xx a) Switch to the SAP Process Integrations Designer perspective. b) Choose Process Integration → Connect and enter nwk to link to the NWK.
Figure 233: Connect to NWK
c) Log on with the credentials Administratorxx and the password, which you get from your trainer. d) Choose PI Explorer → Systems → New Business Component to create a new BC, name it: CatalogService_xx . e) Choose Business Component → Receiver Interfaces → Add to add the service interface SI_CallCatalogService_inb urn:bit800:xx:com as sender. The Service Interface is unique, because it is assigned to the group specific namespace.
Figure 234: CatalogService_xx Business Component
f) Choose OK to finalize the assignment. 2. Create the SOAP – Receiver Communication channel CC_SOAP_RECEIVER_xx. Use the following data: Field
Value
Direction
Receiver
Adapter Type
SOAP
Message Protocol
SOAP 1.1
Adapter Specific Target URL
http://nwktdc00.wdf.sap.corp:50000/ SI_CatalogService_Service/SICatalogServiceImplBean
Prohibida su reproducción © Copyright. All rights reserved.
269
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Field
Value
SOAPAction
SI_CatalogService
a) Choose PI Explorer → CatalogService_xx → New Channel to start the wizard. b) In the next screen, enter CC_SOAP_Receiver_xx as Channel Name. c) Choose Finish. In the next screen, enter the data from the table above.
Figure 235: CC_SOAP_Receiver_xx Communication Channel
d) Under Adapter-Specific enter the data from the table above. e) Log on with the credentials Administratorxx and the password, which you get from your trainer. f) The result in the SOAP settings
Figure 236: CC_SOAP_RECEIVER_xx Communication Channel — Adapter Specific Settings
g) The result:
Figure 237: Communication Channels — Result
h) Choose Save, then right click over the objects and choose Activate. Create the iFlow CallCatalogService_xx In this task, the following process flow is used:
Prohibida su reproducción 270
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
Figure 238: CallCatalogService_xx iFlow
1. Create the iflow CallCatalogService_xx. Use the following data: Field
Value
Name
CallCatalogService_xx
Select a pattern to create an integration flow
Point-to-Point Channel
Sender System Communication Component
CA_Process_XX
Type
Business Component
Interface
SI_CallCatalogeService_outb
Receiver System Communication Component
CatalogService_XX
Type
Business Component
Interface
SI_CallCatalogeService_inb from your own namespace
a) In the SAP Process Integration Designer perspective, choose PI Explorer → Integration Flows → New Integration Flow to start the wizard. b) In the Create an integration flow screen, enter the data from the table above.
Figure 239: Integration Flow Wizard
Prohibida su reproducción © Copyright. All rights reserved.
271
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
c) In the Define Communication Components screen, in the Sender System tab, enter the data from the table above.
Figure 240: Define Sender System — iFlow Wizard
d) ChooseDefine Communication Components , then choose the Receiver Systems tab, there choose Add. Enter the data from the table above.
Figure 241: Define Receiver System — iFlow Wizard
e) Choose Finish
Figure 242: iFlow after wizard
f) On CA_Process_xx In the Channel Adapter area, on the Sender side select the arrow and choose Assign Referenced Channel
Prohibida su reproducción 272
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
Figure 243: Assing Referenced Channel
g) Then, assign the newly created communication channel CC_SOAP_SENDER_## .
Figure 244: Choose Communication Channel
h) In the same manner assign the communication channel CC_SOAP_RECEIVER_## . i) Choose Save. j) Choose Activate. Note: When an error about keystone comes up during activation, then, in the channel, choose the Agreement tab, then choose Channel and at Security procedure (Request) choose none. do the same for Security procedure (Request) , choose none.
Figure 245: Receiver Communication Channel Assignment
k) Choose the SAP Process Integration Designer perspective. There choose PI Explorer → Integration Flows → CallCatalogService_XX . Perform a right mouse-click, and from the context menu choose Activate and accept the pop ups. l) Choose the SAP Process Integration Designer perspective. There choose PI Explorer → Integration Flows → CallCatalogService_XX . Perform a right mouse-click, and from the context menu choose Deploy and accept the pop ups.
Prohibida su reproducción © Copyright. All rights reserved.
273
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 246: Deploy iFlow
m) The result:
Figure 247: The Result
Prohibida su reproducción 274
© Copyright. All rights reserved.
Lesson: Explaining the SAP Process Integration Designer
LESSON SUMMARY You should now be able to: ●
Explain the SAP Process Integration Designer
Prohibida su reproducción © Copyright. All rights reserved.
275
Unit 4 Lesson 4 274
Monitoring with Process Integration Monitoring (PIMON) LESSON OVERVIEW This lesson shows you how to monitor with Process Integration Monitoring (PIMON). LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Monitor Messages with Process Integration Monitoring (PIMON)
Process Integration Monitoring (PIMON) Since PO 7.31 SP06, the message monitoring of the AEX (PIMON) displays the messages in the XI Message protocol and the SOAP Messages.
Figure 248: PIMON Monitoring
To call the PIMON with pre-selected message IDs, you can choose the Show Related PI Messages link. In this case, only the XI messages appear.
Prohibida su reproducción 276
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
Figure 249: Message Monitoring
The AEX tool site is started through the following url: http:// :/dir. The monitor is called through the Configuration and Monitoring Home link . The WS calls in the message list appear here as well.
Business Logs The Business Log is accessed through the SAP NetWeaver Administrator Troubleshooting tab, under Processes and Tasks → Business Logs. Selecting an item in the Business Log allows you to view details about that item. Choosing the Container ID (that is, process ID) for the item in the Details tab allows you to go to the applicable process.
Figure 250: Business Log Monitoring
PIMON Execution When the monitoring is started, you see tabular displays.
Prohibida su reproducción © Copyright. All rights reserved.
277
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 251: PIMON Overview
The figure, PIMON Overview, shows the tabular view of the message overview, including status and other relevant data. Depending on your needs, you can select a predefined hourly, daily, weekly, monthly, or yearly time range.
Figure 252: PIMON Message List
You can make a selection by choosing one of the columns containing the message statuses on the left of the screen. The specific set of messages for that particular integration scenario will be opened on the Database tab. Take note that your log and trace and message retention settings should be properly configured in order to display messages with certain statuses on the Database tab.
Prohibida su reproducción 278
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
Figure 253: PIMON Message Details
Once the messages are displayed, you can either apply additional filters or select a particular message from the list presented on the Database tab. You can then proceed to analyze different attributes (processing context data, header information, payload, logs, etc.) of the message, or (if permitted by the message status) you can cancel or retry all messages with that particular status. The third and last tab (Archive) shows all messages (or their metadata) that have been previously archived.
PIMON Monitoring Each AEX installation has its own SAP PI local monitoring tool that you can use to monitor different system areas, including message traffic and communication channels and data and runtime caches. SAP PI local monitoring (PIMON) can be accessed at http://:/ pimon. Via SAP PI local monitoring, you can access the following AEX monitoring tools: ●
Message Monitoring Main message monitoring tool for all messages processed via the AEX. It shows aggregated and fine-grained information about the status of messages sent and received. Manage individual messages, for example, by resending individual message versions.
●
IDoc Adapter Monitor Extensive IDoc monitoring tool, with an overview of all message traffic and metadata processed via the AEX Central Adapter Engine.
●
Channel Independent Logs Display execution steps (in a very simple way) of adapters that cannot be assigned to a particular communication channel.
●
Adapter Engine Status
Prohibida su reproducción © Copyright. All rights reserved.
279
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Provides detailed information about the adapter engine, including queues, message traffic (for example, amount of asynchronous or synchronous message backlog), database locks, overview of messages processed or being processed per sender, and receiver components. ●
Cache Monitor Provides an overview of current cache objects maintained by the adapter engine and mapping runtime.
●
Performance Monitoring Monitor the performance of message processing by inspecting the amount of processed data over various periods of time and the message processing time for individual adapter modules. Additional configuration is needed in the configuration tool for this functionality to work properly.
●
Background Job Monitor Displays an overview of background jobs (for example, adapter engine, adapter framework scheduler jobs, and so on) and offers the ability to manage them.
●
CPA Cache History The traditional CPA cache monitor that displays an overview of cache refresh actions and their statuses.
How to Assign the Checkavailability Process with the iFlow CallCatalog Service For the steps and data of this demonstration, refer to the exercise Assign the Checkavailability Process with the iFlow CallCatalog Service.
Prohibida su reproducción 280
© Copyright. All rights reserved.
Unit 4 Exercise 10 279
Assign the CheckAvailability Process with the iFlow CallCatalogservice_##SP03 Business Example In this exercise you will create the following scenario:
Figure 254: Exercise Data Flow
You will perform the following tasks: ●
Change the assigned Service Interface in CA_Call_viaAEX_CatalogService_AA
●
Assign the PoolAdministrator in the CheckAvailibility process
●
Build and deploy the Development Component [LocalDevelopment] bit800_xx/pm
●
Configure the Service Group CallServiceViaAEX - Consumer
●
Configuration of the Service Provider CA_startProcess_Trigger and PO_startProcess Trigger
●
Test the CheckAvailibility process with WS Navigator including the IFlows
●
Monitoring
●
Debugging
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Change the assigned Service Interface in CA_Call_viaAEX_CatalogService_AA In this task, you will perform the following steps:
Prohibida su reproducción © Copyright. All rights reserved.
281
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
●
Import the Service Interface SI_CallCatalogService_outb from ESR
●
Maintain the Service Reference of the Service Interface SI_CallCatalogService_outb
●
Assign and configure Service Interface SI_CallCatalogService_outb to CA_Call_viaAEX_CatalogService_AA 1. Import the Service Interface SI_CallCatalogService_outb from ESR. The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview.
2. Maintain the Service Reference of the Service Interface SI_CallCatalogService_outb. Use the following data: Field
Value
Type
XI
Custom Properties —> Sender Component
CA_Process_XX
3. Assign and configure Service Interface SI_CallCatalogService_outb to CA_Call_viaAEX_CatalogService_AA. The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview.
Assign the Pool Administrator in the CheckAvailability Process 1. Assign the Pool Administrator in the CheckAvailability process
Build and Deploy the Development Component [LocalDevelopment] bit800_xx/pm The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. 1. Build and Deploy the Development Component [LocalDevelopment] bit800_xx/pm.
Configure the Service Group CallServiceViaAEX - Consumer There is no need, to configure this group, because the listed Service Interface SI_CatalogService_outb communicates via XI with the AEX. 1. Check the Application Communication in NWA for service group CallServiceViaAEX
Figure 267: Service Group Configuration
Test the CheckAvailibility Process with WS Navigator including the iFlows In this task, the message flow looks like:
Prohibida su reproducción 282
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
Figure 268: Process Flow
The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. 1. Test-case 1: the article number is not listed in the catalog (item can not be ordered). 2. Test-case 2: the article number is listed in the catalog (item can be ordered). Use the data in the figure below for this test case.
Monitoring 1. Manage the processes: /nwa/bpm-processes. Use the following settings: Field
Value
Status overview
Advanced
Error Status
All
Status
All
2. From the previous task or by using the AEX monitoring alias- /pimon Monitoring monitor the related PI messages 3. Call the Process error analysis monitor by using the alias: /nwa/bpm-troubleshooting. 4. Call the Business Logs monitor using alias: /nwa/bpm-bizlog. 5. Check out the SOAP Communication Channels using the SOAP Communication Channel Monitoring. 6. Use the BPM System overview to check the BPM-Status. 7. Execute the BPM-Analytics to check the report.
Debugging
Prohibida su reproducción © Copyright. All rights reserved.
283
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
1. Create a Run Configuration called TestCheckAvailableProcess.
Prohibida su reproducción 284
© Copyright. All rights reserved.
Unit 4 Solution 10 283
Assign the CheckAvailability Process with the iFlow CallCatalogservice_##SP03 Business Example In this exercise you will create the following scenario:
Figure 254: Exercise Data Flow
You will perform the following tasks: ●
Change the assigned Service Interface in CA_Call_viaAEX_CatalogService_AA
●
Assign the PoolAdministrator in the CheckAvailibility process
●
Build and deploy the Development Component [LocalDevelopment] bit800_xx/pm
●
Configure the Service Group CallServiceViaAEX - Consumer
●
Configuration of the Service Provider CA_startProcess_Trigger and PO_startProcess Trigger
●
Test the CheckAvailibility process with WS Navigator including the IFlows
●
Monitoring
●
Debugging
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Change the assigned Service Interface in CA_Call_viaAEX_CatalogService_AA In this task, you will perform the following steps:
Prohibida su reproducción © Copyright. All rights reserved.
285
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
●
Import the Service Interface SI_CallCatalogService_outb from ESR
●
Maintain the Service Reference of the Service Interface SI_CallCatalogService_outb
●
Assign and configure Service Interface SI_CallCatalogService_outb to CA_Call_viaAEX_CatalogService_AA 1. Import the Service Interface SI_CallCatalogService_outb from ESR. The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. a) From the ESR import the Service Interface SI_CallCatalogService_outb by right-clicking in the bit800_xx/pm → Process Modeling → Service Interface and choose Import WSDL from the ESR and use a new Service Reference called, CallServiceViaAEX
Figure 255: Import WSDL — Service Reference
b) This is how it looks in project tree:
Figure 256: Service Reference
2. Maintain the Service Reference of the Service Interface SI_CallCatalogService_outb. Use the following data: Field
Value
Type
XI
Prohibida su reproducción 286
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
Field
Value
Custom Properties —> Sender Component
CA_Process_XX
a) In the Process Development perspective under [LocalDevelopment] bit800_xx/pm > Connectivity on the Detail page, choose the Service Interface under Service References → List of Service References → CallServiceViaAEX → urn:bit800:xx:com → SI_CallCatalogService_outb. b) Choose Properties → Overview in theService References tab and enter the data from the table above.
Figure 257: Service Reference Details
c) Choose Save. 3. Assign and configure Service Interface SI_CallCatalogService_outb to CA_Call_viaAEX_CatalogService_AA. The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. a) In the CheckAvailability process at CA_Call_viaAEX_CatalogService_AA, under Properties → Interface select the Service Interface SI_CallCatalogService_outb.
Figure 258: CA_Call_viaAEX_CatalogService_AA Automated Activity — Interface
b) In the Automated Activity CA_Call_viaAEX_CatalogService_AA create a 1:1 Input Mapping from CA_CheckAvailibility_DO/PurchaseOrder to MT_CatalogService_IN/PurchaseOrder. Remember to drag and drop using the secondary mouse button and choose Execute Default Matcher.
Prohibida su reproducción © Copyright. All rights reserved.
287
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 259: Input Mapping
c) Create an 1:1 Output Mapping from MT_CatalogService_OUT to CA_CheckAvailibility_DO. Remember to drag and drop using the secondary mouse button and choose Execute Default Matcher.
Figure 260: Output Mapping
d) ChooseSave.
Assign the Pool Administrator in the CheckAvailability Process 1. Assign the Pool Administrator in the CheckAvailability process a) Under Windows → Preferences → General → Network Connections set the Active Provider Connection to Direct. This will speed up the Connection to UME. b) Choose Apply, then choose OK.
Figure 261: Network Connections
c) Switch to the Process Development perspective. Under [LocalDevelopment] bit800_xx/pm/Process Modeling /Processes / CheckAvailibility Process —> C_PoolADministratorxx > Administrators —> Choose one or more UME prinicipals in the checkbox choose Choose …. d) In der Mask under Principal Name choose User. e) Next to it, enter AdministratorXX and click Search. f) In the Login screen, enter Administratorxx and the given password.
Prohibida su reproducción 288
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
g) When the Administrator is found, select it and, choose Add to take it over. h) Choose OK to confirm the take over. i) The result:
Figure 262: Pool Administrator
Build and Deploy the Development Component [LocalDevelopment] bit800_xx/pm The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. 1. Build and Deploy the Development Component [LocalDevelopment] bit800_xx/pm. a) In the Process Development perspective build the bit800_xx/pm Development Component
Figure 263: Build Development Component
b) In the Process Development perspective, deploy the bit800_xx/pm Development Component in the JEE Server.
Figure 264: Deploy Development Component
Prohibida su reproducción © Copyright. All rights reserved.
289
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Note: Sometimes, a BUILD error is thrown.
Figure 265: Build Error
This error is located in the Development Infrastructure Perspective. Navigate to PI-SCP-BUILDT and perform Resync DCs.. If Resync doesn’t work, expan the Development Component and right click in each of the DCs and choose Sync/ Create Project → Sync Archives After succesfully completed, try to Build and Deploy again.
Figure 266: Resync DCs
Configure the Service Group CallServiceViaAEX - Consumer There is no need, to configure this group, because the listed Service Interface SI_CatalogService_outb communicates via XI with the AEX. 1. Check the Application Communication in NWA for service group CallServiceViaAEX a) Navigate to http://nwktdc00.wdf.sap.corp:50000/nwa SOA → Application and Scenario Configuration → Application Communication b) Find your sap.education.com/bit800_xx~pm and select it c) Note the service group called CallServiceViaAEX doesn’t need a provider system and the connectivity type is Xi
Figure 267: Service Group Configuration
Prohibida su reproducción 290
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
Test the CheckAvailibility Process with WS Navigator including the iFlows In this task, the message flow looks like:
Figure 268: Process Flow
The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. 1. Test-case 1: the article number is not listed in the catalog (item can not be ordered). a) In a browser enter http://nwktdc00.wdf.sap.corp:50000/wsnavigator to start the WSNavigator. b) In the next screen, flag Provider System and search for CA_StartProcess . Make sure you select the one in your namespace urn:bit800:xx:com
Figure 269: WS Navigator
c) Data of test case 1: the article number is not listed in the catalog (item can not be ordered). Use the data in the figure below for this test case. Note: Don’t forget to maintain the Invocation Parameters with your Administratorxx user and password to be able to test.
Prohibida su reproducción © Copyright. All rights reserved.
291
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 270: Test Case 1: Item is not listed in the catalog
We expect that the isSparePartAvailible field is false . The flag at true is not set. In the alternativeSparePart field is 9999 Note: When testing if nothing is displayed in the Tree View, use the XML Content tab instead.
Figure 271: Test Case 1: Expected Result
2. Test-case 2: the article number is listed in the catalog (item can be ordered). Use the data in the figure below for this test case. a) Data of test-case 2: the article number is listed in the catalog (item can be ordered). Note: Don’t forget to maintain the Invocation Parameters with your Administratorxx user and password to be able to test.
Figure 272: Test Case 2: Item listed in the catalog
Prohibida su reproducción 292
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
We expect that the isSparePartAvailible field is true. The flag at true is set. In the alternativeSparePart field is 600.
Figure 273: Test Case 2: Expected Result
Monitoring 1. Manage the processes: /nwa/bpm-processes. Use the following settings: Field
Value
Status overview
Advanced
Error Status
All
Status
All
a) Navigate to http://nwktd00.wdf.sap.corp:50000/nwa/bpm-process. b) Enter the data from the table above and choose Go. Select your CheckAvailability Process
Figure 274: Manage Processes
c) Choose the History tab to look at the log.
Figure 275: Hostory Tab — AEX Call
d) Choose the Context Data tab. Check CA_CheckAvailibility_DO by choosing it from the Show drop-down menu.
Prohibida su reproducción © Copyright. All rights reserved.
293
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 276: Context Tab
e) Choose the Details tab choose Show Related PI Messages to switch to http:// nwktd00.wdf.sap.corp:50000/pimon, you are now able to monitor the PI messages the classic Process Integration way.
Figure 277: Details Tab- Show Related PI Messages
2. From the previous task or by using the AEX monitoring alias- /pimon Monitoring monitor the related PI messages a) By default no successful synchronous Messages are displayed. Only in the error cases, messages are displayed. b) To see messages, execute http://nwktdc00.wdf.sap.corp:50000/pimon . There choose Adapter Engine → Message Monitor . c) To see the messages, you have to click Go twice. d) This is a faulty message:
Figure 278: Faulty Message in the Monitor
e) Correct messages are displayed under the PIMessages tab. Analyze if your messages have status Delivered.
Prohibida su reproducción 294
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
Figure 279: Delivered Messages
3. Call the Process error analysis monitor by using the alias: /nwa/bpm-troubleshooting. a) Navigate to http://nwktd00.wdf.sap.corp:50000/nwa/bpm-troubleshooting. Note: This monitor is used to trace the problems related to component availability, administrators can view the status of all BPM cluster nodes, view the list of subsystems and adapters with errors, and navigate to the application to start and stop the Java server.
Figure 280: Process Troubleshooting: Availability
4. Call the Business Logs monitor using alias: /nwa/bpm-bizlog. a) Navigate to http://nwktd00.wdf.sap.corp:50000/nwa/bpm-bizlog. Note: Used to monitor and analyze business events of BPM and BRMs. These technologies raise events to signal changes in the lifecycle of their entities such as business processes or business rules. Administrators can view these logs based on categories, events, containers, and date ranges.
Prohibida su reproducción © Copyright. All rights reserved.
295
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 281: Business Logs: Log Viewer
5. Check out the SOAP Communication Channels using the SOAP Communication Channel Monitoring. a) Choose the SAP Process Integration Designer perspective. b) Choose CA_Process_xx → SOAP_SENDER_xx right click and choose Open Channel Monitoring. log on with your Administratorxx user and password if needed. From the process to the SOAP-Adapter XI Communication is used. So you can`t see any messages because of the XI protocol being used the messages are not process by the adapter.
Figure 282: Sender Channel Monitoring
c) Green entries: all is OK. Errors are marked in red, with an error description. d) At the CC_SOAP_RECEIVER_xx communication channel, you can see the SOAP based Messages, which are processed by the Adapter.
Prohibida su reproducción 296
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
Figure 283: Receiver Channel Monitoring
6. Use the BPM System overview to check the BPM-Status. a) Execute http://nwktdc00.wdf.sap.corp:50000/nwa. There choose Availibility and Performance → BPM System Overview.
Figure 284: BPM System Overview
7. Execute the BPM-Analytics to check the report. a) Execute http://nwktdc00.wdf.sap.corp:50000/bpmanalytics.
Figure 285: BPM Analytics
Debugging 1. Create a Run Configuration called TestCheckAvailableProcess.
Prohibida su reproducción © Copyright. All rights reserved.
297
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
a) Choose Eclipse → Run Configuration → Process create a new configuration, name it: TestCheckAvailibleProcess.
Figure 286: Run Configuration
Figure 287: Create New Configuration Type Process
b) You have to maintain the following values: Field
Value
Name
CheckAvailibility
Project
[LocalDevelopment] bit800_xx/pm
Process
CheckAvailability Process
Figure 288: Run Configuration
c) Choose Apply . d) Choose Run .
Prohibida su reproducción 298
© Copyright. All rights reserved.
Lesson: Monitoring with Process Integration Monitoring (PIMON)
e) Log On with User Administratorxx and the given password. f) In the Debug perspective, you can debug the whole process, as done in the Java development.
Figure 289: Debug Perspective
Prohibida su reproducción © Copyright. All rights reserved.
299
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
LESSON SUMMARY You should now be able to: ●
Monitor Messages with Process Integration Monitoring (PIMON)
Prohibida su reproducción 300
© Copyright. All rights reserved.
Unit 4 Lesson 5 299
Testing a Process with AEX
LESSON OVERVIEW This lesson shows you how to test the Procurement Process with AEX. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Test the procurement process with AEX
Process Deployment Overview In general, process development involves the following phases: ●
Process creation
●
Process building
●
Process deployment
●
Process execution
●
Process monitoring
In this unit you will perform the final steps before building and deploying the process. After that, you will start and monitor the process.
Consumer Side Configuration During import to the Business Process Model and Notation (BPMN) process, all imported service Interfaces must be assigned to a service reference. Any number of service references can be created. A service reference summarizes all the service interfaces that call the same Application Server for Java (AS Java) server as a Web service consumer.
Prohibida su reproducción © Copyright. All rights reserved.
301
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 290: Consumer Side Configuration
The following two types of protocols are used for messages: ●
SOAP message protocol
●
XI message protocol 3.0
In the AS Java server, each service reference is assigned to exactly one target system by the SOAP (WS) message protocol.
Prohibida su reproducción 302
© Copyright. All rights reserved.
Lesson: Testing a Process with AEX
Figure 291: System Connections Procedure
The procedure for configuring system connections is as follows: 1. The target system must first be configured in SAP NetWeaver by choosing Technical Configuration → System Connections. 2. The technical connection data such as URL, user, and time out is maintained. Additionally, a communication profile is assigned. In the example, it is the profile SAP_DEFAULT_PROFILE. 3. Communication profiles are created and configured in the Connections Profile tab. This tab describes the profile's transport security and the various authentification options. It is not necessary to configure service references with the XI message protocol 3.0.
Prohibida su reproducción © Copyright. All rights reserved.
303
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 292: Application Communications Configuration
The procedure for configuring application communications is as follows: 1. In the SAP NetWeaver Administrator, under SOA → Application and Scenario Communication, choose the communication application according to the product you have installed and now want to configure. 2. The service interfaces that are used with WS-consumer clients appear in the lower half of the screen. 3. The defined service references appear in the Consumed Service Groups tab. Provider systems are assigned here.
Provider Side Configuration During deployment, the defined message triggers in the process are installed as callable Web services. In order for these message triggers to be accessible to endpoints, they must be assigned to communication profiles.
Prohibida su reproducción 304
© Copyright. All rights reserved.
Lesson: Testing a Process with AEX
Figure 293: Application Communications—Assign Profile
Communication applications are chosen in the NetWeaver Administrator under SOA → Application and Scenario Communication according to the product you installed and now want to configure. All service Interfaces, which are configured as a trigger in the BPMN process, can be found in the Provided Services tab. Those service interfaces, which are using the WS as connectivity, are assigned a communication profile. Communication profiles are created under SOA → Technical Configuration → System Connections. This data is found in the WSDL. The figure, System Connections Data in the WSDL File, shows an example of the WSDL for the trigger GetFromTrigger.
Prohibida su reproducción © Copyright. All rights reserved.
305
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 294: System Connections Data in the WSDL File
Process Initialization BPMN processes are always initiated by a WS-call at the endpoint of start message events. The start message event acts as a Web service provider. Methods for Starting the Web Service ●
On the Process Repository in SAP NetWeaver Administrator
●
Using the Web Service Navigator as a WS client
●
Over any WS client
Prohibida su reproducción 306
© Copyright. All rights reserved.
Lesson: Testing a Process with AEX
Figure 295: Start of a Process by the Process Repository
The start procedure in the Process Repository contains the following steps: 1. The Process Repository is accessed through the SAP NetWeaver Administrator under Configuration → Processes and Tasks → Process Repository. From there you can filter the results by software components. 2. The different versions of the selected software component appear in the middle of the screen. 3. The Processes and Tasks tab displays the BPMN processes that can be chosen. Choose the Start Process button to start the previously selected software component.
Prohibida su reproducción © Copyright. All rights reserved.
307
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Figure 296: BPM Process Startup
4. Choosing the Start Process button opens a new window. From here you can see the URL of the Web Service Definition Language (WSDL) of the start message event trigger. 5. Here the message type appears as an editable table. In this case the message type is empty. 6. The process is started by choosing the Start Process button.
Prohibida su reproducción 308
© Copyright. All rights reserved.
Lesson: Testing a Process with AEX
Figure 297: Managing Process Instances
7. Choose the Details link to open the View started processes link. 8. To view a list of started processes, choose the View Started Processes link. 9. The Process Instances monitor shows the pre-selected process ID of the newly started process. LESSON SUMMARY You should now be able to: ●
Test the procurement process with AEX
Prohibida su reproducción © Copyright. All rights reserved.
309
Unit 4: Connectivity with the Advanced Adapter Engine Extended (AEX)
Prohibida su reproducción 310
© Copyright. All rights reserved.
Unit 4
309
Learning Assessment
1. Enterprise Integration Patterns (EIP) are design patterns that help in solving recurring problems faced in the integration of enterprise applications. Determine whether this statement is true or false. X
True
X
False
2. The aggregator pattern is a stateful filter that is used in cases where subsequent message processing is contingent upon the successful processing of multiple input messages. Determine whether this statement is true or false. X
True
X
False
3. Which messages are displayed within the Business Logs? Choose the correct answer. X
A WS messages (SOAP is the message protocol)
X
B XI messages (XI-Message protocol 3.x is the message protocol)
X
C RFC messages (RFC Specific Message Protocol is the message protocol)
4. Which of the following logs contains information about BPM processes and tasks? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
Prohibida su reproducción © Copyright. All rights reserved.
311
Unit 4
310
Learning Assessment - Answers
1. Enterprise Integration Patterns (EIP) are design patterns that help in solving recurring problems faced in the integration of enterprise applications. Determine whether this statement is true or false. X
True
X
False
2. The aggregator pattern is a stateful filter that is used in cases where subsequent message processing is contingent upon the successful processing of multiple input messages. Determine whether this statement is true or false. X
True
X
False
3. Which messages are displayed within the Business Logs? Choose the correct answer. X
A WS messages (SOAP is the message protocol)
X
B XI messages (XI-Message protocol 3.x is the message protocol)
X
C RFC messages (RFC Specific Message Protocol is the message protocol)
4. Which of the following logs contains information about BPM processes and tasks? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
Prohibida su reproducción 312
© Copyright. All rights reserved.
UNIT 5
Data Flows
Lesson 1 Defining Process Context
315
Lesson 2 Explaining Data Objects
318
Lesson 3 Creating Data Mappings
324
Lesson 4 Explaining Gateways Exercise 11: Assign the CheckAvailability Process to the PO Process SP03
334 339
Lesson 5 Applying Data Transformations by Using Functions
352
Lesson 6 Outlining Notification Activities for PO Exercise 12: Extend the PO Process with E-Mail Communication with the Customer SP03
356 359
Lesson 7 Configuring and Using Reporting Activities for PO
367
UNIT OBJECTIVES ●
Explain process context
●
Explain data objects
Prohibida su reproducción © Copyright. All rights reserved.
313
Unit 5: Data Flows
●
Explain mapping
●
Explain gateways
●
Apply data transformations by using functions
●
Explain notification activities
●
Add report activities to a business process
Prohibida su reproducción 314
© Copyright. All rights reserved.
Unit 5 Lesson 1 313
Defining Process Context
LESSON OVERVIEW This lesson shows you how to define Process Context. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain process context
Process Context In a process, data is transported and changed by events and activities. This data is stored in the process context. Therefore, the process context is the sum of all data including the roles information. In SAP Business Process Management (BPM), process context is represented by a data structure defined in an XSD file. Before you create an XSD file, you have to define the necessary data in the business process. To add the process context and import all the data types that are needed, you need to import an XSD file. An XSD file defines the data types you assign to data objects. You use data objects to define input and output data, which is mapped to an activity in the process you modeled. To track the data changes, you need to define input and output mapping. Process Composer mapping does not support all data types.
Figure 298: Process Data Model
Prohibida su reproducción © Copyright. All rights reserved.
315
Unit 5: Data Flows
Note: For XSD related limitations, see SAP Note 1266539.
Data Objects Used to Store Context Data If you choose the exclusive choice gateway type, you have to define the condition evaluation order. To do that, choose Condition Evaluation in the Properties view. The condition you place on top has the highest priority and is evaluated first.
Figure 299: Usage of the Data Object in a Gateway
The exclusive choice gateway controls the sequence flow between activities. It is like a question that is asked at that point in the process. The question has a defined set of alternative answers, that is the gates. You define a condition for each gate based on a boolean expression. The expressions use the values of process data to determine which path has to be taken. Each gate has an outgoing sequence flow.
Figure 300: Usage of the Data Object in a Notification Step
Prohibida su reproducción 316
© Copyright. All rights reserved.
Lesson: Defining Process Context
Process Context with Data Objects Guidelines ●
In a process, data is stored in the process context.
●
The process context is referenced by a data object (artifact).
●
The structure of the data is defined by an XSD file.
●
The XSD file defines the data types which will be assigned to data objects.
●
The XSD file can be imported or created using a graphical editor.
LESSON SUMMARY You should now be able to: ●
Explain process context
Prohibida su reproducción © Copyright. All rights reserved.
317
Unit 5 Lesson 2 316
Explaining Data Objects
LESSON OVERVIEW This lesson shows you the explanation of data objects. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain data objects
Process Data A process can be defined as a specific order of events and activities that aim for a certain goal. This data is stored in the process context. These events and activities have strictly defined inputs and outputs and are connected in a process and eventually produce a value. The process context is the sum of all data objects including the roles information. The process context is represented by a data structure defined in an XSD file. To add the process context and import all the data types that are needed, you import an XSD file. The XSD file defines the data types you assign to data objects. The data objects are used to define input and output data, which is mapped to an activity in the process mode. To track the data changes you need to define the input and output mapping. The mapping in the process composer does not support all data types. The XSD file defines the data types assigned to data objects. Table 6: Overview of Data Types Element
Usage
Elements typed as xsd:anySimpleType
Not supported
xsd:any
Ignored
xsd:anyAttribute
Ignored
xsd:choice
Treated as xsd:sequence
xsd:all
Treated as xsd:sequence
Occurrence constraints on xsd:choice, xsd:sequence, xsd:all
Treated as minOccurs=1, maxOccurs=1
Occurrence constraints on xsd:element
Treated as single value for minOccurs <= 1 and maxOccurs = 1, otherwise treated as list with arbitrary number of entries
Constraining facets
Behavior undefined, may get enforced/ignored by the underlying (SDO) data representation
Prohibida su reproducción 318
© Copyright. All rights reserved.
Lesson: Explaining Data Objects
Element
Usage
Mixed content
Treated as complex structure without simple content
Default values for elements/attributes
Ignored
Element substitution groups
Not supported
Complex structure without contained fields
Not supported
Each process is provided with a predefined data structure called ProcessInstanceAttributes that contains the following read-only data objects: ●
●
ProcessInstanceId that holds the ID of the process instance which is acquired at runtime automatically. ProcessInitiator that stores data about the user who started the process.
To view the Process Instance ID and Process Initiator, access the Process Management Tool using the following high level procedure: 1. Log in to SAP NetWeaver Administrator. 2. Choose the Operations tab. 3. Choose the Process and Task option. 4. Choose Manage Processes. Both data objects are visible in the mapping editor and below the Context node in the expression editor.
XSD File Creation XSD files contain the structure of the data contained within a data object. To change the default data type settings, you need to create or import an XSD file. XSD files are created using the Composite Designer perspective and using the function Data Type → New. Graphical Editor Functions ●
Use the function Add element to create data types, elements, and attributes.
●
Use the function Set Multiplicity to define the multiplicity of elements (1..1, 1..n, 0..1 and 0..n).
You can import existing XSD files from the SAP NetWeaver Developer Studio (NWDS) Process Development perspective using the Import tool. XSD File Import Steps 1. In the SAP NWDS Process Development perspective, choose File → Import. 2. In the dialog box that appears, expand Web Services, and choose XSD. Choose Next. 3. Choose Browse to define an output folder for the XSD source file. Choose OK. 4. From the Available XSD sources, choose Remote Function/File System, then choose Next.
Prohibida su reproducción © Copyright. All rights reserved.
319
Unit 5: Data Flows
5. Choose an XSD file to import. To do so, choose Browse, then navigate to choose the applicable XSD file. Alternatively, enter a URL from which to import the file. 6. Choose Finish. The XSD file appears in your project in the Process Modeling → Data Types → XSD Files. Also, the XSD source file appears in the output folder you defined.
XSD Files and Data Objects After you create or import an XSD file, you need to associate it with a data object. The high level procedure for editing an XSD file is as follows: 1. Expand Process Modeling, then expand Data Types and XSD Files. 2. In the context menu of an XSD file, choose Open. 3. In the context menu of Elements (on the Design tab), choose Add Element. 4. Under Elements, choose an element and define its properties. 5. In the context menu of Types (on the Design tab), choose Add Complex Type or Add Simple Type. 6. Under Types, choose a type and define its properties. XSD File Editing Guidelines ●
●
●
Make sure that your process is opened for editing in the Process Composer. To create a new data object, choose the Data Object entry in the Artifacts section of the Palette and click the modeling surface. To change the name of the data object, proceed to the Properties view and open the General tab.
Prohibida su reproducción 320
© Copyright. All rights reserved.
Lesson: Explaining Data Objects
Figure 301: XSD File and Data Object (BPMN: Artifact)
Assignment of XSD Files to Data Objects A data object is a type of artifact that allows you to store process related data. It provides additional information in the process you model. A key point is that the data object manages the process context. The output of one activity is the input information for a subsequent activity in the process. The process context enables the sharing of data throughout a business process and makes that data available to all flow objects.
Prohibida su reproducción © Copyright. All rights reserved.
321
Unit 5: Data Flows
Figure 302: Title Data Object in the Lane, Assigned to a Start Object and an Automated Activity
The data object is linked to a data type or data structure. You can create the XSD directly in NWDS, imported from the Enterprise Service Repository (ESR) or from a local file system.
Figure 303: Schema of an XSD File
Figure 304: Data Type
Prohibida su reproducción 322
© Copyright. All rights reserved.
Lesson: Explaining Data Objects
When the process needs to call an external Web service, you will need to import the WSDL from the Service Interface in the ESR. When the process calls a Web service it will be via Advance Adapter Engine Extended (AEX). Here the AEX will act as the enterprise service bus. To make an executable process out of the process modeled, you need to add the business logic. The process steps represented by events and activities are still without content. The flow objects need to feed on data. Summary of the XSD File Usage 1. The process context is the sum of all data objects including the roles information. 2. In a process, data is being changed and transported by events and activities. This data is stored in the process context. 3. The process context is represented by a data structure defined in an XSD file. To add the process context and import all the data types needed you import an XSD file. 4. The XSD file defines the data types you assign to data objects. 5. You use data objects to define input and output data, which you map to an activity in the process you model. 6. To track the data changes you need to define the input and output mapping. The process context is the sum of all data objects including the roles information. LESSON SUMMARY You should now be able to: ●
Explain data objects
Prohibida su reproducción © Copyright. All rights reserved.
323
Unit 5 Lesson 3 322
Creating Data Mappings
LESSON OVERVIEW This lesson shows you how to create data mappings. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain mapping
Data Mapping Definitions Data mapping defines rules for transforming the source context to a target context. The visual display of mapped data mapping shows how data input and output by activities in the process are converted. Data mapping includes drag and drop, automapping, and quick fix features that make data mapping quick and easy.
Figure 305: Definition Data Mappings
Data mapping defines the rules for transforming the source context to the target context. Each context consists of one or more nodes. You specify with drag and drop which nodes are mapped to each other in the mapping editor. You use expressions to specify how the transformation between the nodes is done. Data Mapping is done in the Mapping property section of flow elements and the Expression Editor. The mapping is performed in the following steps: ●
Define input and output mapping
Prohibida su reproducción 324
© Copyright. All rights reserved.
Lesson: Creating Data Mappings
Define automappings to show how data used as input and output by the activities and the events in your process is transformed. ●
Define mappings using the Automapping option The automapping option creates a set of mapping suggestions based on matching the elements’ names, structure, and data types.
●
Apply quick fixes in data mappings and expressions You also have the option of fixing some common errors, which may occur when you define data mappings by applying a quick fix.
Data Mapping Rules You use expressions and a subset of the XPath grammar to specify how the transformation between the nodes is done. These include the following: ●
Mapping parent and child nodes If you define data mappings to a child node, all of its parent nodes are also included in the mapping.
●
Mapping individual child nodes If you define mappings between parent nodes of the same type, all their child nodes are also mapped to each other.
●
Using axes in data mappings Additional axes can be used for selecting parent and root nodes in the expression editor. Additional axes are useful when you want to define data mappings between lists or between their child nodes.
In data mapping, expressions and a subset of XPath Grammar are used to specify how the transformation between the context nodes is done. Data mapping is done within the flow elements and the Expression Editor. Mapping Parent and Child Nodes Nodes can be of a simple type, which means that the node has no children, or of complex type, which means that the node has child nodes. If you define data mapping to a child node, all of its parent nodes are also included in the mapping and this type of mapping is indicated with an asterisk next to the parent node in the target context. Depending on whether you define mappings between parent nodes or only between their child nodes, you can achieve different mapping results. The results can also depend on the cardinality of the parent node. If the cardinality of the parent node is 1 and you map only the child nodes, the mapping engine creates the parent target node (B), even if the source context is empty. Look at the following example: AB A1 ---> B1 A2 ---> B2 End of code
Prohibida su reproducción © Copyright. All rights reserved.
325
Unit 5: Data Flows
If you map the parent nodes and the source structure is initialized, then the target structure is created as follows: A ---> B A1 ---> B1 A2 ---> B2 End of code If the cardinality of the source parent node is greater than 1, which means that the source is a list, you have to map the parent nodes of the source and the target. For each of the elements in the source context, an element is created in the target context and the mapping between child nodes is executed. If no mapping between the source context and the target parent nodes exists, the mapping editor shows an error. You need to specify how the elements of the source context are transformed to the target with an expression as the following example shows: A[] ---> B[] A1 ---> B1 A2 ---> A2 End of code
Note: The Process Composer does not support all data types. For more information about limitations on data types, see SAP Note 1266539. Mapping Individual Child Nodes When you define data mappings between parent nodes of the same type, all their child nodes are also mapped to each other. This default behavior is called deep copy and means that the source context is copied to the target context. A plus sign appears on the mapping line between the parent nodes so that you can expand and see the mappings between the child nodes. A - [+] ---> B A1 B1 A2 B2 End of code If you only want to map individual child nodes and not the whole structure, you can switch the mapping editor to one of the following options: ●
●
1:1 — This option allows you to select individual child nodes from the source context and map them to child nodes from the target context. n:m — This option is available when the parent nodes are in lists. It allows you to select several child nodes from the source context and nap them to a single child node from the target context.
Using Axes in Data Mappings When you define data mappings, you can use additional axes for selecting parent and root nodes in the Expression Editor. Using additional axes is useful when you want to define data mappings between lists or between their child nodes. The following axes are available: ●
Root selector — This selects the root node of a context node and is notated with a slash ( / ).
Prohibida su reproducción 326
© Copyright. All rights reserved.
Lesson: Creating Data Mappings
●
Parent selector — This selects the direct parent node of a context node and is notated with two periods and a slash (../).
For example, you have the source and target structures of node described below: SourceRoot ---> TargetRoot A[ ] ---> B [ ] A1 ---> B1 A11 ---> B11 A2 ---> / End of code The XML Structure of the source context follows this syntax: alla2 all'a2'2> End of code In the source structure, node A is a list and has two child nodes: A1 and A2. The child node A1 also has one child node A11. You want to map the A11 and A2 nodes from the source structure to the B11 node in the target structure and use the function string-join to aggregate the values of the source to the target. Depending on whether you use the parent or root selector, you have different results after the mapping. The following example shows the syntax when using the root selector: string-join( (A11, ../A2), "_") End of code The result of the mapping to the target node B11 consists of two elements: [all_a2_a2'] and [all'_a2_a2']. The following example shows the syntax when using the parent selector: string-join( All, ../A2), "_") End of code The result of the mapping to the target node B11 consists again of two elements [all_a2] and [all'_a2'].
Process Context Icon The Mapping Editor uses a variety of lines, icons, and symbols to help you visualize the data mappings. Mapping Editor Lines ●
●
●
Solid lines — These lines show actual mappings between source and target nodes. You can change these mappings. Dashed lines — These lines show actual mappings whose source or target nodes or both nodes lie out of the visual area of the screen or is hidden. You can change these mappings. Dotted lines — These lines show implicit mappings that you cannot delete or update.
Implicit mapping can be defined in two ways. First, you can use the deep copy feature to map nodes having the same complex type assigned to them. As all child nodes are mapped to each
Prohibida su reproducción © Copyright. All rights reserved.
327
Unit 5: Data Flows
other implicitly, the mapping lines between them are dotted when the mapping between parent nodes is expanded. You can also apply a reusable mapping function. All child mappings are done implicitly and the mapping lines between them are dotted when the mapping between the parent nodes is expanded. Process Context Icons
Figure 306: Process Context Icons
Process Context Symbols Context Node Symbols ●
Question Mark — Indicates that mapping to this node is optional (upper right corner).
●
At Sign (@) — Indicates that the node is a simple type attribute (bottom right corner).
●
Stack icon — Indicates that the node contains multiple nodes or values.
A text( ) child node may also be present in the source or target context. When you define data mapping from a text( ) node, the text( ) node uses the text value of its parent node, which is a complex type node with simple content. When you define data mapping to a text( ) node, the text value is assigned to the parent node as a text value. The text value does not have to be of type string, but can also be other types, such as an integer.
Input and Output Mapping Assigning Static Values to Target Context Nodes You can directly assign a static value to a target context node, which means that no data transformation from the source context is performed. There are many types of values you can enter including: numeral constants, true or false boolean constants, text constants, date, time, date and time. To assign a list with static values, enter the elements of the list between
Prohibida su reproducción 328
© Copyright. All rights reserved.
Lesson: Creating Data Mappings
parentheses and separate them by a comma, for example, (ElementOne, ElementTwo, ElementThree). Defining Data Mappings You define data mappings to show how data used as input and output by the activities and the events in your process is transformed, according to the following guidelines: ●
Input mapping Defines how the data transformation between the process context and the input context of an activity or event is done.
●
Output mapping Defines how the data transformation between the output context of an activity or event and the process is done.
●
Input and output mapping Shows which nodes are mapped to each other, but does not specify how the transformation is done. You define how the transformation is done with an expression.
●
Mapping assignment options Depending on the nodes type and their cardinality, you can define the following mapping assignment options: Set (Source context overrides the target context), Append (Source context objects are appended to the list of existing target context objects), Merge (Source context objects are merged with the target context objects)
You define data mappings to show how input and output data is transformed by the activities and the events in your process. When you define input mapping, you define how the data transformation between the process context and the input context of an activity or event is done. When you define output mapping, you define how the data transformation between the output context of an activity or event and the process context is done. Input and output mapping shows which nodes are mapped to each other, but it does not specify how the transformation is done. You define how the transformation is done with an expression.
The Assignment Option Mapping Assignment Options Depending on the type of nodes and their cardinality, you can define the following mapping assignment options: set, append, and merge. Set Set is the default assignment for both node types. When you use the set option, the source context overrides the target context. For example, in the source context object you have one element, and the target object contains five elements. When you use the set option, you have one element after mapping. Append The append option is available for both node types if the maximum occurrence is greater than 1. When you use the append option, the source context objects are appended to the list of existing target context objects. For example, in the source context object, you have one element and the target context object is a list containing five elements. When you use the append option, you have six elements after mapping.
Prohibida su reproducción © Copyright. All rights reserved.
329
Unit 5: Data Flows
Merge The merge option is intended for structured target data. When you use the merge option, the source context objects are merged with the target context objects. New objects are created in the target object if the number of objects in the source object is greater than the number of objects in the target object. For example, in the source context object, you have a list containing five nodes A, B, C, D, and E. In the target object you have a list containing two nodes M and N. When you use the merge option, after mapping you have a list with the following nodes: M, N, C, D, and E.
Automapping The automapping option creates a set of mapping suggestions by matching the elements' names, structure, and data types. You can also manually specify any necessary assignments. Automapping Options ●
You can select between simple and advanced automapping.
●
Mapping suggestions are created using different algorithms based on your selection.
Simple Name-Based Automapping The simple name-base automapping option creates mapping suggestions by matching the elements' names from the source and target structures. Advanced Automapping The advanced automapping creates the mapping suggestions by matching the source and the target elements using the following algorithms: ●
Name Matcher — compares only the names of elements.
●
NamePath Matcher — compares the entire paths from element to root.
●
Leaf Matcher — compares the leaves that lie underneath the given elements.
●
Parent Matcher — compares the siblings of the given elements.
When using the advanced automapping option, you can select the method for similarity aggregation. You can select either average, which calculates the average over all selected algorithms, or maximum, which accepts only the highest result over all algorithms and rejects the rest. Matching Precision You can adjust the level of matching precision when you switch between the high,medium, and low options. The high precision option means that only matches with a good quality are accepted, so you can be reasonably confident that the matches make sense. However, you must always check all the results. The low precision offers more matches but these may not be of a very high quality. Dictionary Import You can import a dictionary file to improve matching using synonyms and abbreviations. The dictionary supports text files and OLIF V2 file formats.
Prohibida su reproducción 330
© Copyright. All rights reserved.
Lesson: Creating Data Mappings
In a text file, you define synonyms following a header named Synonyms and abbreviations under the keyword Abbreviations. With abbreviations, you must write the short form first separating pairs of entries by a comma. A sample text file is shown in the following example: Synonyms ship, deliver bill, invoice state, county Abbreviations No, Number tel, telephone VAT, value added tax OLIF File V2 Specification For information about the OLIF V2 format, see http://www.olif.net. Errors in Mappings You can solve several types of errors in data mappings and expressions by applying a quick fix. You can apply a quick fix to errors resulting from a difference between data types to define mapping between source and target nodes with different data types. The quick fix enables the source node data type to be processed as the target node data type with the "cast as" function.
Built-in Mapping Functions A number of predefined built-in functions are provided to assist with mapping. These built-in functions are Java methods.
Figure 307: Built-In Functions
You can create your own user defined functions (UDFs) using the the Composer Project Type (Developer Component) service. UDFs created in the service are then placed in the project and are available in the mapping editor.
Mappings: Triggers, Conditions, and Correlations Event triggers are used in the following flow objects: ●
Start events
●
Intermediate events
●
End events
Prohibida su reproducción © Copyright. All rights reserved.
331
Unit 5: Data Flows
From a technical standpoint, event triggers are treated as service interface endpoints, a classical Web service provider. The trigger is defined separately and assigned to the corresponding event.
Figure 308: Trigger Definition and Assignment
The start trigger can be assigned a start condition. The values of the incoming messages can be checked against a start condition. For this, the Expression Editor is used. Built-in functions and UDFs can also be used here for mapping. The result of the test must provide the value boolean TRUE. Therefore, at least one value of TRUE must be configured.
Figure 309: Expression Editor
In a process, checks (also known as conditions), ‘is the weight of a package below 5 KG’ are frequently processed. An intermediate message event (details of which are shown in the figure, Expression Editor) can examine the values of the incoming message in a correlation condition. These are the same conditions as those of the start condition. A trigger may be associated with an intermediate message event only once.
Mappings: Conditional Start The feature conditional start was introduced in version 7.31 SP06. Conditional start works in the following way: If the same trigger is used twice in a process, first at a start event and secondly at an intermediate message event, the BPM runtime decides to which receiver the message is sent. The message is received in an ongoing BPMN process by the intermediate message event, or a new process instance is created by the start event. Additional Information can be found in the Developer Network at: http://scn.sap.com/ community/bpm/blog/2013/03/25/conditional-start-introduction-17
Prohibida su reproducción 332
© Copyright. All rights reserved.
Lesson: Creating Data Mappings
LESSON SUMMARY You should now be able to: ●
Explain mapping
Prohibida su reproducción © Copyright. All rights reserved.
333
Unit 5 Lesson 4 332
Explaining Gateways
LESSON OVERVIEW This lesson gives you an explanation of gateways. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain gateways
Gateways With the parallel split gateway, you can create a parallel flow. You do not need to use the parallel split gateway for parallel flow but with this gateway, you can clarify the behavior of complex situations where a parallel flow is required. Each gate of the parallel split gateway must have an associated sequence flow. You cannot define any conditions for this gateway or the sequence flows and must use a parallel join to merge them together later in the process. Remember the memory consumption when updating the same data object at the same time as you might encounter locks, poor performance and data inconsistencies.
Figure 310: Example of the Use of a Parallel Split and a Parallel Join
Exclusive Split/Exclusive Choice Gateways are used in Business Process Model and Notation (BPMN) to control the direction(s) of the flow throughout the process. Gateways are represented as diamond figures in BPMN notation.
Prohibida su reproducción 334
© Copyright. All rights reserved.
Lesson: Explaining Gateways
A gateway is a type of flow object in the process that shows a merge or a split of a process flow. Create a gateway to indicate that a decision must be made or that the process flow must be split or merged depending on the given conditions. Table 7: Exclusive Split/or Exclusive Choice Gateway Type Exclusive Choice
Symbol
Properties Only one path can be taken. Each Gate has a Boolean data expression.
Parallel Split (also AND gateway)
Splits sequence flow in parallel stream.
Event Based Choice
Only one path can be taken. Decision is based on events.
Uncontrolled Merge
Merge exclusive alternative incoming sequence flows to one outgoing sequence flow.
Parallel Join
Merge parallel alternative incoming sequence flows to one outgoing sequence flow.
Exclusive Split
Figure 311: Exclusive Split Gateway
The exclusive split gateway allows the control flow to take one path dependent on the conditions that are defined. Multiple paths can leave from an exclusive split gateway. Although not mandatory in all cases, divergent control paths from exclusive split gateways should converge at uncontrolled merge gateways. Every exclusive split gateway has a default path that has no conditions set. Given conditions must return a boolean value. If the conditions for the other paths are not met, then the control flow follows the default path. The default path is notated in the business process with a slash mark.
Prohibida su reproducción © Copyright. All rights reserved.
335
Unit 5: Data Flows
Parallel Split and Parallel Join
Figure 312: Parallel Split and Parallel Join Gateways
A parallel split gateway ensures that all paths diverging out of the split must be taken. The parallel join gateway ensures that all paths leaving the gateway are taken. All paths eventually meet at the parallel join gateway where they merge back into one flow. The parallel join gateway will not allow a process to continue until all paths arrive at the parallel join gateway.
Event-Based Choice
Figure 313: Event Based Choice Gateway
The event-based choice gateway controls the flow direction based on events. An event-based choice gateway is immediately followed by an intermediate timer event and an intermediate message event. The event that is triggered first is the path that is followed by the process flow. The event-based choice gateway only controls flow direction. There is no configuration specific to the event-based choice; only the intermediate events that follow the event-based choice gateways are configured to allow the activity or process to continue once all conditions are met.
Prohibida su reproducción 336
© Copyright. All rights reserved.
Lesson: Explaining Gateways
How to Assign the CheckAvailability Process to the PO Process For the demonstration steps, see the exercise, Assign the CheckAvailability Process to the PO Process.
Prohibida su reproducción © Copyright. All rights reserved.
337
Unit 5: Data Flows
Prohibida su reproducción 338
© Copyright. All rights reserved.
Unit 5 Exercise 11 335
Assign the CheckAvailability Process to the PO Process SP03 Business Example This is the process flow, used in this exercise:
Figure 314: Process Flow
In this exercise, we will take over the result of isSparePartAvailible and alternativeSparePart of the CheckAvailible Process into the Purchase Order Process, and with this, we control the Exclusive Choice Event, PO_areSparePartsAvailible_XOR? Creation of a Data Object PO_CatalogProperties_DO based on DT_CatalogServiceAddOn. At (1) all Data is directly mapped in PO_purchaseOrder_DO. Then, at (2) over an Input mapping in PO_goCheckAvailibility_RP this data is directly given to the CA_Start_SE Start Event of the CheckAvailibility Processs. The CheckAvailibility processs is synchronous, with this, we can use an Output mapping (3) to directly map the results to the Data Object PO_CatalogProperties_DO. Then, we will configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR? In isSparePartAvailible true the Distribution Process will directly called. in the other case, the Procurement Process will called by PO_goToProcurement_RP. In this exercise, you will perform the following tasks: ●
Create a Data Object PO_purchaseOrder_DO to store the incoming order data in the Purchase Order process
●
Configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR?
●
Test the Purchase Order – Check Availibility – Iflow – CatalogService
Prohibida su reproducción © Copyright. All rights reserved.
339
Unit 5: Data Flows
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Create a Data Object PO_purchaseOrder_DO to store the incoming order data in the Purchase Order process. The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. 1. Create a Data Object PO_purchaseOrder_DO to store the incoming order data in the Purchase Order process. Configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR? 1. Configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR? Test the Purchase Order – Check Availability – iFlow – CatalogService We will perform 2 test cases: ●
Test-case 1: the article number is not listed in the catalog (item can not be ordered)
●
Test-case 2: the article number is listed in the catalog (item can be ordered)
This is the data flow in this test:
Figure 324: Data Flow
This is, how the data will flow: ●
The call of the CheckAvailibility (2) process through the Purchase Order (1) is asynchronous
●
The AEX (3) is called synchronous .
●
The CatalogService (4) is called synchronous
●
The CheckAvailibility process is peformed synchronous 1. Test-case 1: the article number is not listed in the catalog (item can not be ordered). This is the process flow:
Prohibida su reproducción 340
© Copyright. All rights reserved.
Lesson: Explaining Gateways
Figure 325: Test Case 1: The Item cannot be ordered
2. Test-case 2: the article number is listed in the catalog (item can be ordered). This is the process flow:
Figure 330: Test Case 1: The Item can be ordered
Prohibida su reproducción © Copyright. All rights reserved.
341
Unit 5 Solution 11 338
Assign the CheckAvailability Process to the PO Process SP03 Business Example This is the process flow, used in this exercise:
Figure 314: Process Flow
In this exercise, we will take over the result of isSparePartAvailible and alternativeSparePart of the CheckAvailible Process into the Purchase Order Process, and with this, we control the Exclusive Choice Event, PO_areSparePartsAvailible_XOR? Creation of a Data Object PO_CatalogProperties_DO based on DT_CatalogServiceAddOn. At (1) all Data is directly mapped in PO_purchaseOrder_DO. Then, at (2) over an Input mapping in PO_goCheckAvailibility_RP this data is directly given to the CA_Start_SE Start Event of the CheckAvailibility Processs. The CheckAvailibility processs is synchronous, with this, we can use an Output mapping (3) to directly map the results to the Data Object PO_CatalogProperties_DO. Then, we will configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR? In isSparePartAvailible true the Distribution Process will directly called. in the other case, the Procurement Process will called by PO_goToProcurement_RP. In this exercise, you will perform the following tasks: ●
Create a Data Object PO_purchaseOrder_DO to store the incoming order data in the Purchase Order process
●
Configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR?
●
Test the Purchase Order – Check Availibility – Iflow – CatalogService
Prohibida su reproducción 342
© Copyright. All rights reserved.
Lesson: Explaining Gateways
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Create a Data Object PO_purchaseOrder_DO to store the incoming order data in the Purchase Order process. The substeps of this step are already described in greater detail in a previous exercise. Here you find a short overview. 1. Create a Data Object PO_purchaseOrder_DO to store the incoming order data in the Purchase Order process. a) Choose the Purchase Order process. There create a Data Object, and name it PO_CatalogProperties_DO, assign the Datatype DT_CatalogServiceAddOn b) Assign Data type DT_CatalogServiceAddOn - urn:bit800:xx:com.
Figure 315: PO_CatalogProperties_DO
c) Choose PO_goCheckAvailibility_RP . Create a 1:1 input Mapping from PO_purchaseOrder_DO to MT_CA_startProcess/PurchaseOrder.
Figure 316: PO_goCheckAvailability_RP Input Mapping
d) Choose PO_goCheckAvailibility_RP . Create a 1:1 output Mapping from MT_CA_startProcess /CatalogProperties to PO_CatalogProperties_DO.
Figure 317: PO_goCheckAvailability_RP Output
e) Create Arrows
Prohibida su reproducción © Copyright. All rights reserved.
343
Unit 5: Data Flows
Figure 318: Data Flow
f) Choose Save. Configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR? 1. Configure the Exclusive Choice Gateway PO_areSparePartsAvailible_XOR? a) Switch to the Process Development perspective. b) Under [LocalDevelopment] bit800_xx/pm/Process Modeling /Processes / Purchase Order choose PO_areSparePartsAvailible_XOR?. c) Choose Condition Evaluation. Here in the tranch set the flag at Default Gateway which shows to PO_goToDistribution_RP . The direct order is the default path. Note, a little note is made. d) Check, if YES is displayed at the default branch and shows up in the second row of the condition evaluation. Here, the default gate is noted, too.
Figure 319: Exclusive Choice Gateway PO_areSparePartsAvailable_XOR?
e) Mark the first row and choose Edit.
Figure 320: Condition Expression
Prohibida su reproducción 344
© Copyright. All rights reserved.
Lesson: Explaining Gateways
f) From the context menu, choose Context PO_CatalogProperties_DO/isSparePartAvailible and drag it to the right, replacing the default entry. g) The value is boolean and can include true or false. At the beginning, place an exclamation mark. h) If the CatlogService in the isSparePartAvailible field displays false, then the article is not available in the Catalog, and the NO branch must processed. but this means, that true should be here. The resolution is the use of the exclamation mark before the value. i) Choose OK.
Figure 321: New Condition
j) The last row, must be marked at Default Gate . This case is always true.
Figure 322: Exclusive Choice Gateway PO_areSparePartsAvailable_XOR?
k) Now, rename the rows: ●
The first target, (NO) is called call supplier
●
The second target,(YES) is called directly ordered
l) To change the name, click onto the recent value, e.g. No and simply overwrite it. m) In the diagram, the names of the rows, are linked to directions. Now fix the directions. n) The result should look like the following:
Prohibida su reproducción © Copyright. All rights reserved.
345
Unit 5: Data Flows
Figure 323: Change Condition’s Names
o) Choose Save. p) Build and deploy. Test the Purchase Order – Check Availability – iFlow – CatalogService We will perform 2 test cases: ●
Test-case 1: the article number is not listed in the catalog (item can not be ordered)
●
Test-case 2: the article number is listed in the catalog (item can be ordered)
This is the data flow in this test:
Figure 324: Data Flow
This is, how the data will flow: ●
The call of the CheckAvailibility (2) process through the Purchase Order (1) is asynchronous
●
The AEX (3) is called synchronous .
●
The CatalogService (4) is called synchronous
●
The CheckAvailibility process is peformed synchronous
Prohibida su reproducción 346
© Copyright. All rights reserved.
Lesson: Explaining Gateways
1. Test-case 1: the article number is not listed in the catalog (item can not be ordered). This is the process flow:
Figure 325: Test Case 1: The Item cannot be ordered
a) In a browser enter http://nwktdc00.wdf.sap.corp:50000/wsnavigator to start the WSNavigator. b) In the next screen, flag Provider System and search for PO_StartProcess c) Enter the following data: Field
Value
sparePartNo
500
quantity
1
firstName
Peter
lastName
Alexander
phoneNo
123456
email
[email protected]
city
Heidelberg
street
Elmsstreet
postalCode
12345
houseNumber
12
It should look like:
Prohibida su reproducción © Copyright. All rights reserved.
347
Unit 5: Data Flows
Figure 326: Test Case 1–Data
d) The call is asynchronous, so there is no response.
Figure 327: Result
e) Result: additionally the procurement process should be performed. At the end, all possible processes are performed. Figure 328: Manage Processes
f) We expect that the isSparePartAvailible field is false . The flag at true is not set. We expect the alternativeSparePart field to be 9999 .These fields are displayed, after having executed Manage Process in Context Data in the PO_CatalogProperties_DO process.
Figure 329: Context Data
2. Test-case 2: the article number is listed in the catalog (item can be ordered). This is the process flow:
Prohibida su reproducción 348
© Copyright. All rights reserved.
Lesson: Explaining Gateways
Figure 330: Test Case 1: The Item can be ordered
a) In a browser enter http://nwktdc00.wdf.sap.corp:50000/wsnavigator to start the WSNavigator. b) Enter the following data: Field
Value
sparePartNo
600
quantity
1
firstName
Peter
lastName
Alexander
phoneNo
123456
email
[email protected]
city
Heidelberg
street
Elmsstreet
postalCode
12345
houseNumber
12
It should look like:
Figure 331: Test Case 2 — Data
Prohibida su reproducción © Copyright. All rights reserved.
349
Unit 5: Data Flows
c) We expect that the isSparePartAvailible field is true. The flag at true is set. In the alternativeSparePart field is 600. These fields are displayed, after having executed Manage Process in Context Data in the PO_CatalogProperties_DO process
Figure 332: Manage Processes — Context
d) All in all, only 2 process, the PO and the distribution process are performed. Figure 333: Manage Processes — Executed Processes
Prohibida su reproducción 350
© Copyright. All rights reserved.
Lesson: Explaining Gateways
LESSON SUMMARY You should now be able to: ●
Explain gateways
Prohibida su reproducción © Copyright. All rights reserved.
351
Unit 5 Lesson 5 348
Applying Data Transformations by Using Functions LESSON OVERVIEW This lesson shows you how to apply data transformations by using functions. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Apply data transformations by using functions
Generic Functions
Figure 334: Generic Functions
Guidelines for Generic Functions ●
Allow for general data mappings and data transformation abilities
●
Supply out of the box functions for general common used cases
●
Include basic Text, Data, Boolean, Numeric, and several generic functions
Generic functions are out-of-the-box functions that provide general data mapping and data transformation capabilities for commonly used cases. These functions include text, date, boolean, and numeric. Some examples of built-in generic functions are listed below:
Prohibida su reproducción 352
© Copyright. All rights reserved.
Lesson: Applying Data Transformations by Using Functions
●
Concatenate, If the Else
●
Sub String, Equals
●
Greater, Less Than
●
Sort, Filter, Add/Subtract Date
Custom Functions Custom functions are reusable functions that you create that allow for advanced data mapping and data transformation capabilities. You can create your own custom functions that can be reused. To create a custom function, right-click on Functions.
Figure 335: Custom Functions
There are three function types: ●
Expression functions
●
Mapping functions
●
Enterprise Java Beans (EJB) functions
Expression Functions Expression functions define both input and return parameters. To create a custom expression function, use the following high level procedure: 1. Create a new expression function and define both the input and return parameters. 2. Add the expression logic by dragging the input parameter(s) from the context including the desired function. 3. To use the function go to the Mapping view and double-click on the desired field. 4. Drag your new function into the work area and add the particular input field(s) from the context. To create a custom mapping function, use the following procedure: 1. Create a new mapping function and define both the input and return parameters.
Prohibida su reproducción © Copyright. All rights reserved.
353
Unit 5: Data Flows
2. Perform the necessary mapping, or use additional built-in expression functions. 3. To use the function, go to the Mapping view and double-click the desired field. 4. Drag your new function into the work area and add the particular input field(s) from the context. Custom EJB Function To create a custom EJB function, use the following procedure: 1. Create a new EJB function and define both the input and return parameters. 2. Select any existing EJB project to add the EJB, or select the existing service composer project. 3. Add the necessary Java code to the EJB. 4. Drag your new function into the work area and add the particular input fields from the context.
Custom and Generic Function Results
Figure 336: Final Result--Custom and Generic Functions
The mapping functions deliver various outputs, as shown in the figure, Final Result--Custom and Generic Functions. In the first example shown, a mapping function concatenates values. In the second example, a built-in function cuts away the information about data and year. In the third example, a EJB function adds information to a delivered field value. In the fourth example, the built-in functions select the largest order of the orders section.
Operation Mappings Import It is possible to import graphical, XSLT, and Java operation mappings defined in the Enterprise Service Repository (ESR) of SAP Process Integration (PI) and assign them to automated activities in a Business Process Management (BPM) process. Values and parameterized
Prohibida su reproducción 354
© Copyright. All rights reserved.
Lesson: Applying Data Transformations by Using Functions
mappings are not supported during import. After a successful import, the mapping can be used in an automated activity. Operation mappings cannot be assigned to message start events or intermediate message events. Following is the procedure for import: 1. In SAP NetWeaver Developer Studio (NWDS), go to the Process Development perspective. 2. Choose a product, then choose Process Modeling, then expand Operation Mappings (PI). 3. In the context menu, choose Import Operation Mapping. 4. In the ESR Login dialog box, enter the user name and password for the system on which ESR is installed. SAP NWDS connects to the ESR. The Enterprise Service browser is populated with content available in the ESR. 5. Expand a software component, namespace, and operation mappings, then choose an operation mapping to import and choose Finish. The operation mapping appears in the Operation Mappings (PI) folder, while the WSDL file appears in the WSDL folder. It is now possible to assign the operation mapping to an automated activity in a process. To Import Operation Mappings from Enterprise Services Repository (ESR) 1. Create the operation mapping in ESR. 2. Import the WSDL of Operation Mapping by using the Process Development perspective. 3. Switch back to the Composite Designer perspective 4. Create an Automated Activity in BPM to reference the imported WSDL. 5. Under Properties → Interface assign the imported mapping as Service interface Properties → Interface. 6. Create a new Service Reference using the type "WS" and “localhost“ and the local Provider System field flagged. 7. Create the Input and Output Mappings. This is to do the following: ●
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.
LESSON SUMMARY You should now be able to: ●
Apply data transformations by using functions
Prohibida su reproducción © Copyright. All rights reserved.
355
Unit 5 Lesson 6 352
Outlining Notification Activities for PO
LESSON OVERVIEW This lesson outlines notification activities for PO. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain notification activities
Notification Activities Overview A notification is a specific type of activity that you model as a separate step in your business process. When the process flow reaches this step, an email is sent to notify selected recipients that a specific event has happened or some activity has been completed in previous process steps. Emails can be dynamic, keeping process data and results current. You can use notification activities in many places in the process model depending on which activities and events you want the process to send notifications about.
Notification Activities Modeling Tasks A notification is a specific type of activity that is modeled as a separate step in your process model. When the process flow reaches this step, an e-mail is sent to notify selected recipients that a specific event has happened or some activity has been completed in previous process steps. You can use notification activities in many places in the process model, depending on which activities and events you want the process to send notifications about.
Recipients When you model notifications, you have to define the recipients of the email. Recipients can be users, groups, or roles from the User Management Engine (UME). An e-mail can be sent to users in the UME or to external recipients. You can also define recipients with an expression. Emails are sent in plain text. You can customize the subject and the text of the e-mail using text variables from the data objects in the process context.
Regular Expressions to Find Mail Recipients You can specify the UME principals by using either the Principal or Expression attribute. By using the Principal attribute, you can select a user, role, and group. By using the Expression attribute, you can dynamically evaluate the recipients based on a context elements, rules, and functions.
Prohibida su reproducción 356
© Copyright. All rights reserved.
Lesson: Outlining Notification Activities for PO
Figure 337: Possible Entries for Assigning Mail Recipients
Flexible Mail Recipient Searching with Variables The expression is a combination of values, variables and functions that are evaluated at runtime to produce a new value. You can create expressions in an expression editor using a subset of the XML Path Language (XPath) grammar.
Figure 338: Variables in the Mail Editor
The expression editor contains a context and functions needed. The context contains all the data, relevant for the expression scope. You can use the functions to process the data from the context.
How to Extend the PO Process with Email Communication with the Customer For the demonstration steps, see the exercise, Extend the PO Process with Email Communication with the Customer.
Prohibida su reproducción © Copyright. All rights reserved.
357
Unit 5: Data Flows
Prohibida su reproducción 358
© Copyright. All rights reserved.
Unit 5 Exercise 12 355
Extend the PO Process with E-Mail Communication with the Customer SP03 Business Example In this exercise, we will extend the PO process with an email communication. General information about email communication can be found under: http://help.sap.com/saphelp_nw75/ helpdata/de/e4/32ff7865fa483dba3686160f5c6dd0/frameset.htm. In this exercise, we want to inform the customer by email, that the order was successful. The name and the e-mail address are displayed in the order request, which started the Purchase Order Process.
Figure 339: Exercise New Notification Activity
You will perform the following tasks: ●
Create a notification Activity, PO_informCustomer_successfulDelivery_NA, to PO_goToDistribution_RP
●
Use a Function to Read the User from PO_purchaseOder_DO and set it as Recipient
●
Create the salutation and the text of the email in PO_informCustomer_successfulDelivery_NA
●
Test the process and check the e-mail
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Create a notification Activity, PO_informCustomer_successfulDelivery_NA after the PO_goToDistribution_RP step 1. Create a notification Activity step, called PO_informCustomer_successfulDelivery_NA, after the PO_goToDistribution_RP step and before the PO_End_EE step.
Use a Function to Read the User from PO_purchaseOder_DO and set it as Recipient 1. Use a Function to Read the User from PO_purchaseOder_DO and set it as Recipient of the email.
Prohibida su reproducción © Copyright. All rights reserved.
359
Unit 5: Data Flows
Create the salutation and the text of the email in PO_informCustomer_successfulDelivery_NA 1. Create the salutation and the text of the email in PO_informCustomer_successfulDelivery_NA. Test the E-mail Reception 1. Perform the email setup, if not done in a previous step 2. Perform the same tests as in the previous exercise 3. Start the eMail account
Prohibida su reproducción 360
© Copyright. All rights reserved.
Unit 5 Solution 12 357
Extend the PO Process with E-Mail Communication with the Customer SP03 Business Example In this exercise, we will extend the PO process with an email communication. General information about email communication can be found under: http://help.sap.com/saphelp_nw75/ helpdata/de/e4/32ff7865fa483dba3686160f5c6dd0/frameset.htm. In this exercise, we want to inform the customer by email, that the order was successful. The name and the e-mail address are displayed in the order request, which started the Purchase Order Process.
Figure 339: Exercise New Notification Activity
You will perform the following tasks: ●
Create a notification Activity, PO_informCustomer_successfulDelivery_NA, to PO_goToDistribution_RP
●
Use a Function to Read the User from PO_purchaseOder_DO and set it as Recipient
●
Create the salutation and the text of the email in PO_informCustomer_successfulDelivery_NA
●
Test the process and check the e-mail
In this exercise, when the values include ## or xx, replace the characters with the group-number, your instructor assigned to you. Create a notification Activity, PO_informCustomer_successfulDelivery_NA after the PO_goToDistribution_RP step 1. Create a notification Activity step, called PO_informCustomer_successfulDelivery_NA, after the PO_goToDistribution_RP step and before the PO_End_EE step. a) Create a Flow object of the Type Notification Activity and name it PO_informCustomer_successfulDelivery_NA. b) Place it between PO_goToDistribution_RP and PO_End_EE steps
Prohibida su reproducción © Copyright. All rights reserved.
361
Unit 5: Data Flows
Figure 340: Notification Activity
Use a Function to Read the User from PO_purchaseOder_DO and set it as Recipient 1. Use a Function to Read the User from PO_purchaseOder_DO and set it as Recipient of the email. a) Select PO_informCustomer_successfulDelivery_NA —> Properties —> To. Select the radio button Use an expression. b) Choose Edit to start the Expression Editor. c) Below Rules and Functions choose the function getExternalUser and drag it to the free area. Alternatively perform a double-click on it. d) Manually create an open bracket. e) Then choose email in Context/PO_purchaseOrder_DO/customer/ and drag it to the left side. f) write:comma “English” comma “Eastern Standard Time”. Then manually add a closing bracket. Example: getExternalUser(PO_purchaseOrder_DO/customer/ email,"English","Eastern Standard Time") g) Choose Ok, then choose Save. h) This is the result in PO_informCustomer_successfulDelivery_NA.
Figure 341: Expression Editor
Create the salutation and the text of the email in PO_informCustomer_successfulDelivery_NA 1. Create the salutation and the text of the email in PO_informCustomer_successfulDelivery_NA.
Prohibida su reproducción 362
© Copyright. All rights reserved.
Lesson: Outlining Notification Activities for PO
a) Navigate to PO_informCustomer_successfulDelivery_NA —> Properties —> Mail. b) In the Variables area, click Add twice. Two rows, filled with standard values, will be created.
Figure 342: Notification Activity — Variables
c) Choose Variable 0 and change the name to sparePartNo. d) Choose Variable 1 and change the name to CustomerName.
Figure 343: Notification Activity — Variables 2
e) Select the first row, then choose Edit.. to call the Expression Editor. Choose Context/ PO_purchaseOrder_DO/sparePartNo and drag it to the left side. Then choose OK. f) Select the second row, then choose Edit... Choose Context/PO_purchaseOrder_DO/ customer/lastName and drag it to the left side. Then choose OK.
Figure 344: Variable Expression
g) In the Parameterized Texts —> Subject area, enter the following: ●
●
Dear, then choose CTRL+ Space Bar open the menu with the available variables. Choose {CustomerName} In the Message field, enter: Your sparePart with the number: {sparePartNo} will be deliverd as soon as possible. Probably in 1-2 days. Best regards your store.
Prohibida su reproducción © Copyright. All rights reserved.
363
Unit 5: Data Flows
Figure 345: E-mail Text
h) Choose Save. i) Build and Deploy. Test the E-mail Reception 1. Perform the email setup, if not done in a previous step a) Navigatie to Windows Start → all Programs → Initialize Course → BPM → Initialize BIT800. b) A Script will create an eMail adress as account. This may take a while. c) The script will create an email-adress like this: [email protected]. This address is used by the call of the Purchase Order Process as customer. 2. Perform the same tests as in the previous exercise a) Start the WS Navigator and search PO_startProcess. b) Start it with at least the following data: Field
Value
sparePartNo:
600
postalCode:
1234
email:
[email protected]
lastName:
your Name
3. Start the eMail account a) Start Windows Live Mail under Windows Start → all Programs → Windows Live Mail b) In Windows Mail, choose the Send/Receive button, to receive the mail. The result:
Prohibida su reproducción 364
© Copyright. All rights reserved.
Lesson: Outlining Notification Activities for PO
Figure 346: E-mail
Prohibida su reproducción © Copyright. All rights reserved.
365
Unit 5: Data Flows
LESSON SUMMARY You should now be able to: ●
Explain notification activities
Prohibida su reproducción 366
© Copyright. All rights reserved.
Unit 5 Lesson 7 363
Configuring and Using Reporting Activities for PO LESSON OVERVIEW This lesson shows you how to configure and use reporting activities for PO. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Add report activities to a business process
Report Activity Overview Report activities allow you to collect real-time task and process context data for reporting. Reports can be generated from any data source in the business process. Data sources are defined through input and output mapping.
Report Activity Modeling Tasks
Figure 347: Report Activities Modeling Tasks
For reporting activities to successfully collect data, data input and output mappings must be defined. Tasks and processes must also be configured to collect and analyze the appropriate data for a report. Reporting Data Types ●
●
Generic Process Data — Processes and task instance data, Meta data for process and task definitions Process Context Data — Defined as part of the process model (for example, business payload data)
Prohibida su reproducción © Copyright. All rights reserved.
367
Unit 5: Data Flows
Design Time Report Data Sources BPM Reporting Data Sources ●
Ability to add process context data to a custom data source table
●
Use Visual Composer to create light-weight analytic dashboards to visual data
●
Provides data extraction to Business Intelligence (BI)
Figure 348: BPM Reporting Data Sources — Design Time
BPM Generic Reporting Data Sources with SAP NetWeaver Visual Composer ●
Functionality available using the Visual Composer browser version
●
Provides data extraction to BI
●
Real-time data
Prohibida su reproducción 368
© Copyright. All rights reserved.
Lesson: Configuring and Using Reporting Activities for PO
Figure 349: BPM Generic Reporting Data Sources — SAP NetWeaver Visual Composer
BPM Generic Data Sources with SAP NetWeaver Visual Composer ●
Predefined list of generic data sources regarding real-time processes and task instances
●
Provides data extraction to BI
Figure 350: BPM Generic Data Sources--SAP NetWeaver Visual Composer
Prohibida su reproducción © Copyright. All rights reserved.
369
Unit 5: Data Flows
Report Data Sources ●
Process context data
●
Task context data
●
Visual Composer
LESSON SUMMARY You should now be able to: ●
Add report activities to a business process
Prohibida su reproducción 370
© Copyright. All rights reserved.
Unit 5
367
Learning Assessment
1. What is process context? Choose the correct answer. X
A It provides additional information to the process model.
X
B It attaches notes to elements in a process model.
X
C It defines the sequence of the process flow.
X
D It stores data from events and activities.
2. Which statements about process context are true? Choose the correct answers. X
A It is modeled in the business process.
X
B It includes information from events and activities.
X
C It includes information about roles.
X
D An XSD file adds functionality and is optional.
3. What is data mapping used for? Choose the correct answer. X
A Transforming process context to a source context
X
B Transforming target context to a source context
X
C Transforming business context to a target context
X
D Transforming source context to a target context
Prohibida su reproducción © Copyright. All rights reserved.
371
Unit 5: Learning Assessment
4. Values and parameterized mappings are supported during the mapping import. Determine whether this statement is true or false. X
True
X
False
Prohibida su reproducción 372
© Copyright. All rights reserved.
Unit 5
369
Learning Assessment - Answers
1. What is process context? Choose the correct answer. X
A It provides additional information to the process model.
X
B It attaches notes to elements in a process model.
X
C It defines the sequence of the process flow.
X
D It stores data from events and activities.
2. Which statements about process context are true? Choose the correct answers. X
A It is modeled in the business process.
X
B It includes information from events and activities.
X
C It includes information about roles.
X
D An XSD file adds functionality and is optional.
3. What is data mapping used for? Choose the correct answer. X
A Transforming process context to a source context
X
B Transforming target context to a source context
X
C Transforming business context to a target context
X
D Transforming source context to a target context
Prohibida su reproducción © Copyright. All rights reserved.
373
Unit 5: Learning Assessment - Answers
4. Values and parameterized mappings are supported during the mapping import. Determine whether this statement is true or false. X
True
X
False
Prohibida su reproducción 374
© Copyright. All rights reserved.
UNIT 6
Other Objects
Lesson 1 Explaining Process Modes
376
Lesson 2 Explaining the Various UIs and Tasks Exercise 13: Extend the PO Process by a User Interaction with a Support Employee SP03
378 389
Lesson 3 Explaining Further Objects Exercise 14: Create the iFlow CallSupplierService_asyn_## SP03
411 417
UNIT OBJECTIVES ●
Explain the process modes
●
Explain the various UIs and tasks
●
Create a user interface with SAPUI5
●
Create tasks
Prohibida su reproducción © Copyright. All rights reserved.
375
Unit 6 Lesson 1 372
Explaining Process Modes
LESSON OVERVIEW This lesson explains the process modes. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain the process modes
Synchronous and Asynchronous Processes A process can be either synchronous or asynchronous. Synchronous Process When executing a synchronous process, the process may respond with a response message. At design time this response message is provided using the input mapping of the message end event. The response message is sent once when the first token reaches the message end event. The initiator waits synchronously during the time frame that is required to execute the process between the start and message end event. To model a synchronous process, you need to create a WSDL file (service interface definition) that has an operation with input and output parameters. To provide process context data back to the process initiator, the output parameter of the WSDL operation can be filled with the input mapping of the message end event. Synchronous Process Parameters ●
The process may respond with a response message.
●
The response is provided using the input mapping of the message end event.
●
The response message is sent once when the first token reaches the message end event.
●
The initiator waits for the process to execute from start to the message end event.
●
To model a synchronous process, you need a service interface definition with an operation containing input and output parameters.
Parallel Split in a Synchronous Process If you have modeled a parallel split in your synchronous process, it is possible that several tokens reach the end event. When a token first receives a message end event, the response is sent back synchronously from that message end event to the process initiator. If the end event is not a terminating event (the Terminating option is not selected in the end event properties) the process continues asynchronously if there is at least one other token left. Once the process instance has responded with a message end event for the first token, no further response is sent.
Prohibida su reproducción 376
© Copyright. All rights reserved.
Lesson: Explaining Process Modes
Parameters for a Parallel Split in a Synchronous Process ●
A parallel split in a synchronous process may have several tokens reaching the end event.
●
When a token first receives a message end event, the response is sent back synchronously.
●
Once the process instance has responded for the first token, no further response is sent, although there are additional tokens remaining — the process continues asynchronously.
We recommend that you do not model any human activities in synchronous processes because of several timeouts (for example, from Web Service Navigator, Web Service Client, BPM runtime) with a duration of a few minutes. When a timeout occurs outside BPM, an HTTP error is returned and the process runs asynchronously. If the process server notices that a timeout has occurred, the process is terminated with an error that is described in the default trace. Synchronous processes run synchronously if you initiate them through a web service call. Otherwise, processes modeled as synchronous processes are executed asynchronously if you start them in the Process Repository or with the Debugger. Asynchronous Process The process does not send a response message in an asynchronous process. The initiator of an asynchronous process is not kept waiting for a response. To model an asynchronous process, you only need to define input parameters for the operation in the assigned WSDL file. Asynchronous Process Parameters ●
The process does not send a message response.
●
The initiator is not kept waiting for a response.
●
To model an asynchronous process, you need a service interface definition with an operation containing input parameter.
LESSON SUMMARY You should now be able to: ●
Explain the process modes
Prohibida su reproducción © Copyright. All rights reserved.
377
Unit 6 Lesson 2 374
Explaining the Various UIs and Tasks
LESSON OVERVIEW This lesson explains the various UIs and tasks. It also describes how to create a user interface with SAPUI5. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain the various UIs and tasks
●
Create a user interface with SAPUI5
Different Kinds of UIs During the process flow, a human interaction might be required. For example, you might be triggered to enter ordered amounts of goods or other details. The human interaction is started by a task and the task may start a human interface. In general, the following technologies can be used for creating a UI: ●
Visual Composer
●
Web Dynpro
●
JSP/Servlet
●
UI 5 Objects
Table 8: Technologies Used to Create a UI Technologies Used to Create a UI
Value
Visual Composer
Intended for the use of Visual Composer as the technology to develop your UIs or screens. From the context of SAP BPM, it can be used to develop Web pages to support human tasks and be linked to the UWL. This is a lightweight alternative to Web Dynpro. Note that Visual Composer is an SAP proprietary technology.
Prohibida su reproducción 378
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Technologies Used to Create a UI
Value
Web Dynpro
Used for the development of Web Dynpro components as the technology to develop your UIs or screens. From the context of SAP BPM, it can be used to develop to the UWL. Web Dynpro is a fully fleshed out UI technology alternative to Visual Composer. Note that Web Dynpro is an SAP proprietary technology.
JSP/Servlet
Used to develop a UI using JSP or Servlet. JSO and Servlet are fully fleshed out UI technologies. Note that JSP/Servlet are not SAP proprietary technologies.
Web Dynpro Overview Declarative programming means specifying what should be achieved instead of specifying how to achieve it. In user interfaces, a declarative approach is especially profitable because there are so many services in a UI that can be standardized. This approach is driven by metadata. Once a good metadata model is established, it is easy to add more and more services that use the metadata. The Web Dynpro programming paradigm includes the following building blocks: ●
Model-View controller architecture The model encapsulates the business logic and persistence. The view displays data supplied by controllers. The controller handles events, model interaction, and view navigation.
●
Generic UI services Offers value help and message management. Provides flexible tools for user selection of data.
●
Emphasis on declaration - UI coding virtually nil Declaration of UI-design and screen flow (navigation). Declaration of runtime data structures and data flow between UI and controllers (data-binding, context-mapping).
●
Reusable components Integrated with the SAP NetWeaver Development infrastructure. Construct web applications from reusable components.
Web Dynpro comes with a large set of standard controls that constitute common user interaction rules and a common visual design throughout the application. Each view defines a layout for part of the screen as an arrangement of atomic controls. Many controls automatically provide generic services on their data, for example the table control scrolls through the data it displays by itself. Input controls that can handle input values of different types use many services that hinge on repository-based type information. A control can be connected to this information through its data-binding. Based on type information, the Web Dynpro runtime automatically chooses the right way to provide value help. When there are only a small number of alternatives, a dropdown menu is the solution of choice. If the number of alternatives gets larger, pop-up lists provide the best value help. If the input is a special type, for example a calendar date, a special calendar control helps the user to select the right input. After the user chooses an input value, the runtime validates and
Prohibida su reproducción © Copyright. All rights reserved.
379
Unit 6: Other Objects
converts it, again using the input's business type. If the validation results in an error, the front-end can autonomously explain the problem to the user and help to fix it. In addition context-sensitive online help can be derived from the business type. Generic services are especially worthwhile as programming interfaces for Web browser-based UIs that are not completely standardized. By implementing higher-level services on top of the built-in, low-level capabilities of the browser, application developers save time because they do not need to acquire detailed expertise in Web programming languages and environments.
Figure 351: Web Dynpro Components
A Web Dynpro application is one or more Web Dynpro components that function together to provide a complete business process. Within a Web Dynpro application, one component always acts as the “root” component. This is the starting point for all functionality and is the only component that can be accessed by a URL. Application data comes from backend services and are normally accessed from models, which are generated based on the backend service definition. These data models are mainly function modules, Enterprise Java Beans (EJBs), and web services.
User Interface Generation Tasks A Web Dynpro Java UI is created the same way as a Visual Composer UI. Just select Web Dynpro instead of Visual Composer in the wizard. The new component is available and can be customized in the Web Dynpro Explorer.
Prohibida su reproducción 380
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Figure 352: Automatically Generate Web Dynpro Java UI
The generation of Web Dynpro Java follows the same steps used for generating Visual Composer.
Web Dynpro User Interface Addition
Figure 353: Web Dynpro Component Enablement for BPM
To make an existing Web Dynpro component usable by BPM, you have to alter the interface of the component. You need two things in the interface as follows: 1. The context structure consisting of the data to be transferred between Web Dynpro and BPM
Prohibida su reproducción © Copyright. All rights reserved.
381
Unit 6: Other Objects
2. An event to inform BPM that the user completed the work Then, use the following process: 1. Expose the needed context structure from the Component Controller to the Interface Controller. Only the context structure needed by BPM process must be exposed.
Figure 354: Expose Context Structure to Interface Controller
2. Define the event in the Component Controller and expose it to the Interface Controller.
Figure 355: Create Event and Copy it to the Interface Controller
3. This event is started when the user has finished the work in a method from the Component Controller. When and where the method is called depends on the Web Dynpro application.
Prohibida su reproducción 382
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Figure 356: Fire Event in Component Controller
4. Add the Web Dynpro Component to the Public Part of the Development Component so that the Web Dynpro component interface is visible to BPM.
Figure 357: Add Web Dynpro Component to Public Part
Web Dynpro User Interface Modification Web Dynpro Java modification is similar to Visual Composer. Generated UIs are generic and may have to be altered to change their appearance or behavior.
Prohibida su reproducción © Copyright. All rights reserved.
383
Unit 6: Other Objects
Figure 358: Changing a Web Dynpro Java UI
In Web Dynpro, the generated UIs are accessed using the Web Dynpro perspective of NetWeaver Developer Studio.
Figure 359: Opening the Web Dynpro Perspective
Opening the appropriate Web Dynpro component in the Web Dynpro Explorer and selecting its view, displays the View Designer. You can modify the UI from the View Designer.
Prohibida su reproducción 384
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Figure 360: Accessing the Web Dynpro Component
All UI elements contained in a view are also visible in an Outline view. Selecting elements in the View Designer or the Outline view allows you to manipulate them in the Property view.
Figure 361: Changing a UI Element
Significant functional changes may require you to alter or extend the generated coding of the Component Controller or the View Designer of the Web Dynpro Component.
Prohibida su reproducción © Copyright. All rights reserved.
385
Unit 6: Other Objects
Figure 362: Changing Generated Coding
Figure 363: Web Dynpro Interface
To ensure compatibility to the BPM process, the interface of the Web Dynpro component has to remain stable.
How to Extend the PO Process by User Interaction with Support Employee For the demonstration steps, see the exercise, Extend the PO Process by User Interaction with Support Employee.
UI Development Toolkit for HTML (SAPUI5) Technology Overview The UI development toolkit for HTML5 (SAPUI5) is a user interface technology for building and adapting client applications. This toolkit consists of libraries and a framework.
Prohibida su reproducción 386
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
The SAPUI5 runtime is a client-side HTML5 rendering library with a rich set of standard and extension controls. It provides a lightweight programming model for desktop as well as mobile applications. Based on JavaScript, it supports RIA-like client side features, complies with OpenAjax, and can be used together with standard JavaScript libraries. SAP UI5 Features ●
Support for CSS3, which allows you to adapt themes to your company's branding in an effective manner
●
Extensibility concept based regarding custom controls
●
Use of the open source jQuery library as a foundation
SAP UI5 Platforms ●
SAP HANA Cloud platform
●
SAP HANA platform
●
As User interface add-on for SAP NetWeaver ABAP AS
●
As User interface add-on for SAP NetWeaver Java AS
●
Static Open Source Web Server
Note: For more information about implementing SAPU15, see SAP note 1747308
SAPUI5 User Interface Development Different Platforms for UI Development The following options are available for using SAPU15: ●
Creating SAPUI5 applications in an HTML page
●
Creating mobile apps
●
Creating applications with SAPU15 tools
To get started with SAPU15, you can simply create an HTML page (even in Notepad, for example), or you can start using SAPU15 tools directly in Eclipse. Creating Simple SAPU15 Applications The easiest way to work with SAPUI5 is to include a set of JavaScript libraries in your HTML page. Then you can use all the controls provided by these libraries to construct one or more control trees and include them in your HTML page. The framework also supports the JavaScript Object Notation (JSON) to initialize controls with a reduced typing effort. Creating Mobile Apps with SAPU15 SAPUI5 provides an additional control library called sap.m, which is optimized for mobile devices. Create Applications using SAPU15 Tools
Prohibida su reproducción © Copyright. All rights reserved.
387
Unit 6: Other Objects
Using the SAPUI5 application tools in Eclipse, allows you to create sophisticated SAPUI5 application projects based on the Model View Controller concept. The tools provide additional features, such as SAPUI5 Snippets or JavaScript Templates. The tools also provide wizards to create SAPUI5 applications for desktop as well as for mobile devices. The toolset supports most of the standard browsers. After you have created UI5 objects, several options to deploy and run the SAPUI5 applications are available. All applications can be tested in Eclipse.
SAPUI5 User Interface Enablement SAPUI5 is a client- side Web UI library, which means that it runs in a browser. Therefore, an SAPUI5 application is composed of an HTML page and, if required, many additional files. The minimum steps required to create an SAPU15 object in an HTML page are as follows: 1. For loading the SAPU15, the bootstrap needs to be included (with a <script> tag). This can be enhanced with attributes. 2. In the code, the SAPU15 elements are created and modified. 3. Properties are added using JSON. 4. Add the UI controls. 5. Add the uiArea code. 6. Add the CSS class.
Note: For more information about SAPU15 user interface enablement, see the SAPUI5 developer guide at: https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/ 95d113be50ae40d5b0b562b84d715227.html
Prohibida su reproducción 388
© Copyright. All rights reserved.
Unit 6 Exercise 13 385
Extend the PO Process by a User Interaction with a Support Employee SP03 Business Example If the first order is not in the catalogue (sparePartNo 5xx) the field isSparePartAvailible = false is returned. In this case, the customer can discuss with a support representative directly and alternative proposals could be presented.
Figure 364: Exercise Result
In this exercise, you will perform the following steps: ●
Create a support Lane with Supervisor_xx as lane administrator
●
Create a Gateway PO_callSupport_XOR?
●
Create a user interface as a Webdynpro
●
●
Create the gateway conditions in the gateway PO_callSupport_XOR? using an External Expression function. Test the Purchase Order Process with the new support lane
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. Create a support Lane with Requestor_xx as Lane Administrator 1. In the Purchase Order Process create a new lane called Support — Requestor_xx 2. Assign Requestor_xx as the Potential Owner to the new lane Create and Configure the Gateway PO_callSupport_XOR? 1. Between PO_goCheckAvailability_RP and Po_areSparePartsAvailable_XOR? in the Purchase Order process, insert an exclusive choice gateway call itPO_areSparePartsAvailable_XOR? and also insert an unnamed uncontrolled merge.
Prohibida su reproducción © Copyright. All rights reserved.
389
Unit 6: Other Objects
2. Configure the first gate for the PO_callSupport_XOR? gateway: Alternative 1 should be renamed to sparePartsAvailable and it should be the Default Gate. 3. Add another gate for PO_callSupport_XOR?, choose a Human Activity with name PO_callSupport_HA. Connect it to the uncontrolled merge that you created before the PO_areSparePartsAvailible_XOR? gateway and place it in the Support lane 4. Rename the PO_callSupport_XOR? gate called Alternative 2 to callSupport . The condition of this gate needs to be changed to false 5. Save, build and deploy 6. Test with 5xx (not available) and with 6xx sparePartNo is available. Note: Only the default gate sparePartsAvailable will be used, at the moment the gate for the human activity PO_callSupport_HA is always false. Creation of the WebDynpro User Interface Overview of Steps: ●
Create a Task with a generated Web Dynpro UI
●
1:1 Input Mapping from PO_purchaseOrder_DO and PO_CatalogProperties_DO to TaskInput
●
1:1 Output Mapping by TaskOutput for PO_CatalogProperties_DO
●
Assign receiver for the support task
●
Send an email notification of the Support call to Requestorxx 1. Create a new task and generate the UI component type WebDynpro
Define PO_CallSupport_HA Input Mapping , Output Mapping and Send E-mail Notification 1. Define the PO_CallSupport_HA 1:1 Input Mapping of from PO_CatalogProperties_DO to TaskInput → UIRequest → Start → PO_CatalogProperties_DO and from PO_purchaseOrder_DO to TaskInput → UIRequest → Context → PO_purchaseOrder_DO 2. Define the PO_CallSupport_HA 1:1 Output Mapping of fromTaskOutput → UIResponse → SupportTaskxxCompleteEvent → PO_CatalogProperties_DO to PO_CatalogProperties and fromTaskOutput → UIResponse → SupportTaskxxCompleteEvent → PO_purchaseOrder_DO to PO_purchaseOrder_DO 3. Send an E-mail notification of the Support Task to Requestorxx Create a Condition for the Gateway PO_callSupport_XOR? as an External Function 1. Create a new expression function, use the information from the table below. Expression Function Name
callSupport_xx
Return Type
boolean — http://www.w3.org/2001/ XMLSchema
Prohibida su reproducción 390
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Expression Function Name
callSupport_xx
Parameter Name
Rename Arg1 to alternativeSparePart
Parameter Type
string — http://www.w3.org/2001/ XMLSchema
2. Maintain the Expression, add a function to check if the alternativeSparePart field contains 9999. The data will contain 9999 in the alternativeSparePart when the spare part requested is not available. 3. Assign the newly created function to the condition evaluation of thecallSupport gate of the PO_callSupport_XOR? gateway. Test the Purchase Order Process with the Support 1. Deploy the bit800_xx/pm and the bit800_xx/wd development components using the Java EE perspective. 2. Test the scenario using the WS Navigator where the support branch will be executed as alternativeSparePart=9999 and product will be change by the Support Employee.
Figure 386: Test where the Support Branch is Executed, product changed by Support Employee
3. Test the scenario using the WS Navigator where the support branch will be executed as alternativeSparePart=9999, product won’t be changed by the Support Employee and then later won’t be found.
Figure 393: Test where the Support Branch is Executed, product is not changed
4. Test the scenario using the WS Navigator where the support branch will NOT be executed as alternativeSparePart=600, Article will be found.
Prohibida su reproducción © Copyright. All rights reserved.
391
Unit 6: Other Objects
Figure 400: Test where Article is Found
Prohibida su reproducción 392
© Copyright. All rights reserved.
Unit 6 Solution 13 389
Extend the PO Process by a User Interaction with a Support Employee SP03 Business Example If the first order is not in the catalogue (sparePartNo 5xx) the field isSparePartAvailible = false is returned. In this case, the customer can discuss with a support representative directly and alternative proposals could be presented.
Figure 364: Exercise Result
In this exercise, you will perform the following steps: ●
Create a support Lane with Supervisor_xx as lane administrator
●
Create a Gateway PO_callSupport_XOR?
●
Create a user interface as a Webdynpro
●
●
Create the gateway conditions in the gateway PO_callSupport_XOR? using an External Expression function. Test the Purchase Order Process with the new support lane
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. Create a support Lane with Requestor_xx as Lane Administrator 1. In the Purchase Order Process create a new lane called Support — Requestor_xx a) In the Process Composer perspective, open your Purchase Order Process b) Right-click in your pool and choose Create Lane
Prohibida su reproducción © Copyright. All rights reserved.
393
Unit 6: Other Objects
Figure 365: Create New Lane
c) Select the new lane and in the Properties → General and change the name to Support — Requestor_xx .
Figure 366: Lane Name
2. Assign Requestor_xx as the Potential Owner to the new lane a) Select your new lane called Support — Requestor_xx and navigate to Properties → Potencial Owners b) Choose the option Choose one or more UME principals c) Select User from the list and search for Requestor_xx d) Add it to the list and choose OK. The Potential Owners tab should look like the next figure:
Figure 367: Potential Owners
e) Your process now should look like this:
Prohibida su reproducción 394
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Figure 368: Result
Create and Configure the Gateway PO_callSupport_XOR? 1. Between PO_goCheckAvailability_RP and Po_areSparePartsAvailable_XOR? in the Purchase Order process, insert an exclusive choice gateway call itPO_areSparePartsAvailable_XOR? and also insert an unnamed uncontrolled merge. a) Open your Purchase Order process and delete the connection between PO_goCheckAvailability_RP and Po_areSparePartsAvailable_XOR? b) Select the PO_goCheckAvailability_RP step and add a exclusive choice gateway and then a uncontrolled merge gateway. c) Select the new exclusive choice gateway and navigate to Properties → General and change the name to PO_callSupport_XOR?. d) Select the new uncontrolled merge gateway and navigate to Properties → General and delete the name. 2. Configure the first gate for the PO_callSupport_XOR? gateway: Alternative 1 should be renamed to sparePartsAvailable and it should be the Default Gate. a) Select Alternative1 and navigate toProperties → General and change the name to sparePartsAvailable b) Select the new PO_callSupport_XOR? gateway and navigate to Properties → Condition Evaluation c) Select theDefault Gate checkbox for the sparePartsAvailable gate.
Figure 369: sparePartsAvailable Gate
Prohibida su reproducción © Copyright. All rights reserved.
395
Unit 6: Other Objects
3. Add another gate for PO_callSupport_XOR?, choose a Human Activity with name PO_callSupport_HA. Connect it to the uncontrolled merge that you created before the PO_areSparePartsAvailible_XOR? gateway and place it in the Support lane a) Select the PO_callSupport_XOR? and using the menu add a connected Human Activity b) Select the newly created Human Activity and navigate to Properties → General change the name to PO_callSupport_HA c) Connect the PO_callSupport_HA Human Activity to the unnamed uncontrolled merge as displayed in the figure below. d) Move the Human Activity called PO_callSupport_HA to the Support Lane.
Figure 370: PO_callSupport_HA Human Activity
4. Rename the PO_callSupport_XOR? gate called Alternative 2 to callSupport . The condition of this gate needs to be changed to false a) Select the PO_callSupport_XOR? and using the menu add a connected Human Activity b) Navigate to Properties → Condition Evaluation and select thecallSupport gate. c) Choose Edit and enter false
Figure 371: callSupport Condition
5. Save, build and deploy a) Save b) Right-click over [LocalDevelopment] bit800_xx/pm and choose Development Component → Build c) Right-click over [LocalDevelopment] bit800_xx/pm and choose Development Component → Deploy
Prohibida su reproducción 396
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
6. Test with 5xx (not available) and with 6xx sparePartNo is available. Note: Only the default gate sparePartsAvailable will be used, at the moment the gate for the human activity PO_callSupport_HA is always false. a) Call thew WSNavigator http://nwktdc00.wdf.sap.corp:50000/wsnavigator b) Search for the PO_startProcess c) Enter the Invocation Parameters (User ID and Password) d) Test both scenarios as described before with sparePartNo = 500 when it is not available and sparePartNo = 600 when it is available.
Figure 372: Test Cases
e) Check processes in http://nwktdc00.wdf.sap.corp:50000/nwa/bpm-processes Creation of the WebDynpro User Interface Overview of Steps: ●
Create a Task with a generated Web Dynpro UI
●
1:1 Input Mapping from PO_purchaseOrder_DO and PO_CatalogProperties_DO to TaskInput
●
1:1 Output Mapping by TaskOutput for PO_CatalogProperties_DO
●
Assign receiver for the support task
●
Send an email notification of the Support call to Requestorxx 1. Create a new task and generate the UI component type WebDynpro a) Open your Purchase Order process b) Select your PO_callSupport_HA human activity and navigate to Properties → Task and choose New Task from the drop down menu. You will get the following pop up:
Prohibida su reproducción © Copyright. All rights reserved.
397
Unit 6: Other Objects
Figure 373: New Task
c) Enter SupportTaskxx as the name and check the Generated UI Component and choose Next
Figure 374: New Task — UI Component
d) In UI Technology choose WebDynpro e) For the Development Component choose New. Expand LocalDevelopment and select your SC_BIT800_xx and choose Next. f) In the New Development Compoment enter sap.education.com as the Vendor and bit800_xx/wd as the name
Figure 375: New Development Component
g) The new Development Component bit80–0_xx/wd is now assigned to the Task
Prohibida su reproducción 398
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Figure 376: UI Technology
h) Choose Next twice i) In the Process Context select the PO_purchaseOrder_DO and PO_CatalogProperties_DO nodes with all the sub-nodes and elements.
Figure 377: Process Context
j) Choose Finish. A new Development Component with a Web Dynpro Component has been created. k) Change to the Web Dynpro Perspective with Window → Open Perspective → Other → Web Dynpro l) Open the SupportTaskxxComponentView under Web Dynpro → Components → SupportTaskxxComponent → Views m) Have a look at the generated UI
Prohibida su reproducción © Copyright. All rights reserved.
399
Unit 6: Other Objects
Figure 378: Generated Web Dynpro UI
Note: No further changes are necessary, here you could adapt the UI if needed. Define PO_CallSupport_HA Input Mapping , Output Mapping and Send E-mail Notification 1. Define the PO_CallSupport_HA 1:1 Input Mapping of from PO_CatalogProperties_DO to TaskInput → UIRequest → Start → PO_CatalogProperties_DO and from PO_purchaseOrder_DO to TaskInput → UIRequest → Context → PO_purchaseOrder_DO a) In the perspective Process Development open the properties of the PO_CallSupport_HA human activity b) Open the Input Mapping c) Perform 1:1 mapping using the Execute Default Matcher from PO_CatalogProperties_DO to TaskInput → UIRequest → Start → PO_CatalogProperties_DO and from PO_purchaseOrder_DO to TaskInput → UIRequest → Context → PO_purchaseOrder_DO Note:
To use the Default Matcher drag and drop the node using the secondary button of the mouse (normally right-click).
Figure 379: Input Mapping
2. Define the PO_CallSupport_HA 1:1 Output Mapping of fromTaskOutput → UIResponse → SupportTaskxxCompleteEvent → PO_CatalogProperties_DO to PO_CatalogProperties and
Prohibida su reproducción 400
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
fromTaskOutput → UIResponse → SupportTaskxxCompleteEvent → PO_purchaseOrder_DO to PO_purchaseOrder_DO a) In the perspective Process Development open the properties of the PO_CallSupport_HA human activity b) Open the Output Mapping c) Perform 1:1 mapping using the Execute Default Matcher from TaskOutput → UIResponse → SupportTaskxxCompleteEvent → PO_CatalogProperties_DO to PO_CatalogProperties and fromTaskOutput → UIResponse → SupportTaskxxCompleteEvent → PO_purchaseOrder_DO to PO_purchaseOrder_DO Note: To use the Default Matcher drag and drop the node using the secondary button of the mouse (normally right-click).
Figure 380: Output Mapping
Note:
Define Receiver of the Support Activity. It is sufficient to define the Lane Administrator, because it overrides everything else. This was already done in a previous exercise 3. Send an E-mail notification of the Support Task to Requestorxx a) In the Process Development Perspective go to Process Modeling → Tasks → SupportTasksxx open the Overview tab b) In General Information → Notification select the Send Custom e-mail notification to Potential Owners
Prohibida su reproducción © Copyright. All rights reserved.
401
Unit 6: Other Objects
Figure 381: Send Custom e-mail notification to Potential Owners
Create a Condition for the Gateway PO_callSupport_XOR? as an External Function 1. Create a new expression function, use the information from the table below. Expression Function Name
callSupport_xx
Return Type
boolean — http://www.w3.org/2001/ XMLSchema
Parameter Name
Rename Arg1 to alternativeSparePart
Parameter Type
string — http://www.w3.org/2001/ XMLSchema
a) In the Process Development perspective under Process Modeling → Functions right-click and choose New Expression Function to open the wizard. b) Enter the Name and Return Type from the table. c) Add a new line to the Parameters table and enter the info from the table above.
Figure 382: New Expression Function
d) Choose Finish 2. Maintain the Expression, add a function to check if the alternativeSparePart field contains 9999. The data will contain 9999 in the alternativeSparePart when the spare part requested is not available.
Prohibida su reproducción 402
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
a) Choose the Expression tab. b) Use the filter to find the contains function and drag and drop it in the expression area. c) Add a ( after the contains function d) In the context find the alternativeSparePart and drag and drop it in the expression e) Then finish the expression with ,”9999”): contains(alternativeSparePart,”9999”).
Figure 383: Expression
f) Save. 3. Assign the newly created function to the condition evaluation of thecallSupport gate of the PO_callSupport_XOR? gateway. a) Go back to the Purchase Order process and navigate to PO_callSupport_XOR? → Properties → Condition Evaluation b) Select the row for the callSupport gate and choose Edit. c) Delete any expression that you already have and find your new function under Rules and Functions → sap.education.com/bit800_xx/pm, drag and drop it into the editor. d) Find in the context the PO_CatalogProperties_DO/alternativeSparePart . Your expression should look like this: callSupport_xx(PO_CatalogProperties_DO/ alternativeSparePart) e) Choose OK.
Figure 384: PO_callSupport_XOR? gateway Configuration
Test the Purchase Order Process with the Support 1. Deploy the bit800_xx/pm and the bit800_xx/wd development components using the Java EE perspective.
Prohibida su reproducción © Copyright. All rights reserved.
403
Unit 6: Other Objects
a) Open the Java EE perspective, you should be able to see all of your Development Components. b) Right click over the [Local Development] bit800_xx/pm and choose Development Component → Deploy. Check the Development Console c) Right click over the [Local Development] bit800_xx/wd and choose Development Component → Deploy. Check the Development Console
Figure 385: Deploy DCs
2. Test the scenario using the WS Navigator where the support branch will be executed as alternativeSparePart=9999 and product will be change by the Support Employee.
Figure 386: Test where the Support Branch is Executed, product changed by Support Employee
a) Call the Web Service Navigator by entering http://nwktdc00.wdf.sap.corp:50000/ wsnavigator b) Search in Provider System and enter PO_StartProcess and then choose Go.Enter the Invocation Parameters if needed. c) Test the scenario with data similar to the figure, make sure for sparePartNo = 500, it should go to support.
Figure 387: Test Data
Prohibida su reproducción 404
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
d) Check in /nwa Manage Processes and find your current instance, it should be in status In Progress. Choose Show → Process Flow.
Figure 388: Manage Processes
e) The process has a green light showing where it is at the moment.
Figure 389: Process Flow
f) Open your Windows Mail for Requestorxx. You should have a notification of a new task.
Figure 390: Requestorxx E-mail
g) Close all browser windows and click on the first link in the e-mail to access the task directly. h) Enter the following values: ●
alternativeSparePart: 600
●
isSparePartAvailable: checked
●
sparePartNo: 600
Prohibida su reproducción © Copyright. All rights reserved.
405
Unit 6: Other Objects
Figure 391: SupportTask UI
i) Choose Approve. j) Login to /nwa with Administratorxx and go to Manage Processes and look under the Context Data of your process instance weather the values have been adopted. In this case the process should execute only the Distribution and CheckAvailability sub-processes.
Figure 392: Manage Processes — Context Data
3. Test the scenario using the WS Navigator where the support branch will be executed as alternativeSparePart=9999, product won’t be changed by the Support Employee and then later won’t be found.
Figure 393: Test where the Support Branch is Executed, product is not changed
Prohibida su reproducción 406
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
a) Call the Web Service Navigator by entering http://nwktdc00.wdf.sap.corp:50000/ wsnavigator b) Search in Provider System and enter PO_StartProcess and then choose Go. Enter the Invocation Parameters if needed. c) Test the scenario with data similar to the figure, make sure for sparePartNo = 500, it should go to support.
Figure 394: Test Data
d) Check in /nwa Manage Processes and find your current instance, it should be in status In Progress. Choose Show → Process Flow.
Figure 395: Manage Processes
e) The process has a green light showing where it is at the moment.
Figure 396: Process Flow
f) Open your Windows Mail for Requestorxx. You should have a notification of a new task.
Prohibida su reproducción © Copyright. All rights reserved.
407
Unit 6: Other Objects
Figure 397: Requestorxx E-mail
g) Close all browser windows and click on the first link in the e-mail to access the task directly. h) Enter the following values: ●
alternativeSparePart: Do not changed
●
isSparePartAvailable: Do not changed
●
sparePartNo: Do not changed
Figure 398: SupportTask UI
i) Choose Approve. j) Login to /nwa with Administratorxx and go to Manage Processes and look under the Context Data of your process instance. In this case the process should execute the Distribution, the Procurement and CheckAvailability sub-processes.
Figure 399: Manage Processes
4. Test the scenario using the WS Navigator where the support branch will NOT be executed as alternativeSparePart=600, Article will be found.
Prohibida su reproducción 408
© Copyright. All rights reserved.
Lesson: Explaining the Various UIs and Tasks
Figure 400: Test where Article is Found
a) Call the Web Service Navigator by entering http://nwktdc00.wdf.sap.corp:50000/ wsnavigator b) Search in Provider System and enter PO_StartProcess and then choose Go. Enter the Invocation Parameters if needed. c) Test the scenario with data similar to the figure, make sure for sparePartNo = 500, it should go to support.
Figure 401: Test Data
d) Login to /nwa with Administratorxx and go to Manage Processes. No human activity or task are executed. In this case the process only executes the Distribution and CheckAvailability sub-processes.
Figure 402: Manage Processes
Prohibida su reproducción © Copyright. All rights reserved.
409
Unit 6: Other Objects
LESSON SUMMARY You should now be able to: ●
Explain the various UIs and tasks
●
Create a user interface with SAPUI5
Prohibida su reproducción 410
© Copyright. All rights reserved.
Unit 6 Lesson 3 407
Explaining Further Objects
LESSON OVERVIEW This lesson explains further objects in the procurement process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Create tasks
Task Creation The following table lists the attributes, specifies their categories, and describes their roles: Table 9: Task Attributes, Categories and Roles Option Name
Category
Description
Name
Overview
The name given to the task. Use a descriptive name.
Documentation
Overview
Some description or documentation about the purpose of this task. As the name states, it is purely for your own documentation purposes.
Sharing
Overview
Specifies whether the task owner is allowed to invite other users to contribute to and give input about the task. However, the owner(s) remains the responsible person for the task and has the responsibility to complete it. Any user in the UME can become a contributor to the task but needs to be invited. A contributor is allowed to add notes and attachments to a task and to monitor a particular task.
Prohibida su reproducción © Copyright. All rights reserved.
411
Unit 6: Other Objects
Option Name
Category
Description
Notification
Overview
A task provides the features of sending an e-mail notification to a task’s owner when a task has been assigned to him or her. The e-mail contains the usual attributes, like a subject and a body, which can be dynamically customized to include the details relevant to the task. In the notification, a link to the task to be claimed is included.
Component
Overview
The component attribute needs to be linked to the component containing a UI for the task. Common UI components include online technologies (Web Dynpro Java, Web Dynpro ABAP, Visual Composer), offline technologies (Adobe Forms), and custom technologies. Custom technologies can be used in case you prefer to use any non-SAP technology that can be deployed in as AS Java and that is capable of using the API provided by SAP BPM in order to read and write the data of a task.
Priority
Overview
Specifies the priority of the task. The possible values are Very High, High, Medium, and Low. By default, the value is set to Medium.
Prohibida su reproducción 412
© Copyright. All rights reserved.
Lesson: Explaining Further Objects
Option Name
Category
Description
Custom Attributes
Attributes and Actions
Custom attributes enables you to specify business context data in the tasks. By adding business-related custom attributes to task, it helps give the user more context about that task. For instance, you could add the user ID of the person who started the process to which this task relates. This in turn provides relevant business input to the task so that the appropriate steps can be taken or decisions made. A custom attribute has a name (must be unique), label, data type, and expression. Using the Expression Editor, a value can be assigned to the attribute from the task input.
Custom Actions
Attributes and Actions
Facilitates the definition of your own tasks beyond the standard SAP tasks. Without opening a task, you are able to perform your own defined actions on a task. Custom actions can also be accessed via SAP BPM API. By default, the following actions are available: view, claim, release, and complete.
Excluded Owners
Roles
Excluded owners are users that are not allowed to complete a particular task. This is a very used feature, because it enables the exclusion of some users from performing a task. A typical scenario in which such a mechanism can be used is in processes involving requestors and approvers. You want to prevent the user who played the role of requestor from being the approver of his own request.
Prohibida su reproducción © Copyright. All rights reserved.
413
Unit 6: Other Objects
Option Name
Category
Description
Administrators
Roles
Administrators are people(users) who are allowed to administer, process, or complete a task. If there is more than one user allowed to execute a particular task, then the actual owner of the task is the user who eventually completes the task. Administrators are also able to view, monitor, and manage processes and tasks and to start and debug SAP BPM processes. In order for a user to be able to properly assume an administrator’s role, he or she will require a set of administration UME roles and groups assigned to his or her user profile.
Variables
User Texts
For every task that is created, you can specify the text to be contained in the subject and description of the task in a static manner. This is the message or text that the task owner sees in his UWL, a tool that simplifies task management for business users. From the UWL, users can access alerts, notifications, approvals and their tasks. Variables allow us to improve this functionality by catering to the creation of dynamic custom text that can be used in the task’s text and name. A variable has a name (must be unique), data type, and expression. Using the Expression Editor, you can assign a value to the variable based on any context data or available functions.
Prohibida su reproducción 414
© Copyright. All rights reserved.
Lesson: Explaining Further Objects
Option Name
Category
Description
Parameterized Texts
User Texts
Specifies the text or message to be sent to the responsible user via an e-mail notification. This text will also be displayed in the user's inbox. The text can be made dynamic by adding variables. Variables can be added to the text using brackets { }.
Activation Time
Time Constraints
Specifies the time from which the potential owners can see the task. By default, the task is visible as soon as it is created, so you don’t need to set this field if you don’t have special requirements. This information can be expressed by using an expression.
Start Deadline
Time Constraints
Specifies the time before which the task must have been started by one of the potential owners. If the time is reached without the task being started, then an exception can be raised. You will need to select the checkbox to raise the exception if this behavior is desired. The start deadline can be expressed by using an expression.
Completion Deadline
Time Constraints
Specifies the time before which the task must be completed by one of the potential owners. If the time is reached without the task being completed, then an exception can be raised. You will need to select the checkbox to raise the exception if this behavior is desired. The completion deadline can be expressed by using an expression.
Prohibida su reproducción © Copyright. All rights reserved.
415
Unit 6: Other Objects
Option Name
Category
Description
Expiration Time
Time Constraints
Specifies the time after which the task us no longer valid or expires. After this time, tasks can no longer be claimed or completed by a user. This task moves into a canceled status. This information can be expressed by using an expression.
Prohibida su reproducción 416
© Copyright. All rights reserved.
Unit 6 Exercise 14 413
Create the iFlow CallSupplierService_asyn_## SP03 Business Example In this exercise, we will use the following process flow:
Figure 403: Exercise iFlow
We will later send the message from the Procurement Process / P_callSupplier_AA over the SOAP Adapter to the iFlow and from there over the File Adapter to the File system. A mapping is not used in this scenario.
Figure 404: Exercise Data Flow
In this exercise you will perform the following steps: ●
Create the design objects
●
Create sender communication profile
●
Create receiver communication profile
●
Create IFlow CallSupplierService_xx
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you.
Prohibida su reproducción © Copyright. All rights reserved.
417
Unit 6: Other Objects
Create the Design Objects 1. Save the SupplierService WSDL in the FileSystem 2. Import the SupplierService WSDL into the ESR as external definition. Based on this, create 2 identical Service Interfaces, name them: SI_CallSupplierService_outb and SI_CallSupplierService_inb. 3. Create outbound Service Interface called SI_CallSupplierService_outb based in the external definition. 4. Create Asynchronous Service Interface SI_CallSupplierService_inb based in the external definition. Create Sender Communication Profile 1. Create Sender Communication Profile. Field
Value
Name
P_Process_xx
Sender Interface
SI_CallSupplierService_outb
2. Create the communication channel, name it CC_SOAP_SENDER_xx . Use the following data: Field
Value
Direction
Sender
Adapter Type
SOAP
Message Protocol
XI 3.0
Create Receiver Communication Profile 1. Create the Receiver Communication Profile. Create it as a Business Component. Field
Value
Name
SupplierService_xx
Receiver Interfaces
SI_CallSupplierService_inb
2. Create the communication channel, name it CC_FILE_RECEIVER_xx. Use the following data: Field
Value
Direction
Receiver
Adapter Type
File
Adapter-Specific > Target Directory
/usr/sap/trans/tmp/groupxx
File Name Scheme
callSupplier.xml
Create iFlow CallSupplierService_xx
Prohibida su reproducción 418
© Copyright. All rights reserved.
Lesson: Explaining Further Objects
1. Create iFlow CallSupplierService_xx.
Prohibida su reproducción © Copyright. All rights reserved.
419
Unit 6 Solution 14 416
Create the iFlow CallSupplierService_asyn_## SP03 Business Example In this exercise, we will use the following process flow:
Figure 403: Exercise iFlow
We will later send the message from the Procurement Process / P_callSupplier_AA over the SOAP Adapter to the iFlow and from there over the File Adapter to the File system. A mapping is not used in this scenario.
Figure 404: Exercise Data Flow
In this exercise you will perform the following steps: ●
Create the design objects
●
Create sender communication profile
●
Create receiver communication profile
●
Create IFlow CallSupplierService_xx
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you.
Prohibida su reproducción 420
© Copyright. All rights reserved.
Lesson: Explaining Further Objects
Create the Design Objects 1. Save the SupplierService WSDL in the FileSystem a) Execute http://nwktdc00.wdf.sap.corp:50000/inspection.wsil and search for SISupplierServiceImplBean. b) Copy the Endpoint URL and execute the WSDL in the Browser with Endpoint-URL + ? WSDL For example: http://nwktdc00.wdf.sap.corp:50000/SISupplierServiceImplBeanService/ SISupplierServiceImplBean?wsdl c) Save the WSDL under Documents/WSDL using save as. Manually change the extension from XML to WSDL: SISupplierServiceImplBean.wsdl
Figure 405: WSDL
2. Import the SupplierService WSDL into the ESR as external definition. Based on this, create 2 identical Service Interfaces, name them: SI_CallSupplierService_outb and SI_CallSupplierService_inb. a) Choose the Enterprise Service Browser perspective. Navigate to SC_SELLSPAREPARTS_BIT800 1.0 of education.sap.com —> your own Name space and right-clickExternal Definitions → Import External Definitions start the import wizard. b) In the Import Files screen, choose Add, then choose SISupplierServiceImplBean.wsdl saved in the previous task.
Figure 406: Import WSDL
c) Choose Next twice. d) If required, create a new ChangeList, with a name of your wish, e.g. New ChangeList.
Prohibida su reproducción © Copyright. All rights reserved.
421
Unit 6: Other Objects
Figure 407: New Change List
e) Choose Finish to end the wizard. f) as result, you see the imported message types:
Figure 408: External Definitions
The imported Interface is a synchronous interface, which consists of: ●
siSupplierServiceIn and
●
siSupplierServiceOut
Figure 409: Interfaces
We will use siSupplierServiceIn, only, for both: SI_CallSupplierService_outb and SI_CallSupplierService_In. 3. Create outbound Service Interface called SI_CallSupplierService_outb based in the external definition. a) Choose Service Interface → New Service Interface to create a new Service interface, named SI_CallSupplierService_outb in your own namespace. b) Choose Finish to navigate to the Service Interface Overview detail page. c) Choose Service Interface Overview , then choose the Overview /Advanced tab. Here set: Field
Value
Category
Outbound
Prohibida su reproducción 422
© Copyright. All rights reserved.
Lesson: Explaining Further Objects
Field
Value
Interface Pattern
Stateless(XI30-Compatible)
Figure 410: Service Interface Overview
d) Choose Service Interface Definition , then choose the Definition tab. Click SI_CallSupplierService_outb . Change the entry in the Type field to Asynchronous e) Select Input and choose Add Input Message . Browse for the siSupplierServiceIn in the urn:bit800:xx:com namespace. Note: Please be careful to choose siSupplierServiceIn . Only this object is used! f) The following data is displayed: Field
Value
Name
SISupplierServiceImplBean
Name space
urn:bit800:xx:com
Message Name space
urn:bit800:services:com
Message Name
siSupplierServiceIn
Prohibida su reproducción © Copyright. All rights reserved.
423
Unit 6: Other Objects
Figure 411: Service Interface Definition
g) Choose Save. 4. Create Asynchronous Service Interface SI_CallSupplierService_inb based in the external definition. a) Choose Service Interface Definition → Service Interface Operation Input → Details . Here check and change the following data: Field
Value
Name
SISupplierServiceImplBean
Namespace
urn:bit800:xx:com
Message Name
siSupplierServiceIn
Message Namespace
http://services.bit800/com/
Type
External Message
b) Change: Field
Value
Service Interface Overview >Advanced >Category
Inbound
Service Interface Overview >Advanced >In- Stateless (XI30-Compatible) terface Pattern
Figure 412: Service Interface Definition
c) Choose Save. d) Activate all the objects in your change list. Create Sender Communication Profile
Prohibida su reproducción 424
© Copyright. All rights reserved.
Lesson: Explaining Further Objects
1. Create Sender Communication Profile. Field
Value
Name
P_Process_xx
Sender Interface
SI_CallSupplierService_outb
a) Switch to the SAP Process Integration Designer perspective. b) Log on with Administratorxx as user and the given password. c) Under Systems create the Sender Business Component. Use the data from the table. d) Choose Save. 2. Create the communication channel, name it CC_SOAP_SENDER_xx . Use the following data: Field
Value
Direction
Sender
Adapter Type
SOAP
Message Protocol
XI 3.0
a) Right-click over the P_Process_xx system and choose New Communication Channel b) Create the Communication Channel with the data of the table above
Figure 413: Sender Communication Channel
c) Choose Save. d) Activate. Create Receiver Communication Profile 1. Create the Receiver Communication Profile. Create it as a Business Component. Field
Value
Name
SupplierService_xx
Receiver Interfaces
SI_CallSupplierService_inb
a) Under Systems create the Receiver Business Component. Use the data from the table above.
Prohibida su reproducción © Copyright. All rights reserved.
425
Unit 6: Other Objects
b) Choose Save. 2. Create the communication channel, name it CC_FILE_RECEIVER_xx. Use the following data: Field
Value
Direction
Receiver
Adapter Type
File
Adapter-Specific > Target Directory
/usr/sap/trans/tmp/groupxx
File Name Scheme
callSupplier.xml
a) Right-click over the SupplierService_xx system and choose New Communication Channel. b) Configure the Communication Channel with the data from the table.
Figure 414: Communication Channel File Adapter
c) Save. d) Activate. Create iFlow CallSupplierService_xx 1. Create iFlow CallSupplierService_xx. a) Create an iFlow, named CallSupplierService_xx of the Type Point-to-Point. b) Assign P_Process_xx as the Sender System with Interface SI_CallSupplierService_outb.
Figure 415: iFlow Creation — Sender System
c) Assign as Receiver, add a new row and choose the SupplierService_xx for the Communication Component with Interface SI_CallSupplierService_inb.
Prohibida su reproducción 426
© Copyright. All rights reserved.
Lesson: Explaining Further Objects
Figure 416: iFlow Creation — Receiver System
d) At P_process_xx assign the CC_SOAP_SENDER_XX communication channel. e) At SupplierService_xx assign the CC_FILE_RECEIVER_xx communication channel.
Figure 417: iFlow
f) Choose Save, then right-click choose Activate. g) Right-click and choose Deploy. Check the log.
Figure 418: Deployment Console
h) Log on to the Integration Directory Swing Client using http://nwktdc00.wdf.sap.corp: 50000/dir and check the Integration Flow object that has been created for your iFlow. Also the Integrated Configuration should be referenced. This IC has been generated when you deployed your iFlow.
Prohibida su reproducción © Copyright. All rights reserved.
427
Unit 6: Other Objects
LESSON SUMMARY You should now be able to: ●
Create tasks
Prohibida su reproducción 428
© Copyright. All rights reserved.
Unit 6
425
Learning Assessment
1. Principal propagation is transferred from what objects? Choose the correct answers. X
A Human activities
X
B Intermediate message events
X
C Offline forms
X
D Start events
2. What is assigned to an automated activity? Choose the correct answers. X
A Operations
X
B Roles
X
C Service definitions
X
D Tasks
3. The SAPUI5 runtime is a server-side HTML5 rendering library with a rich set of standard and extension controls. Determine whether this statement is true or false. X
True
X
False
Prohibida su reproducción © Copyright. All rights reserved.
429
Unit 6
426
Learning Assessment - Answers
1. Principal propagation is transferred from what objects? Choose the correct answers. X
A Human activities
X
B Intermediate message events
X
C Offline forms
X
D Start events
2. What is assigned to an automated activity? Choose the correct answers. X
A Operations
X
B Roles
X
C Service definitions
X
D Tasks
3. The SAPUI5 runtime is a server-side HTML5 rendering library with a rich set of standard and extension controls. Determine whether this statement is true or false. X
True
X
False
Prohibida su reproducción 430
© Copyright. All rights reserved.
UNIT 7
Deployment and Testing Process
Lesson 1 Building and Deploying a Process Exercise 15: Create the iFlow FromSupplierService_asyn_## SP03
432 435
Lesson 2 Explaining the Configuration of a Process
443
Exercise 16: Model and Configure the Procurement Process SP03 Exercise 17: Link the P_Process to iFlow CallSupplierService_## and iFlow FromSupplierService_## SP03
463 477
UNIT OBJECTIVES ●
Explain compiling and deploying of PO processes
●
Explain configuration of PO processes
Prohibida su reproducción © Copyright. All rights reserved.
431
Unit 7 Lesson 1 428
Building and Deploying a Process
LESSON OVERVIEW This lesson shows you how to build and deploy a PO process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain compiling and deploying of PO processes
Process Deployment After the process configuration has been built using iFlows, it must be created as an integrated configuration.
Figure 419: Deployment Process
This following process is described in the figure, Deployment Process:
Prohibida su reproducción 432
© Copyright. All rights reserved.
Lesson: Building and Deploying a Process
1. The applicable integration flow is chosen in the Explorer tree of the PI Explorer perspective and Deploy is chosen from the context menu. 2. The deployment process begins and is displayed and can be monitored in the Deployment Log. 3. After the integration configuration has successfully been deployed, it displays in an activated state in the Integration Build.
Note: If an integrated configuration already exists for the same Sender key information, another integration cannot be deployed. In this case, the deployment process generates an error and the active integrated configuration must be removed. Process Undeployment Sometimes it might be required to undeploy a process.
How to Create the iFlow FromSupplierService_async_## For the demonstration steps, see the exercise, Create the iFlow FromSupplierService_async_##.
Prohibida su reproducción © Copyright. All rights reserved.
433
Unit 7: Deployment and Testing Process
Prohibida su reproducción 434
© Copyright. All rights reserved.
Unit 7 Exercise 15 431
Create the iFlow FromSupplierService_asyn_## SP03 Business Example The process flow in this exercise looks like the following:
Figure 420: Exercise iFlow ●
We get a message over the File Adapter and over the process P_fromSupplier_IME we sent it back to the process
●
The Sender is called SupplierService_xx, the receiver is called P_Process_xx
●
We do not use a mapping
●
●
Both service inerfaces SI_CallSupplierService_outb and SI_CallSupplierService_inb are available Both business components P_Process_xx and SupplierService_xx are available
Figure 421: Exercise Data Flow
In this exercise, you will perform the following steps: ●
Create the Sender communication profiles
Prohibida su reproducción © Copyright. All rights reserved.
435
Unit 7: Deployment and Testing Process
●
Create the Receiver communication profiles
●
Create the IFlow FromSupplierService_##
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. Create the Sender Communication Profiles 1. Create the Sender Communication Profiles Create the Receiver Communication Profiles 1. Create the Receiver Communication Profiles. Create the iFlowfromSupplierService_## 1. Create the Iflow FromSupplierService_##.
Prohibida su reproducción 436
© Copyright. All rights reserved.
Unit 7 Solution 15 433
Create the iFlow FromSupplierService_asyn_## SP03 Business Example The process flow in this exercise looks like the following:
Figure 420: Exercise iFlow ●
We get a message over the File Adapter and over the process P_fromSupplier_IME we sent it back to the process
●
The Sender is called SupplierService_xx, the receiver is called P_Process_xx
●
We do not use a mapping
●
●
Both service inerfaces SI_CallSupplierService_outb and SI_CallSupplierService_inb are available Both business components P_Process_xx and SupplierService_xx are available
Figure 421: Exercise Data Flow
In this exercise, you will perform the following steps: ●
Create the Sender communication profiles
Prohibida su reproducción © Copyright. All rights reserved.
437
Unit 7: Deployment and Testing Process
●
Create the Receiver communication profiles
●
Create the IFlow FromSupplierService_##
In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. Create the Sender Communication Profiles 1. Create the Sender Communication Profiles a) Choose the SAP Process Integration Designer perspective. b) Logon with user Administratorxx and the given password. c) Choose the business component SupplierService_xx and assign as Sender Interface SI_CallSupplierService_outb. d) Choose Save. e) Create a communication channel, named CC_FILE_SENDER_xx . Use the following data: Field
Value
Direction
Sender
Adapter Type
File
Figure 422: Sender Communication Channel
f) Choose Adapter-Specific → Source → File Access Parameters → Source Directory. There set /usr/sap/trans/tmp/groupxx. g) As file name use callSupplier*.xml The correct name is VERY important.
Figure 423: Sender Communication Channel Adapter-Specific Parameters
Prohibida su reproducción 438
© Copyright. All rights reserved.
Lesson: Building and Deploying a Process
h) Choose Adapter-Specific → Processing → Processing Mode*. There enter Delete
Figure 424: Sender Communication Channel Processing Parameters
i) Choose Save. j) Activate. Create the Receiver Communication Profiles 1. Create the Receiver Communication Profiles. a) Choose the Business Component P_Process_xx . Then assign the Receiver Interface Sender Interface: SI_CallSupplierService_inb. b) Choose Save. c) Create a communication channel, named CC_SOAP_Receiver_xx . Use the following data: Field
Value
Direction
Receiver
Adapter Type
SOAP
Message Protocol
XI 3.0
Figure 425: Receiver Communication Channel
d) Choose Adapter-Specific → General → Connection Parameters. As target URL set http://nwktdc00.wdf.sap.corp:50000/MessagingSystem/receive/JPR/XI. e) Choose Adapter-Specific → General. As Authentication data set Use logon to non-SAP system target URL. f) Choose Adapter-Specific → General → Authentication data. As User Name set AdministratorXX.
Prohibida su reproducción © Copyright. All rights reserved.
439
Unit 7: Deployment and Testing Process
g) Choose Adapter-Specific → General → Authentication data. As Password use the given one. h) Choose Save. i) Activate. Create the iFlowfromSupplierService_## 1. Create the Iflow FromSupplierService_##. a) Create an iFlow, name it FromSupplierService_xx of the Type Point-to-Point. b) Assign the Sender, named SupplierService_xx with SI_CallSupplierService_outb .
Figure 426: iFlow Creation– Sender
c) Create a Receiver, named P_Process_xx with SI_CallSupplierService_inb
Figure 427: iFlow Creation– Receiver
d) At P_process_xx assign CC_SOAP_Receiver_XX as communication channel. e) At SupplierService_xx assign CC_FILE_SENDER_xx as communication channel.
Figure 428: Result
f) Choose Save. g) Right click on the iFlow and choose Activate. h) Right click on the iFlow and choose Deploy.
Prohibida su reproducción 440
© Copyright. All rights reserved.
Lesson: Building and Deploying a Process
Figure 429: Integration Flows
Prohibida su reproducción © Copyright. All rights reserved.
441
Unit 7: Deployment and Testing Process
LESSON SUMMARY You should now be able to: ●
Explain compiling and deploying of PO processes
Prohibida su reproducción 442
© Copyright. All rights reserved.
Unit 7 Lesson 2 439
Explaining the Configuration of a Process
LESSON OVERVIEW This lesson shows you an explanation of the configuration of a PO Process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain configuration of PO processes
Web Service Provider Configuration Overview
Figure 430: SOA Provider Configuration, Basic Principle
Scenario A scenario is a group of service definitions. You can assign policies to one or more services in a scenario. Policy Policies contain runtime configuration settings (for example, for security and reliable messaging), that are enforced during consumer-provider communication. Policies, also called communication profiles, are reusable. Service Group
Prohibida su reproducción © Copyright. All rights reserved.
443
Unit 7: Deployment and Testing Process
Figure 431: SOA Consumer Configuration, Basic Principle
A service group is a development artifact that is part of the consumer application configured at runtime. When configuring a service group, you can configure the consumer endpoints of the consumer application. A service group is a group of consumed services that run on the same system provider, for example for data integrity reasons on the provider side. For a consumer, a service group is a bundle of references to services that must be provided by the same provider system. A consumer can contain many service groups. The service groups in a composite application developed in SAP Composition Environment are published to the service registry so that you can easily see which consumer applications can use by a service at runtime.
Provider Application Search You can apply runtime configuration settings to multiple service definitions of a provider application all at once. You decide which service definitions to configure in a provider application and then expose those service definitions for consumption through runtime settings. You can search for and choose the provider applications that you want to configure in the Composite Explorer.
Prohibida su reproducción 444
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 432: SOA Configuration for Connectivity, Basic Principles
Configuration of Consumers The following are the main elements required to configure services for consumers: Configure Consumers When configuring consumers as follows, the system automatically creates logical ports and publishes service groups to the Services Registry: ●
Group consumer proxies in service groups
●
Associate policies and service groups
Connect Systems The following should be created to connect systems: ●
Create policies
●
Create connections between the consumer system and the provider systems
Configure Providers When configuring providers as follows, the system automatically generates endpoints and publishes them to the Services Registry: ●
Group Web services in scenarios
●
Apply policies to the Web services in the scenario
Create Service Groups A composite application can make use of a multitude of services. Configuring those services individually would:
Prohibida su reproducción © Copyright. All rights reserved.
445
Unit 7: Deployment and Testing Process
●
Require a large initial effort
●
Make configuration changes expensive because all affected services have to be touched
●
Increase the chance of configuration errors and inconsistencies
Grouping the services eliminates those issues because configuration is done only once for a set of services, and changes can be applied quickly at a single point. A general approach is to: ●
●
Create Service Groups at design time in SAP NetWeaver Developer Studio (NWDS) Configure the groups in NetWeaver Administrator after the deployment onto the application server
Consumption
Figure 433: SAP NetWeaver Developer Studio
Service Groups are defined in SAP NWDS when importing service interfaces. Once deployed to the AS Java, the Service Groups need to be configured in the SAP NetWeaver Administrator.
Prohibida su reproducción 446
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 434: SAP NetWeaver Administrator
The settings for assigning system are found under SAP NetWeaver Administrator → SOA Management → Technical Configuration → System Connections
Communication Profile Creation
Figure 435: Communication Profiles
When creating communication profiles, you will need to specify the following: ●
Security policies
●
Messaging settings
●
Transport settings
Prohibida su reproducción © Copyright. All rights reserved.
447
Unit 7: Deployment and Testing Process
●
Name and description of the communication profile
When a communication profile is assigned to a service definition, the system creates one or more service endpoints for the service definition. Each endpoint represents an alternative policy in the communication profile. For example, the system can create separate endpoints that require basic authentication, X.509 Client Certificate, and SAML Assertion for HTTP communication. If checked, Allow Only Secure Communication radio button enables only HTTPs communication. Each communication profile has a version, which is automatically assigned to the profile when it is created. Each time you edit a communication profile a new version is created. Multiple versions of a communication profile can exist, each version with its own settings. Version numbers start at 1, and each subsequent version number is increased by 1. When you assign different profiles to the same service definition, the system creates service endpoints that contain the configuration settings of each profile assigned to the service definition. When you assign a profile to a service definition, all of the profile versions are assigned to that service definition. The system then creates a service endpoint for every version available in the active profile.
Communication Profile Assignment to a Provider Application
Figure 436: Connections to Provider System
Prohibida su reproducción 448
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Consumer Application Search
Figure 437: Configuring Service Groups: Find Applications
You can apply runtime configuration settings to multiple service definitions of an application. You decide which service definitions in an application to configure and expose for consumption with applicable runtime settings. Find and choose the application you want to configure. You can find applications by entering a string in the Search field.
Figure 438: Configuring Service Consumers: Configure Service Groups
Prohibida su reproducción © Copyright. All rights reserved.
449
Unit 7: Deployment and Testing Process
Provider System Connection
Figure 439: The SAP NetWeaver Administrator
The settings for assigning system are found under SAP NetWeaver Administrator → SOA Management → Technical Configuration → System Connections.
Figure 440: Connections to Provider Systems
To establish a connection from a consumer to a provider system, you have to specify the following configuration settings: ●
Credentials to the system backend
Prohibida su reproducción 450
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
●
Communication profile
●
Search method on the provider system
●
Messaging settings
●
System details and descriptions
The system connection contains specific information about the provider system in the landscape, such as host name and port number, as well as information about the communication profile defining the policies for communication with that system, the mechanism for the discovery of Web services on it, and the concrete authentication credentials to access the Web Services Description Language (WSDL) or Web Service Inspection Language (WSIL) sources. You can create only one connection for every provider system in the landscape. At a later stage, you identify the configured provider systems in the SAP NetWeaver Administrator applications by the system landscape directory ID (SLD ID) which you provide in this stage. Create a System Connection When creating a connection, you browse provider systems on the wizard that opens by choosing the button next to the System Name field. To use this value help, you must have established connection to the Services Registry. The value help displays all systems whose Web services are published to the Services Registry. As a next step, you provide a metadata user with which you can access the backend of the system. On the next step you choose the communication profile, which you want to use. Note that the system connection is established over the highest active version of the profile. Finally, you can choose a specific search mechanism for services on the provider system (WSDL or WSIL documents, or Services Registry). Connections to Provider System: Editing
Prohibida su reproducción © Copyright. All rights reserved.
451
Unit 7: Deployment and Testing Process
Figure 441: Edit a Connection
Use the following high level procedure to edit a connection to a provider system: 1. Open the connection for editing and update the relevant settings. 2. Ping a connection. Use Ping Connection to test the created system connection. If the connection is set correctly, the framework displays all service definitions running on the provider system. 3. Import and Export a connection. The framework allows you to export an established connection to a provider system from a consumer system and then reuse it on another consumer system.
System Connection User Assignment Services are often called in the context of the user that currently runs the SOA application. In that case, the credentials of the user are passed on from the Java application server to the backend system using SAP logon tickets or similar methods. In some instances, it might be required to call backend services using a fixed technical user. The credentials can be specified in the NetWeaver Administrator. Those credentials can then be added to provider systems or service groups to make sure that all related service calls are executed in the context of that user.
Prohibida su reproducción 452
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 442: Create User Accounts
The procedure for adding user accounts follows: 1. Enter a name and description. 2. Enter authentication credentials. 3. Enter WS Security settings. 4. Enter HTTPs settings. Create a User Account If the Web services that you want to consume require authentication, you can provide this authentication in entities called user accounts. When you create a user account, you specify different authentication methods in the same entity. At a later stage, you can reuse and assign this account to one or more than one Web service on a provider system. When you assign the user account to a Web service, the system uses the authentication credentials in the account to invoke the Web service at runtime. Depending on the authentication profile which you used in the service reference to the Service Group during design time, we recommend that you create one of the following user account assignments at runtime: ●
No Authentication If this option is set during design time, the system does not require mandatory security configuration at runtime, however you may still provide such configuration. If at runtime you create and assign a user account, its authentication mechanism overrides the authentication settings (NoAuthentication) provided at design time.
●
Technical User
Prohibida su reproducción © Copyright. All rights reserved.
453
Unit 7: Deployment and Testing Process
You configure the concrete service user settings (user name and password or certificate) at runtime by creating and assigning a user account. In this case, all service calls from the consumer application authenticate to the service with that user assignment. ●
Business User At runtime, you only have to establish a SSO connection between both systems. In this case, you do not have to create and assign a user account.
●
Business or Technical User You determine the authentication level and provide the concrete security mechanism. If you create and assign a user account at runtime, the system takes into account the Technical User authentication. Otherwise, if you only establish a SSO connection between the systems, Business User authentication is taken into account.
Settings for the User Account Provide a name and description of the account and then specify the exact authentication mechanism. Later, you can edit the account and update the settings. For the Credentials, enter the following settings: ●
●
To set basic authentication over the HTTP protocol, enter the user name and password in the provided fields. To set authentication over the Web Service Security protocol, proceed as follows: In the Keystore View for WSSE drop-down menu, specify a key storage of signatures. In the Private Key for WSSE drop-down menu, choose the exact authentication key.
●
To set secure SSL communication over the HTTPS protocol, proceed as follows: In the Keystore View for HTTPS drop-down menu, specify a key storage of signatures. In the Private Key for HTTPS drop-down menu, choose the exact authentication key.
You can specify one or more authentication methods in the user account. An application on your client system can consume the Web service to which the account is assigned, if at least one of the authentication methods is allowed in the authentication mechanism for the service endpoint of the Web service. Activate/Deactivate a User Account The framework allows you to assign the active user account. The system activates the assignment of the user account. When you deactivate user accounts, the system considers them deleted. However, the account and its assignments keep existing in the system, and you can activate and use it again at a later stage. The framework does not allow you to assign the inactive user account. The system deactivates the assignment of the user account. The system creates a user account with status Active. As a next step you can assign the account. The assignment specifies a set of Service Groups and the corresponding Web services, which are running on the same provider system. User Account: Assignment
Prohibida su reproducción 454
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 443: Assign User Accounts (1)
To consume Web services, which require authentication and to consume them using a dedicated service user, you have to assign a user account to them. You can assign user accounts to one or more than one Web service running on a provider system. In addition, you can assign the same user account to one or more than one Service Group that contains a reference to the Web service. The consumer application invokes the business logic on the provider side using the authentication methods, which you provide in the user account. The user account assignments which you create are also used by the system when you configure Service Groups.
Figure 444: Assign User Accounts (2)
Prohibida su reproducción © Copyright. All rights reserved.
455
Unit 7: Deployment and Testing Process
You can narrow the user account assignment in one of the following ways: ●
Assignment to a provider system In this case, you apply the user account to all Service Groups and the corresponding Web services that are running on the provider system.
●
Assignment to service definitions on a provider system In this case, you apply the user account to the Service Groups and the corresponding Web services, which are specified explicitly in the assignment.
●
Assignment to a concrete service group and concrete service definition In this case, you apply the user account to a specific Service Group and specific Web services, which are referred by this Service Group.
If there is more than one assignment to services on the same provider system, the framework uses the most concrete assignment with priority.
Service Group Configuration in NetWeaver Administrator "Containers" for service groups (that is, multiple service groups) can be bundled within a single entity. This is relevant for applications accessing services provided by multiple systems, for example: ●
One service group for consuming services from an ABAP ERP backend system
●
Another service group for calling services provided by a local Java application server
To set the business scenario, use the following path: SAP NetWeaver Administrator → SOA Management → Application and Scenario Management → Business Scenario Communication.
Figure 445: Creating a Business Scenario
Prohibida su reproducción 456
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 446: Adding a Service Group
Figure 447: Assigning a Provider System to the Service Group
Figure 448: Service Group Processing
Prohibida su reproducción © Copyright. All rights reserved.
457
Unit 7: Deployment and Testing Process
To set provisioning, use the following path: SAP NetWeaver Administrator → SOA Management → Application and Scenario Management → Application Communication. Web Services Configuration
Figure 449: Configuring Web Service Providers: Find Applications
You can apply runtime configuration settings to multiple service definitions of an application at one go. You decide which service definitions in an application to configure and expose for consumption with which runtime settings. Find and choose the application, which you want to configure. You can find applications by entering a string in the Search field.
Figure 450: Configuring Web Service Providers: Configure Applications
Service Group Sharing in NetWeaver Administrator Shared service groups are defined with a dedicated development component. Shared service groups have the following properties:
Prohibida su reproducción 458
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
●
●
They can be deployed separately from the rest of the application. They can be referenced and used by multiple Business Process Management (BPM), Web Dynpro Java (WDJ), and Composite Application Framework (CAF) development components.
Figure 451: Shared Service Groups (1)
Development components that make use of shared service groups need to have a reference to the service group development component. For CAF development components, the following applies: ●
Deploy time and runtime dependency from CAF ear DC to service group DC
●
Design time dependency from CAF ebjmodule DC to service group DC
BPM/WDJ development components must have, design time, deploy time, and runtime dependencies from the BPM/WDJ development component to the service group development component.
Prohibida su reproducción © Copyright. All rights reserved.
459
Unit 7: Deployment and Testing Process
Figure 452: Shared Service Groups (2)
Troubleshooting While Processing Service Groups The processing of a service group in the provider system ABAP can fail when some of the services contained in the group are currently unavailable in the backend system (for example, due to a failed mass configuration run). The processing of a service group in the provider system Java can fail due to the following situations: ●
●
●
Services that are provided by a Java server initially do not support authentication. If an authentication method is specified for the service group, the processing fails because the services do not support the required security features. The authentication methods the Java services are meant to support have are not configured in SAP NetWeaver Administrator (NWA) after the services have been deployed. If this configuration does match the service group, the processing succeeds.
The path for troubleshooting is SAP NetWeaver Administrator → SOA Management → Application and Scenario Management → Single Service Administration.
Prohibida su reproducción 460
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 453: Troubleshooting
How to Model and Configure the Procurement Process For the demonstration steps, see the exercise, Model and Configure the Procurement Process.
Prohibida su reproducción © Copyright. All rights reserved.
461
Unit 7: Deployment and Testing Process
Prohibida su reproducción 462
© Copyright. All rights reserved.
Unit 7 Exercise 16 459
Model and Configure the Procurement Process SP03 Business Example The process flow in this exercise is as follows:
Figure 454: Exercise Data Flow ●
This is an synchronous process
●
It sends a message to the supplier asynchronously asking if the article can be ordered
●
The result is sent back asynchronously
●
Depending on the result, different End events are possible: -
Error End: The article is not in stock No feedback from the supplier
-
Message End: the article can be ordered
In this exercise, you will perform the following tasks: ●
●
Sketch the Procurement process Create a P_StartProcess_Trigger, based on the Service Interface P_startProcess, and assign it to P_start_SE
●
Import the service interfaces, SI_CallSupplierService_outb, from ESR
●
Create the DataObject, P_Supplier_DO
●
Create an Output Mapping from P_start_SE to P_Supplier_DO
Prohibida su reproducción © Copyright. All rights reserved.
463
Unit 7: Deployment and Testing Process
●
Create an Input Mapping from P_Supplier_DO to P_callSupplier_AA
●
Configure the Timer, P_timer_T
●
Import the service interface, SI_CallSupplierService_inb, from ESR
●
Assign the service interface, SI_CallSupplierService_outb to P_callSupplier_AA
●
Create a P_fromSupplier_Trigger, based on the Service Interface SI_CallSupplierService_inb, and assign it to P_fromSupplier_IME
●
Configure P_isDelivery_XOR?
●
Configure the terminating Escalation Event, P_Escalation_EE
●
Model the entry-correlation at P_fromSupplier_IME
●
Check the P_End_EE
In this exercise, when the values include ## or xx, replace the characters by the group-number your instructor assigned to you. 1. Sketch the Procurement process. Create a P_StartProcess_Trigger, Based on the Service Interface P_startProcess, and Assign It to P_start_SE 1. Create a P_StartProcess_Trigger, based on the Service Interface P_startProcess and assign it to P_start_SE. The required steps to perform this step are explained in greater detail in an earlier exercise. Here only a short summary is given.
Import the Service Interfaces SI_CallSupplierService_outb from ESR 1. Import of the Service Interfaces SI_CallSupplierService_outb from ESR. The required steps to perform this step are explained in greater detail in an earlier exercise. Here only a short summary is given. Create a DataObject P_Supplier_DO 1. Create a DataObject P_Supplier_DO. Create an Output Mapping P_start_SE to P_Supplier_DO 1. Create an Output Mapping P_start_SE to P_Supplier_DO. Create an Input Mapping from P_Supplier_DO to P_callSupplier_AA 1. Create an Input Mapping from P_Supplier_DO to P_callSupplier_AA . Configure the Timer P_timer_T 1. Configure the Timer P_timer_T with an Offset of 2 Minutes. Import the Service Interface SI_CallSupplierService_inb from ESR 1. Import the service interface, SI_CallSupplierService_inb from ESR.
Prohibida su reproducción 464
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 470: Service Interfaces
Create a P_fromSupplier_Trigger, Based on the Service Interface SI_CallSupplierService_inb, and assign it to P_fromSupplier_IME 1. Create a P_fromSupplier_Trigger. Configure P_isDelivery_XOR? 1. Configure P_isDelivery_XOR?. Model the Entry-Correlation at P_fromSupplier_IME In this task, you configure the following: ●
●
The asynchronous answer of the supplier is triggered back to the same process We will configure this by using the ProcessInstanceId of the sending process, delivered in the comment field. 1. Change the input mapping of P_callSupplier_AA.
2. Create a Correlation Condition at P_fromSupplier_IME. Configure the Terminating Escalation Event, P_Escalation_EE 1. Configure the terminating Escalation Event P_Escalation_EE. Check the P_End_EE 1. Check the P_End_EE.
Prohibida su reproducción © Copyright. All rights reserved.
465
Unit 7 Solution 16 462
Model and Configure the Procurement Process SP03 Business Example The process flow in this exercise is as follows:
Figure 454: Exercise Data Flow ●
This is an synchronous process
●
It sends a message to the supplier asynchronously asking if the article can be ordered
●
The result is sent back asynchronously
●
Depending on the result, different End events are possible: -
Error End: The article is not in stock No feedback from the supplier
-
Message End: the article can be ordered
In this exercise, you will perform the following tasks: ●
●
Sketch the Procurement process Create a P_StartProcess_Trigger, based on the Service Interface P_startProcess, and assign it to P_start_SE
●
Import the service interfaces, SI_CallSupplierService_outb, from ESR
●
Create the DataObject, P_Supplier_DO
●
Create an Output Mapping from P_start_SE to P_Supplier_DO
Prohibida su reproducción 466
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
●
Create an Input Mapping from P_Supplier_DO to P_callSupplier_AA
●
Configure the Timer, P_timer_T
●
Import the service interface, SI_CallSupplierService_inb, from ESR
●
Assign the service interface, SI_CallSupplierService_outb to P_callSupplier_AA
●
Create a P_fromSupplier_Trigger, based on the Service Interface SI_CallSupplierService_inb, and assign it to P_fromSupplier_IME
●
Configure P_isDelivery_XOR?
●
Configure the terminating Escalation Event, P_Escalation_EE
●
Model the entry-correlation at P_fromSupplier_IME
●
Check the P_End_EE
In this exercise, when the values include ## or xx, replace the characters by the group-number your instructor assigned to you. 1. Sketch the Procurement process. a) Switch to the Process Development perspective. b) Choose [LocalDevelopment] bit800_xx/pm/Process Modeling /Processes / Procurement Process and create the following Flow objects and link them, according to the screenshot: Object name
Object type
P_start_SE
Message Start Event
P_callSupplier_AA
Automatic Activity
P_ECB
Event Based Choice
P_fromSupplier_IME
Intermediate Message Event
P_timer_T
Timer
P_isDelivery_XOR?
Exclusive Choice, with 2 branches: Yes and No
P_End_EE
Message End Event
P_Escalation_EE
terminating Escalation Event
Figure 455: Procurement Process
c) Choose Save.
Prohibida su reproducción © Copyright. All rights reserved.
467
Unit 7: Deployment and Testing Process
Create a P_StartProcess_Trigger, Based on the Service Interface P_startProcess, and Assign It to P_start_SE 1. Create a P_StartProcess_Trigger, based on the Service Interface P_startProcess and assign it to P_start_SE. The required steps to perform this step are explained in greater detail in an earlier exercise. Here only a short summary is given. a) Import the service interface P_startProcess from the ESR in the group namespace SC_SELLSPARPARTS_BIT800. Choose the service reference StartProcesses .
Figure 456: Imported Service Interface
b) Create the trigger, P_startProcess_Trigger. Assign the service interface P_startProcess.
Figure 457: New Message Trigger
c) Assign P_startProcess_Trigger to the Start Event P_start_SE.
Figure 458: Start Event Trigger
Import the Service Interfaces SI_CallSupplierService_outb from ESR 1. Import of the Service Interfaces SI_CallSupplierService_outb from ESR. The required steps to perform this step are explained in greater detail in an earlier exercise. Here only a short summary is given. a) Import the Service Interface SI_CallSupplierService_outb from ESR.
Prohibida su reproducción 468
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 459: Service Interfaces
b) Assign it to the Service Reference CallServiceViaAEX .
Figure 460: Service Reference
c) Assign the Service Interface SI_CallSupplierService_outb to P_callSupplier_AA.
Figure 461: Automated Activity Interface
Create a DataObject P_Supplier_DO 1. Create a DataObject P_Supplier_DO. a) Create a Data Object and name it P_Supplier_DO. Assign the Data Type DT_SupplierService - urn:bit800:services:com.
Figure 462: Data Object
Create an Output Mapping P_start_SE to P_Supplier_DO 1. Create an Output Mapping P_start_SE to P_Supplier_DO. a) Create a 1:1 Output Mapping from P_start_SE/MT_P_startProcess/Customer to P_Supplier_DO/ PurchaseOrder/customer.
Prohibida su reproducción © Copyright. All rights reserved.
469
Unit 7: Deployment and Testing Process
Figure 463: Output Mapping
b) Create an Output Mapping from P_start_SE/MT_P_startProcess/SpareParts/quantity to P_Supplier_DO/ PurchaseOrder/ quantity.
Figure 464: Output Mapping
Note: If the quantity in the source is type N and the target is T you will need a conversion function string(MT_P_startProcess/SpareParts/quantity) c) Create an Output Mapping from P_start_SE/MT_P_startProcess/SpareParts/sparePartNo to P_Supplier_DO/ PurchaseOrder/sparePartNo.
Figure 465: Output Mapping
d) Create an Output Mapping from P_start_SE/MT_P_startProcess/SpareParts/isAvailable to P_Supplier_DO/ SupplierProperties/isAvailable.
Figure 466: Output Mapping
e) Draw Arrows.
Prohibida su reproducción 470
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 467: Data Object
Create an Input Mapping from P_Supplier_DO to P_callSupplier_AA 1. Create an Input Mapping from P_Supplier_DO to P_callSupplier_AA . a) Create a 1:1 Input Mapping from P_Supplier_DO/PurchaseOrder to siSupplierService/ MT_SupplierService_IN/PurchaseOrder. b) Create a 1:1 Input Mapping from P_Supplier_DO/SupplierProperties/isAvailable to siSupplierService/MT_SupplierService_IN/SupplierProperties/isAvailable.
Figure 468: Input Mapping
c) This is an asynchronous interface. So, there is no Output mapping. Draw an arrow from the Data Object to P_callSupplier_AA. Configure the Timer P_timer_T 1. Configure the Timer P_timer_T with an Offset of 2 Minutes. a) Choose P_timer_T → Properties → Timer Configuration. In the Offsetfield, enter 2 Minutes.
Figure 469: TImer
b) Choose Save. Import the Service Interface SI_CallSupplierService_inb from ESR 1. Import the service interface, SI_CallSupplierService_inb from ESR.
Prohibida su reproducción © Copyright. All rights reserved.
471
Unit 7: Deployment and Testing Process
Figure 470: Service Interfaces
a) Assign it to the service reference, StartProcesses .
Figure 471: Service Reference
Create a P_fromSupplier_Trigger, Based on the Service Interface SI_CallSupplierService_inb, and assign it to P_fromSupplier_IME 1. Create a P_fromSupplier_Trigger. a) Choose P_fromSupplier_IME → Event Trigger → Trigger new to start the wizard. Name it P_fromSupplier_Trigger and assign the Service Interface SI_CallSupplierService_inb.
Figure 472: Message Trigger
Assign the Event Trigger to the P_fromSupplier_IME Event-based gateway.
Figure 473: Event Trigger
b) Create a 1:1 Output Mapping from siSupplierServiceResponse/MT_SupplierService to P_Supplier_DO.
Prohibida su reproducción 472
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 474: Output Mapping
c) Draw Arrows.
Figure 475: Connect the Data Object
d) Choose Save. Configure P_isDelivery_XOR? 1. Configure P_isDelivery_XOR?. a) The default branch is the branch, which heads to P_End_EE . Name it Yes. b) Name the branch, heading to P_Escalation_EE No. c) In the expression editor, for the No-branch, enter the following condition: ! P_Supplier_DO/SupplierProperties/isAvailable
Figure 476: P_isDelivery_XOR?
Model the Entry-Correlation at P_fromSupplier_IME In this task, you configure the following: ●
●
The asynchronous answer of the supplier is triggered back to the same process We will configure this by using the ProcessInstanceId of the sending process, delivered in the comment field. 1. Change the input mapping of P_callSupplier_AA. a) Create a mapping from ProcessInstanceAttributes/ProcessInstanceId to MT_SupplierService/SupplierProperties/comment. b) This is the sending process. We want the message to go back to it. The identifier is the ProcessInstanceId.
Prohibida su reproducción © Copyright. All rights reserved.
473
Unit 7: Deployment and Testing Process
Figure 477: Input Mapping
2. Create a Correlation Condition at P_fromSupplier_IME. a) Choose P_fromSupplier_IME → Properties → Correlation Condition and check, if the delivered ProcessInstanceId is identical with the delivered one. b) Enter the following: string-equal(siSupplierService/MT_SupplierService_IN/SupplierProperties/ comment,ProcessInstanceAttributes/ProcessInstanceId)
Figure 478: Correlation Condition
c) Choose Save. Configure the Terminating Escalation Event, P_Escalation_EE 1. Configure the terminating Escalation Event P_Escalation_EE. a) Choose P_Escalation_EE → Event Trigger → Escalation. b) Under Trigger choose DeafultEscalationCritical. c) Flag Terminating. ●
The symbol changes from to .
Figure 479: Event Trigger
Check the P_End_EE 1. Check the P_End_EE. a) Check for P_startProcess_Trigger at P_End_EE. If not, enter it, choosing from the dropdown list.
Prohibida su reproducción 474
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 480: Event Trigger
b) Choose Save and build. c) If an error occurs in the Purchase Order process, assign the Procurement process again.
Prohibida su reproducción © Copyright. All rights reserved.
475
Unit 7: Deployment and Testing Process
Prohibida su reproducción 476
© Copyright. All rights reserved.
Unit 7 Exercise 17 473
Link the P_Process to iFlow CallSupplierService_## and iFlow FromSupplierService_## SP03 Business Example This is the process flow, used in this exercise:
Figure 481: Exercise Data Flow
In this exercise, you will perform the following tasks: ●
Configure the Service Interface SI_CallSupplierService_outb in Service Reference CallServiceAiaAEX
●
Configure the Service Provider P_startProcess_Trigger and P_fromSupplier_Trigger
●
Test the Procurement Process
In this exercise, when the values include ## or xx, replace the characters by the group-number your instructor assigned to you. Configure the Service Interface SI_CallSupplierService_outb in Service Reference CallServiceViaAEX 1. Configure the Service Interface SI_CallSupplierService_outb in Service Reference CallServiceViaAEX. Configure the Service Provider P_startProcess_Trigger and P_fromSupplier_Trigger 1. Configure the Service Provider P_startProcess_Trigger and P_fromSupplier_Trigger. Test the Procurement Process 1. Test the Procurement Process, terminate the Procurement Process by an Error Event.
Prohibida su reproducción © Copyright. All rights reserved.
477
Unit 7: Deployment and Testing Process
2. Test the Procurement Process, terminate the Procurement Process by a Message End Event.
Prohibida su reproducción 478
© Copyright. All rights reserved.
Unit 7 Solution 17 475
Link the P_Process to iFlow CallSupplierService_## and iFlow FromSupplierService_## SP03 Business Example This is the process flow, used in this exercise:
Figure 481: Exercise Data Flow
In this exercise, you will perform the following tasks: ●
Configure the Service Interface SI_CallSupplierService_outb in Service Reference CallServiceAiaAEX
●
Configure the Service Provider P_startProcess_Trigger and P_fromSupplier_Trigger
●
Test the Procurement Process
In this exercise, when the values include ## or xx, replace the characters by the group-number your instructor assigned to you. Configure the Service Interface SI_CallSupplierService_outb in Service Reference CallServiceViaAEX 1. Configure the Service Interface SI_CallSupplierService_outb in Service Reference CallServiceViaAEX. a) Choose the Service Reference CallServiceViaAEX . Then choose the Service Interface SI_CallSupplierService_outb . b) Choose Service Reference —> Overview and enter the following data:
Prohibida su reproducción © Copyright. All rights reserved.
479
Unit 7: Deployment and Testing Process
Field
Value
Type
XI
Sender Component
P_Process_xx
c) Choose Save.
Figure 482: Configure Service Reference
d) Right click in the [Local Development] bit800_xx/pmand choose Development Component → Deploy Configure the Service Provider P_startProcess_Trigger and P_fromSupplier_Trigger 1. Configure the Service Provider P_startProcess_Trigger and P_fromSupplier_Trigger. a) Execute http://nwktdc00.wdf.sap.corp:50000/nwa . Under SOA → Application and Scenario Communication → Application Communucation search for bit800_xx . b) In the Provided Services tab, you should see, the Service Interfaces: ●
P_startProcess ( WS)
●
SI_CallSupplierService_inb ( XI and WS)
c) Now, we configure the P_startProcess Service Interface. d) Assign the SAP Default Profile to P_startProcess by Edit → Assign Profile → SAP_DEFAULT_PROFILE. Then choose OK.
Prohibida su reproducción 480
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
Figure 483: Assign Profile
e) Repeat for the WS of theSI_CallSupplierService_inb and also assign the SAP_DEFAULT_PROFILE.. f) Choose OK, then choose Save. g) Choose Refresh multiple times, until the Processing state becomes green.
Figure 484: Provider Services
Figure 485: SAP_DEFAULT_PROFILE
Test the Procurement Process 1. Test the Procurement Process, terminate the Procurement Process by an Error Event. a) Execute http://nwktdc00.wdf.sap.corp:50000/wsnavigator to start the WS Navigator. b) Flag Provider System , then search for P_StartProcess.
Figure 486: Procurement Process Test
c) Test case: Terminate the Procurement process by an Error Event.
Prohibida su reproducción © Copyright. All rights reserved.
481
Unit 7: Deployment and Testing Process
●
set isAvailable to false
●
all other fields can be filled with values of your wish
Figure 487: Terminate the Procurement process by an Error Event
These are the data, used:
Figure 488: Data
d) The Comment is filled with the ProcessID. e) Both iFlows are used. f) A message is stored in the File system. g) The messages are visible in PIMon. h) The event P_Escalation_EE is always called.
Figure 489: 9
Figure 490: Log
Prohibida su reproducción 482
© Copyright. All rights reserved.
Lesson: Explaining the Configuration of a Process
2. Test the Procurement Process, terminate the Procurement Process by a Message End Event. a) Test case: Terminate the Procurement process by an Error Event. ●
set isAvailible to true
●
all other fields can be filled with values of your wish
Figure 491: Test Terminate the Procurement Process by a Message End Event
These are the data, used:
Figure 492: Data
b) The Comment is filled with the ProcessID. c) Both iFlows are used. d) A message is stored in the file system. e) The messages are visible in PIMon. f) The event P_End_EE is always called.
Figure 493: Data with Comment
Prohibida su reproducción © Copyright. All rights reserved.
483
Unit 7: Deployment and Testing Process
LESSON SUMMARY You should now be able to: ●
Explain configuration of PO processes
Prohibida su reproducción 484
© Copyright. All rights reserved.
Unit 7
481
Learning Assessment
1. What kind of data model does a Web Dynpro use? Choose the correct answer. X
A Context data
X
B Data mapping
X
C Metadata
X
D Process data
Prohibida su reproducción © Copyright. All rights reserved.
485
Unit 7
482
Learning Assessment - Answers
1. What kind of data model does a Web Dynpro use? Choose the correct answer. X
A Context data
X
B Data mapping
X
C Metadata
X
D Process data
Prohibida su reproducción 486
© Copyright. All rights reserved.
UNIT 8
Process Tasks and Monitors
Lesson 1 Managing Process Desk Tasks
488
Lesson 2 Managing Processes with Application Programming Interfaces (APIs)
493
Lesson 3 Starting a Process with an SAPUI5 User Interface
502
Lesson 4 Using BPM Analytics
503
Lesson 5 Using the Business Process Management (BPM) Inbox
509
UNIT OBJECTIVES ●
Manage process desk tasks
●
Manage processes with APIs
●
Use UI5 objects in the process start
●
Monitor a procurement process
●
Use the Business Process Management (BPM) inbox
Prohibida su reproducción © Copyright. All rights reserved.
487
Unit 8 Lesson 1 484
Managing Process Desk Tasks
LESSON OVERVIEW In this lesson you will learn how to manage process desk tasks. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Manage process desk tasks
Universal Worklist
Figure 494: Universal Worklist
The Universal Worklist is the access point for tasks that are assigned to your user. It is available in SAP NetWeaver.
Prohibida su reproducción 488
© Copyright. All rights reserved.
Lesson: Managing Process Desk Tasks
Task Management
Figure 495: Process Desk
Potential owners can claim a task, check the status of a task, and return a task to the Universal Worklist. Users can view other contributors assigned to a task, as well as notes and attachments relating to a particular task.
Figure 496: Task Execution User Interface
When an owner puts a task back on the Universal Worklist, other potential owners can then claim that task.
Prohibida su reproducción © Copyright. All rights reserved.
489
Unit 8: Process Tasks and Monitors
Shared and Delegated Tasks Delegating a task means that the owner of the task assigns one or more additional users to share ownership of the same task. Delegates can view and edit the entire process of a task, including its contributors, notes, and attachments. A delegate can complete a task. You can delegate the task to any user except excluded owners of the task. To delegate a task, use the following procedure: 1. In the Task Execution UI, choose Actions/Delegate. 2. Search for a user to delegate the task to. 3. Optionally, you can enter a note that the user being delegated can see. Putting a task back on the Universal Worklist removes you as the owner and allows potential new owners to claim it. To put a task back on the Universal Worklist, in Task Execution, choose Actions → Put Back. Contributors Owners can assign contributors, or other users, to help complete a task. Once a contributor is assigned to a task, the task displays in the Universal Worklist of that user. Contributors are able to view, and post notes and attachments to a task. Contributors cannot complete a task. Substitution You can assign a substitute owner to a task if an owner is unavailable for a period of time. For planned absences, an owner can assign a substitute owner in advance, and the Universal Worklist of the substitute owner is updated accordingly. For unplanned absences, substitute owners assign themselves as substitute owners before the Universal Worklist is updated. Attachments and Notes Attachments and notes provide an easy way to collaborate with others working on a specific task or the entire process. Attachments include URLs and files. Notes are simple text files. Attachments are posted to the process in Task Execution, and in the Process List Viewer. Attachments are stored in the Enterprise Content Management (ECM) Repository.
Process Visualization Process visualization allows you to view the process workflow as a graphic, such as a workflow chart. The active task is indicated with a green icon. Tasks assigned to you are marked with on orange icon. Details of each task, including errors and subprocesses, are viewed by choosing the task.
Process List Viewer The Process List Viewer shows all of the process instances that are relevant to you as an owner, potential owner, delegate, or contributor. Processes are organized by processes that you own, that you are involved with, and that are relevant to you. To include the Process List Viewer as a related link, use the following procedure: 1. Log into your portal as a content administrator. 2. Choose the Content Administration tab page.
Prohibida su reproducción 490
© Copyright. All rights reserved.
Lesson: Managing Process Desk Tasks
3. In the portal content catalog, choose Portal Content → Content Provided by SAP → End User Content → Standard Portal Users → Pages → Univeral Worklist → Universal Worklist. 4. In the context menu of the Universal Worklist, choose Open → Related Links. 5. In the portal content catalog, choose Portal Content → Content Provided by SAP → End User Content → BPEM/Pages → Process List Viewer. 6. In the context menu of the Process List Viewer, choose Add as a Related Link. 7. Confirm the Add Related Link dialog box. 8. Save your settings. In your Universal Worklist, under Related Links, the Process List Viewer appears. Attachments and Notes Process collaboration can be achieved by posting notes and attachments to the process in the Task Execution UI. These attachements and notes can be visible for an individual task or the entire process. You can also attach files or URLs. To do so, in the Task Execution UI, choose View → Attachments/Notes. The Process List Viewer, allows you to view all the process instances relevant to you, including the notes and attachments for the process instances.
Figure 497: Process List Viewer
The ECM Repository is used to store all attachments used in Business Process Management (BPM) processes. You can access ECM by using the WebDAV protocol. SAP recommends the use of SAP Portal Drive tool available on SMPM. Other web folder tools can be used as well. SAP_FPINFRACALLER role is required to access the ECM Repository. ECM is delivered with the following Software Component Archives (SCAs): ●
ECMCORE00_0.SCA
●
ECMAPPS00_0.SCA
Prohibida su reproducción © Copyright. All rights reserved.
491
Unit 8: Process Tasks and Monitors
LESSON SUMMARY You should now be able to: ●
Manage process desk tasks
Prohibida su reproducción 492
© Copyright. All rights reserved.
Unit 8 Lesson 2 489
Managing Processes with Application Programming Interfaces (APIs) LESSON OVERVIEW In this lesson you learn how to manage processes with application programming interfaces (APIs). LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Manage processes with APIs
Business Process Management APIs Table 10: BPM API Use Cases API Purpose
Functionality
Examples
Technology independent UI
Makes UIs capable of executing tasks
API-based on WebServicesHumanTask (WS-HT) Standard JavaServer Pages (JSP), .NET, Mobile (Android/ iPhone), Rich Internet Applications (RIAs) (Silverlight), Simple Object Access Protocol/ Representational State Transfer (SOAP/REST)
Customized Task List, Universal Worklist, UIs
Makes it possible to customize Customized Universal Worklist UIs and features screens and technology-independent customized Universal Worklist fields
Multiple and simultaneous task completion
Produces a productivity gain
Query functionality
Provides rich task and process Current users outstanding and query capabilities completed tasks and processes
Complete, approve, and reject multiple tasks at once
While SAP NetWeaver Administrator and the Universal Worklist enables users to interact directly with the BPM system to manipulate tasks and processes, you can work with and configure tasks
Prohibida su reproducción © Copyright. All rights reserved.
493
Unit 8: Process Tasks and Monitors
and processes at a more technical level. BPM and the Task Management UI enable you to develop applications that interact with the tasks and processes in the BPM system. By accessing a BPM task through APIs, it is possible to build customized task lists and task execution UIs. In addition, you can also utilize additional UI technologies, for example, building a UI to execute a task from a mobile device.
API Architecture
Figure 498: BPM API Architecture
The BPM APIs are available as Enterprise Java Beans (EBJs) and provide access to the processes and tasks of the BPM system. Custom web services are required to expose APIs outside of the engine. The APIs are dependent on existing and deployed BPM processes including UIs, process context, task input, and output mappings. The APIs are executed using the currently logged on user context.
API Factory Class and Methods Table 11: API Classes Process Step
Manager Class
Locate process details
Process Definition Manager
Start a process
Process Start Manager
Locate the running process instance details
Process Instance Manager
Retrieve and manipulate task instances
Task Instance Manager
The main entry point to the BPM API is through the BPMFactory class. The following managers, responsible for different objects in the BPM system, can be accessed from the BPM API:
Prohibida su reproducción 494
© Copyright. All rights reserved.
Lesson: Managing Processes with Application Programming Interfaces (APIs)
Process Definition Manager The ProcessDefinitionManager class is the central access point to find and manage deployed process definition objects and provides access to the Process Definition ID. Process Start Manager The ProcessStartManager class is the central access point for starting processes. It provides input for the Process Definition ID and returns a Process Instance ID. Process Instance Manager The ProcessInstanceManager class is the central access point for retrieving and handling process instances and provides process details. Task Instance Manager The TaskInstanceManager class is the central access point for retrieving and manipulating task instances. It provides task information including the task list, details, and complete task functionality. Enhancements in the BPM Task API ●
Release a task again after claiming it
●
Delegate a task to someone else
●
Nominate someone to be the new actual owner of a task
●
Change the priority of a task
●
Traverse process and task hierarchies
●
Paging support for inbox queries
API Examples There are several common use cases that can be accomplished using the different BPM API Managers. Process Definition Manager The Process Definition Manager is used to display available BPM process definitions and their details. To list active and deployed BPM processes, use the following code: ProcessDefinitionManager pdm = BPMFactory.getProcessDefinitionManager (); Set processDefinitions = pdm.getActiveProcessDefinitions () for (ProcessDefinition def : processDefinitions) { String pDefID = def.getId().toString() String pName = def.getName(); } You can search for specific process definitions by vendor (VD), development component (DC), and process name (PN) using the following code: ProcessDefinitionManager pdm = BPMFactory.getProcessDefinitionManager(); String vd = "demo.sap.com"; String dc = "bpm~73~api~bpm"; String pn = "PMC361 PO Request and Approve Process"; ProcessDefinition def = pdm.getActiveProcessDefinition(vd,dc, pn); String pDefID = def.getId().toString()
Prohibida su reproducción © Copyright. All rights reserved.
495
Unit 8: Process Tasks and Monitors
When you have the Process Definition ID, the Process Start Manager is able to start the specific process definition. Process Start Manager
Figure 499: Task Definition Attributes
The Process Start Manager is used to create a process instance for a given process definition. The start of the process is triggered by a start event. The interface through which data is provided is defined at the start of the process.
Figure 500: Start Event Data
Create a process instance, using the following steps: 1. Use the Process Definition Manager to locate the process definition ID. 2. Find the Start event process definition specified by the process definition ID. 3. Create input data for the Start event. 4. Start the process. To start a process instance with input data, use the following code: ProcessStartManager psm = BPMFactory.getProcessStartManager(); URI uri = URI.create(processDefinitionID); Setpse = psm.getProcessStartEvents(uri);
Prohibida su reproducción 496
© Copyright. All rights reserved.
Lesson: Managing Processes with Application Programming Interfaces (APIs)
ProcessStartEvent psev = pse.iterator().next(); DataObject psdo = psm.createDataObjectForStartEvent(psev); psdo.setString(psdo.getType().getProperty("UserID"), "employee"); psdo.setString(psdo.getType().getProperty("ProductID"), "100ABC); psdo.setString(psdo.getType().getProperty("ProductName"), "Apples"); psdo.setString(psdo.getType().getProperty("ProductQuantity"), 12); psdo.setString(psdo.getType().getProperty("SpecialInstructions"), "Rush!"); URI processInstanceId = psm.startProcess(psev, psdo); Process Instance Manager The Process Instance Manager is used to display information about running process instances. To display the name, start date, and end data of a process instance that is specified by its instance ID, use the following code:
Figure 501: Process Instance Information
ProcessInstanceManager pim = BPMFactory.getProcessInstanceManager(); ProcessInstance pi = pim.getProcessInstance(processInstanceID); Date startDate = pi.getStartDate(); Date endDate = pi.getEndDate(); String name = pi.getSubject(); Task Instance Manager The Task Instance Manager is used to display and manipulate the running process instances. To get a list of tasks running for the current user, use the getMyTaskAbstracts method. This method returns a set of TaskAbstract objects. These objects include basic task information, such as ID, name, and current state.
Prohibida su reproducción © Copyright. All rights reserved.
497
Unit 8: Process Tasks and Monitors
Figure 502: Task Input Data
To read the data that was provided to the task by the process, use the TaskDetail object, which is available in the Task Instance Manager. To read the input data for tasks assigned to the logged on user, use the following code: TaskInstanceManager tim = BPMFactory.getTaskInstanceManager(); HashSet status = new HashSet(); status.add(Status.READY); status.add(Status.IN_PROGRESS); Set myTasks = tim.getMyTaskAbstracts(status); Iterator iter = myTasks.iterator(); while (iter.hasNext()){ TaskAbstract task = iter.next(); URI taskID = task.getId(); TaskDetail td = tim.getTaskDetail(taskID); String name = td.getName(); DataObject ido = tim.getTaskDetail(taskID).getInputDataObject(); DataObject order = ido.getDataObject("Context").getDataObject("DO_Order"); String productID = order.getString("ProductID"); }
Note: Viewing tasks with the status READY or IN_PROGRESS, returns the tasks that a user sees in the Universal Worklist.
Prohibida su reproducción 498
© Copyright. All rights reserved.
Lesson: Managing Processes with Application Programming Interfaces (APIs)
Figure 503: Task Output Data
The TaskDetail object is also used to set a task's output data. The following code shows how the output data for a task is defined: TaskInstanceManager tm = BPMFactory.getTaskInstanceManager(); URI uri = URI.create(taskInstanceID); TaskDetail taskDetail = tm.getTaskDetail(uri); DataObject oObj = taskDetail.getOutputDataObject(); String ct = "ApproveCompleteEvent"; DataObject ctx = oObj.createDataObject(oObj.getType().getProperty(ct)); DataObject order = ctx.createDataObject(ctx.getType().getProperty("DO_Order")); order.setString(order.getType().getProperty("ApprovalComments"), "OK")); order.setBoolean(order.getType().getProperty("Approved"),true)); tm.complete(uri, oObj); Task Lifecycle States Apart from the data, the status of a task can also be changed. The Task Instance Manager also lets you change the status of a task. The following states are available: Table 12: Task Lifecycle States State
Method
User Action
N/A
A new task is created Status changes to and assigned to a user Ready or group of users.
Ready
Reserved
Claim
The task is claimed by a user and removed from the list.
Result
Executes the Claim method, status changed to Reserved
Prohibida su reproducción © Copyright. All rights reserved.
499
Unit 8: Process Tasks and Monitors
State
Method
User Action
Result
In Progress
Start
The user starts to work on the task and executes the Start method
Status changes to In Progress
Complete
Complete
The task is updated and the Complete method is executed.
Workflow continues to the next step, status changes to Complete.
A task that is created in the BPM system starts in a READY state. When the task is claimed through the API, the task is assigned to the logged on user and changes to a RESERVED state. To show that a user has already worked with a task the state changes to IN_PROGRESS. Once the task is completed with the appropriate output data, the task state changes to COMPLETE. To claim, start, and complete a task, use the following code: TaskInstanceManager tm = BPMFactory.getTaskInstanceManager(); URI uri = URI.create(taskID); tm.claim(uri); // = RESERVED tm.start(uri); // = IN_PROGRESS .... tm.complete(uri, data); // = COMPLETE }
Note: To use a BPM API, it is necessary to set a dependency to the tc/bpem/facade.ear development component. This development component is located in the BPEMFACADE software component. BPM Executable Tasks The following tasks can be executed using BPM APIs: ●
Build your own task worklist
●
Build your own Task Execution UI
●
Start a process
●
Execute a task using SAP StreamWork as collaboration platform
●
Create substitution rules
●
Create your own administration UI
●
●
Obtain statistics about processes, tasks and events for business process administrators and business task administrators Enable Search for process instances based on the process context data reported in the reporting data sources
Prohibida su reproducción 500
© Copyright. All rights reserved.
Lesson: Managing Processes with Application Programming Interfaces (APIs)
LESSON SUMMARY You should now be able to: ●
Manage processes with APIs
Prohibida su reproducción © Copyright. All rights reserved.
501
Unit 8 Lesson 3 498
Starting a Process with an SAPUI5 User Interface LESSON OVERVIEW This lesson shows you how to use UI5 objects in the start process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Use UI5 objects in the process start
SAPUI5 Object Usage in the Process Start SUPUI5 technology can be used to start BPM processes. In general, a process can be started using a UI created with SAPUI5, or the SAPUI5 functionality uses the OData service. It is possible to consume a WSDL by an Ajax call, but it is recommended that a rest service be used for calling the WSDL. The BPM OData service enables simplified access to BPM task data with a custom user interface based on a modern Web technology like SAPUI5. SAPUI5 supports several data sources, such as XML and OData. The UI controls of a view are connected to a data source with a data binding, so that the controls are updated automatically whenever the application data is changed. A model is provided by SAPUI5 for each supported data source. If OData is the data source, the model instance is called ODataModel. The ODataModel enables the binding of controls to data from OData services. The constructor of the ODataModel has the service URL as a parameter to connect itself to the OData service. Requests to the service to fetch data are created automatically according to the data bindings defined in the UI controls. LESSON SUMMARY You should now be able to: ●
Use UI5 objects in the process start
Prohibida su reproducción 502
© Copyright. All rights reserved.
Unit 8 Lesson 4 499
Using BPM Analytics
LESSON OVERVIEW This lesson shows you how to monitor a procurement process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Monitor a procurement process
Analytics Requirements SAP NetWeaver comes with several analytical tools which can be used for analyzing the BPM processes and tasks, including the following: ●
Analyzing and reporting business data in the processes
●
Analyzing and reporting the process and tasks
Analyzing and Reporting Business Data During BPM process modeling, it is possible to add reporting activities based on process context (that is, data objects) to automatically generate the reporting data structure. A reporting activity is used to collect data from the process context that can be analyzed. The reporting activity references a reporting data source and indicates where in the process data is gathered for reporting. An input mapping needs to be defined for the reporting activity to specify which data from the process context is collected by the reporting activity. This can be realized by using the SAP NetWeaver Visual Composer, which provides a modeldriven user interface (UI) development tool for transactional and analytical UIs, including the incorporation of voice and mobile interaction into enterprise applications. Analyzing and Reporting Processes and Tasks The Analytics Dashboard is used to analyze and report on processes and tasks.
Prohibida su reproducción © Copyright. All rights reserved.
503
Unit 8: Process Tasks and Monitors
Analytics Launch
Figure 504: The BPM Analytics Dashboard
With 7.3 EHP 1, you can use the BPM analytical dashboard for multiple purposes. BPM Analytics has the following capabilities: ●
A dashboard for giving an overview of process and task key figures
●
A direct access to key figures for processes
The BPM Analytics dashboard allows access to statistics for processes and tasks in graphical charts. These statistics are based on various timeframe filters, which can be set by the user. Additionally, the number of processes and tasks in error state, tasks without owner, and escalated tasks are displayed. Also, it is possible to directly navigate to the selected process and task instances in the Manage Processes and Manage Tasks application. To enable the launch of the BPM Analytics dashboard, the user must be a business administrator for the process and task or a super user with the DISPLAY_ALL permission. The following rules must also be assigned to the user: ●
BPEM End User
●
SAP_BPM_Navigation
●
Every User Cole Role
●
Everyone
Note: Only those processes and task definitions for which the user is the administrator are displayed. To access the BPM Analytics dashboard, perform the following steps: 1. In your internet browser, log on to http://:/bpmanalytics.
Prohibida su reproducción 504
© Copyright. All rights reserved.
Lesson: Using BPM Analytics
Note: The dashboard displays the statistics of top processes and tasks for the current date in a graphical format. The business activity graph displays the processes and tasks that are started or created and completed for the current date. The top processes and tasks in the chart imply that the corresponding process definition and task definition have the maximum number of process and tasks instances. 2. To view the graphical chart with top processes and their status for a specific period, choose the appropriate time interval from the Select Duration dropdown under the Top Processes chart. 3. To view the name, count and status of the process instance, select any bar on the Top Processes chart. 4. To view all process instances under each status, choose View Details below the Top Processes chart. In the View Details window, select any cell to navigate to the NWA Manage Processes application to view the complete details of the process instances.
Note: Select the process name cell to open all process instances irrespective of their status. Select the individual cell to display only the process instances in the selected status. 5. To view graphical chart with the top tasks and their status for a specific period, choose the appropriate time interval from the Select Duration dropdown under the Top Tasks chart. 6. To view the name, count, and status of the task instance, select any bar on the Top Tasks chart. 7. To view all tasks under each status, choose View details below the Top Tasks chart. In the View Details window, select any cell to navigate to the NWA Manage Tasks application to view the complete details of task instances.
Note: Select the process name to open all tasks instances irrespective of their status. Select the individual cell to display the tasks instances in the selected status. 8. To view the business activity graph of the processes and tasks for a particular period, choose time interval from the Select duration dropdown.
Prohibida su reproducción © Copyright. All rights reserved.
505
Unit 8: Process Tasks and Monitors
Note: The business activity graph shows processes that are started and completed, and the tasks that are created and completed. 9. To view the number of process instances in the error state in the NWA Manage Processes application, choose View details next to Processes in Error under Troubleshooting. 10. To view the task instances in the error state in the NWA Manage Tasks application, choose View details next to Tasks in Error under Troubleshooting. 11. To view the task instances without an owner in the NWA Manage Tasks application, choose View details next to Tasks without owner under Troubleshooting. 12. To view the escalated task instances in the NWA Manage Tasks application, choose View details next to Task escalated under Troubleshooting. 13. To display the most recent processes and tasks statistics, choose Refresh. 14. To view the statistics of processes in detail, select the Processes tab. 15. To view statistics of tasks in detail, select the Tasks tab. The Process Tab
Figure 505: BPM Analytics Processes Tab
To access the BPM Analytics Processes tab, log on to http://:/ bpmanalytics, then go to the Processes tab.
Note: The processes chart displays the top processes and their status for the current date in the graphical format. The time duration chart displays the maximum, minimum, and average time taken by top processes from start to end. The top processes in the chart imply that the corresponding process definition has the maximum number of the process instances.
Prohibida su reproducción 506
© Copyright. All rights reserved.
Lesson: Using BPM Analytics
Use the following procedures to view processes and details: 1. To view processes in a particular state in the Top Processes chart, choose the appropriate status from the Select Status dropdown list. 2. To view processes for a particular time interval in Top Processes chart, choose the appropriate time interval from the Select Duration dropdown list. 3. To view processes in a particular state in the Time Duration graph, choose the appropriate status from the Select Status dropdown list. 4. To view processes for a particular time interval in the Time Duration graph, choose the appropriate time interval from the Select Duration dropdown list. 5. To view details of all the processes in a new window, choose View details below each chart. In the View Details window, select any cell to navigate to the NWA Manage Process application to view the complete details of process instances. 6. To view the number of processes created and completed in a particular time period in the History graph, choose the appropriate time interval from the Select Duration dropdown list. 7. To display the most recent statistics of processes, choose Refresh. The Task Tab
Figure 506: The BPM Analytics Tasks Tab
For the Task tab, the same prerequisites as for the dashboard are valid. To access the Tasks tab, log on to http://:/bpmanalytics. Go to the Tasks tab.
Note: The tasks chart displays the top tasks and their status for the current date in graphical format. The time duration chart displays the maximum, minimum, and average time taken by the top tasks from start to end. The top tasks in the chart imply that the corresponding task definition has the maximum number of tasks instances. Use the following procedures to view tasks:
Prohibida su reproducción © Copyright. All rights reserved.
507
Unit 8: Process Tasks and Monitors
1. To view tasks in a particular state in the Top Tasks chart, choose the appropriate status from the Select Status dropdown list. 2. To view tasks for a particular time period in Top Tasks chart, choose the appropriate time interval from the Select Duration dropdown list. 3. To view tasks in a particular state in the Time Duration graph, choose the appropriate status from the Select Status dropdown list. 4. To view tasks for a particular time interval in the Time Duration graph, choose the appropriate time interval from the Select Duration dropdown list. 5. To view the number of tasks opened and completed for a particular time period in the History graph, choose the appropriate time interval from the Select Duration dropdown list. To display the most recent statistics of tasks, choose Refresh. The Analytics Public API for Business Users It is also possible to use the BPM analytics public API (Analytics Manager, com.sap.bpm.analytics.api) to obtain analytics information for business process administrators and business task administrators. You can display statistics pertaining to processes, tasks, and events. To be able to use this API, the current user must be a business process administrator or a business task administrator for any active instance on the system. The archived instances are not taken into account. The statistics provided by this interface includes only the process instances for which the logged in user is assigned as one of the business process administrators and the task instances for which the logged in user is assigned as one of the business task administrators. LESSON SUMMARY You should now be able to: ●
Monitor a procurement process
Prohibida su reproducción 508
© Copyright. All rights reserved.
Unit 8 Lesson 5 505
Using the Business Process Management (BPM) Inbox LESSON OVERVIEW This lesson shows you how to use the Business Process Management (BPM) inbox. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Use the Business Process Management (BPM) inbox
BPM Inbox Requirements
Figure 507: The BPM Inbox
The BPM inbox provides easy, simplified access to the business outcomes of BPM processes. The BPM inbox is a central workplace for a business user to view and perform actions on tasks from the BPM system, including the following: ●
View a task
●
Claim a task
●
Release the task that is reserved for you
●
Complete a task
Prohibida su reproducción © Copyright. All rights reserved.
509
Unit 8: Process Tasks and Monitors
You can access the BPM inbox through the following url: http://:/ bpminbox.
BPM Inbox Configuration Configuring BPM Inbox Users The BPM Inbox requires additional administration and portal roles, comparable to the roles used in the BPM. The following table lists the administration and portal roles used in BPM Inbox to view and work on the corresponding tasks: Table 13: BPM Inbox Roles Role Category
Role
Description
Comment
Administration UME Role
UnifiedInboxUserRole
UnifiedInboxUserRole Data source: UME daenables the user to ac- tabase cess the tasks and their details within a BPM Inbox application.
Portal Role
com.sap.bpem.ENDuser
BPEM End User role Data source: portal enables the user to role work on the tasks and task execution user interface within a BPM Inbox application.
The following procedure is used to configure users for BPM Inbox so they can access and work on the tasks: 1. In your browser, enter the following url: http://:/nwa to open SAP NetWeaver Administrator. 2. Log on to SAP NetWeaver with administrator credentials. 3. Choose Configuration → Identity Management. 4. Select the search criteria User, then enter the user name (or part of the user name) to which you want to assign the role. 5. Choose Go. 6. Select the user or group from the table and choose the Assigned Roles tab. 7. Choose Modify. Table 14: Modify Attributes Purpose
Search Criteria
User Role
Access tasks in the inbox
UME Database
UnifiedInboxUserRole
Prohibida su reproducción 510
© Copyright. All rights reserved.
Lesson: Using the Business Process Management (BPM) Inbox
Purpose
Search Criteria
User Role
Work on tasks
Portal Roles
com.sap.bpem.Enduser
Managing Substitution Rules in the BPM Inbox It is possible to enable substitution in BPM Inbox to either nominate a user to whom you can assign your tasks or to take over tasks from other users in case of planned absence or during an emergency. The planned and unplanned scenarios can be managed by substitution rules. To view all substituted tasks for a user, choose the Tasks Assigned To Me option from the All Tasks dropdown list. If more than one user has assigned tasks to the user, who checks substitutions, it is possible to select the user who has nominated the substitute by selecting the On Behalf Of dropdown list. As a substitute, the tasks displayed in the inbox are the tasks that are in Ready status in the assignee’s inbox. To work on a task, select the task, and then choose Claim. When a task is claimed, the task moves from the Task Assigned To Me list to the My Tasks list and its status changes to Reserved in your inbox. On refreshing the task list, the task is no longer visible in the inbox of the assignee or other substitutes. To assign a task to a substitute, that the user is currently working on, you must select and release the task. As an assignee, when a task is assigned, the status of the task changes from Reserved to Ready. On refreshing the task list, the task is visible in the inbox of your substitutes. Creating Substitution Rules
Figure 508: Substitution Rules
To create substitution rules, use the following procedure: 1. From the Settings icon, click the dropdown arrow and select the Manage Substitution Rules option. 2. On the My Substitutes screen, choose New to create a substitution rule. 3. On the Create Substitution Rule screen, in the Substitute field, enter or choose a user. 4. If you are unavailable due to planned leave, set Automatic Forwarding to On. The substitution rule is displayed in the Inactive section of the I Am Substituting tab of your substitute until the current date. The rule is activated on the current date and the tasks are displayed in the Active section of the substitute’s inbox.
Prohibida su reproducción © Copyright. All rights reserved.
511
Unit 8: Process Tasks and Monitors
5. If you are unavailable due to unexpected absence, create the substitution rule in advance and set Automatic Forwarding to Off. The substitution rule is displayed in the Inactive section of the I Am Substituting tab of your substitute. To receive your tasks in the task list, the substitute must activate the rule by choosing On. Enabling Substitution Rules To enable substitution rules, use the following procedure 1. Choose Manage Substitution Rules. 2. In the My Substitutions tab, view the rules you have created.
Note: The Active section displays the substitution rules that are within the current date range. The Inactive section displays the substitution rules you have created in the past or for a future date. If the rule is created for a later date, the rule moves to the Active section on the start date. If the start date of the rule has exceeded the current date, the rule is no longer active and the status changes to Outdated. 3. To stop your substitute from receiving your tasks, disable the substitution rule by choosing the Off button. 4. To delete a substitution rule, choose the Delete icon. 5. In the I Am Substituting tab, you can view the substitution rules created by other users who have nominated you as a substitute. The Inactive section displays the substitution rules that you have either not accepted or which are not within the current date range. The rule moves to the Active section and you start receiving tasks of your assignee in your inbox. To accept or to take over the rule from the Inactive section, choose On. The rule moves to the Active section and you start receiving the tasks of your assignee in your inbox.
Different Inboxes for Task Delivery Operating Tasks You can view the tasks that are assigned to you and perform one of the following operations at a time: ●
View a task
●
Claim a task
●
Release the task that is reserved for you
●
Complete a task
To view operating tasks, perform the following steps: 1. Log on to your BPM Inbox at the following url:http://:/nwa.
Prohibida su reproducción 512
© Copyright. All rights reserved.
Lesson: Using the Business Process Management (BPM) Inbox
Your open tasks are displayed in the BPM Inbox by default. To view tasks in other categories such as My Completed Tasks, My Overdue Tasks, or My Escalated Tasks, select the required option from the Task Selection dropdown list. 2. To view the task details, choose the task name from the task list table. 3. To view a specific number of rows in the task list table, choose Settings from the toolbar and select the appropriate number of rows from the Table Row Settings dialog box. 4. To claim a task that is assigned to you (and complete it or release it to another user) choose a task in the task list. The Claim, Open, or Release option is enabled or disabled based on the status of the selected task. The detailed information on each task status and possible actions are explained in the following table: Table 15: Task Statuses and Actions Task Status
Possible Action
Status Change
Ready
You can claim the task
Reserved
Reserved
You can claim the task
Ready
You can complete the task
Completed
Completed
No operations possible
No status change
In Progress
You can release the task
Ready
You can complete the task
Completed
Note: You can also execute actions on multiple tasks that have the same status. To do so, select multiple tasks (Ctrl+Select) and choose the appropriate action button. For example, to complete multiple tasks, select two or more tasks from the task list table and choose Open. The task execution user interface is opened with multiple tasks. You can navigate to a specific task using the previous and next navigation icon and perform required action and complete the tasks. To filter the tasks, choose the Filter option and choose the required criteria. Managing Tasks with BPM Inbox You can manage tasks in the following ways: ●
Share a task with other users who can contribute to its execution. Task sharing allows the owner of the task to invite contributors to work on a particular task instance. Every user can be a contributor, except the owner. If any user is invited for a task contribution that user will get the task in their task list in the BPM Inbox. If they open the task, they see who the actual owner of the task is and the task description, if any.
●
Delegate the task (if you want to completely hand over the task responsibility to another user).
Prohibida su reproducción © Copyright. All rights reserved.
513
Unit 8: Process Tasks and Monitors
●
Put back the task to the task owner if you are not able to complete it or do not have the resources to complete it.
●
View task details and process the task.
●
Add and download attachments in the form of documents or URLs.
●
Add notes that are visible on all process levels.
Depending on the availability that is set, you can see all previously added notes along with details such as who added the note and on what date and time. Deleting a Task To delete a task, use the following procedure: 1. In the BPM Inbox, choose the task you want to delegate. 2. In the Task Execution screen, open the Actions menu and choose Delegate. 3. In the Delegate dialog box, enter the name of the user you want to delegate to the individual task. To find a particular user name, enter the first name of the user in the User field and choose Find. In the search results, choose the user and choose Go. The applicable user is automatically entered in the Delegate dialog box. 4. In the Delegate dialog box, choose OK. Once you have delegated a task, you cannot complete this task. The delegate is now the owner of the task. Only this individual task is delegated to the user nominated as the delegate. Putting Back a Task To put back a task, in the Task Execution screen, open the Actions menu and choose Put Back. The task is put back and the Task Execution screen closes. Managing Attachments To manage attachments, use the following steps: 1. In the Task Execution screen, open the View menu and choose Attachments. 2. From the Attachments area, in the Add menu, choose whether you want to add a file or a url. 3. If you want to attach a file, choose Browse and select the file from a file directory. 4. If you want to add a title to the file, specify the title in the Title field. 5. To make the selected file available only for a particular task, select the Only for members of this task option. 6. To make the selected file available for entire process, select the For all involved users of embedding process option. 7. Choose OK. 8. To download an attachment, choose the title link.
Prohibida su reproducción 514
© Copyright. All rights reserved.
Lesson: Using the Business Process Management (BPM) Inbox
9. To delete an attachment, open the context menu of the icon next to the attachment title and choose Delete. Adding Notes To add notes, use the following steps: 1. In the Task Execution screen, choose the View menu, then choose Notes. 2. Choose Add.
Note: You can customize your note by text by using the formatting button. You cannot delete notes. 3. To make the selected file available only for a particular task, select the Only for members of this task option. 4. To make the selected file available for entire process, select the For all involved users of embedding process option.
BPM Inbox Custom Attributes Depending on the products, custom attributes can be set and delivered or transferred in the business processes and then used in the inbox for additional purposes, like assignment, sort, or display. These attributes are to be assigned in a task and mapped depending on the business data. In the BPM Inbox, these attributes can be used with the Filter button.
Note: Display of the custom attributes requires a release higher than 7.40, SP03.
LESSON SUMMARY You should now be able to: ●
Use the Business Process Management (BPM) inbox
Prohibida su reproducción © Copyright. All rights reserved.
515
Unit 8: Process Tasks and Monitors
Prohibida su reproducción 516
© Copyright. All rights reserved.
Unit 8
513
Learning Assessment
1. What provides detailed information about tasks? Choose the correct answer. X
A Process Management
X
B Process Repository
X
C Process Visualization
X
D Task Management
2. What does the Universal Worklist provide potential owners? Choose the correct answer. X
A A list of available tasks.
X
B A list of claimed tasks.
X
C A list of potential owners.
X
D The status of claimed tasks.
3. What does the Process List View show? Choose the correct answer. X
A All process instances available in a process.
X
B All process instances running in a process.
X
C All process instances relevant to you.
X
D All process instances that are completed.
Prohibida su reproducción © Copyright. All rights reserved.
517
Unit 8: Learning Assessment
4. What is NetWeaver Administrator used for? Choose the correct answers. X
A Assigning roles
X
B BPM processes
X
C Composite Environment projects
X
D Manage the proces flows
5. BPMN processes are always initiated by a WS call at the endpoint of start message events. The start message event acts as a web service provider. Which of the following methods is valid for starting the web service? Choose the correct answer. X
A Over any WS client
X
B The Process Repository in SAP NetWeaver Administrator
X
C Using the Web Service Navigator as a WS client
6. What provides detailed information about available processes? Choose the correct answer. X
A Process Management
X
B Process Repository
X
C Process Visualization
X
D Task Management
7. Which messages are displayed in the PIMON Monitor? Choose the correct answers. X
A WS messages (SOAP is the message protocol)
X
B XI messages (XI-Message protocol 3.x is the message protocol)
X
C RFC messages (RFC Specific Message Protocol is the message protocol)
Prohibida su reproducción 518
© Copyright. All rights reserved.
Unit 8
515
Learning Assessment - Answers
1. What provides detailed information about tasks? Choose the correct answer. X
A Process Management
X
B Process Repository
X
C Process Visualization
X
D Task Management
2. What does the Universal Worklist provide potential owners? Choose the correct answer. X
A A list of available tasks.
X
B A list of claimed tasks.
X
C A list of potential owners.
X
D The status of claimed tasks.
3. What does the Process List View show? Choose the correct answer. X
A All process instances available in a process.
X
B All process instances running in a process.
X
C All process instances relevant to you.
X
D All process instances that are completed.
Prohibida su reproducción © Copyright. All rights reserved.
519
Unit 8: Learning Assessment - Answers
4. What is NetWeaver Administrator used for? Choose the correct answers. X
A Assigning roles
X
B BPM processes
X
C Composite Environment projects
X
D Manage the proces flows
5. BPMN processes are always initiated by a WS call at the endpoint of start message events. The start message event acts as a web service provider. Which of the following methods is valid for starting the web service? Choose the correct answer. X
A Over any WS client
X
B The Process Repository in SAP NetWeaver Administrator
X
C Using the Web Service Navigator as a WS client
6. What provides detailed information about available processes? Choose the correct answer. X
A Process Management
X
B Process Repository
X
C Process Visualization
X
D Task Management
7. Which messages are displayed in the PIMON Monitor? Choose the correct answers. X
A WS messages (SOAP is the message protocol)
X
B XI messages (XI-Message protocol 3.x is the message protocol)
X
C RFC messages (RFC Specific Message Protocol is the message protocol)
Prohibida su reproducción 520
© Copyright. All rights reserved.
UNIT 9
The Complete Integration Process
Lesson 1 Configuring Referenced Activities
522
Lesson 2 Explaining Boundary Events in the Delivery and Purchase Order Process Exercise 18: Maintain the PO Process in PO_GoToProcurement_RP SP03
523 527
Exercise 19: Insert a MessageMapping into the iFlow SP03
535
Lesson 3 Running the Purchase Order Process Exercise 20: Test the Whole Process SP03
544 551
UNIT OBJECTIVES ●
Configure referenced activities
●
Explain boundary events in the delivery and purchase order process
●
Execute a purchase order process
Prohibida su reproducción © Copyright. All rights reserved.
521
Unit 9 Lesson 1 518
Configuring Referenced Activities
LESSON OVERVIEW This lesson shows you how to configure reference activities. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Configure referenced activities
Referenced Activities Referenced subprocesses are standalone processes in their own right. Other processes can reference or call them. The following details need to be taken into consideration for a referenced subprocess: ●
●
●
●
A referenced subprocess is an independent process that can run on its own. It contains its own context data and objects. It can be called and referenced by another process. It has a start event and end event and has no restrictions in terms of the type of SAP Business Process Management (BPM) steps that it can use. By default, the subprocess can only be called by other processes that are contained in the same DC. If you need to create a reference from a process in another development component (DC), then you will have to create some dependencies between the different DCs and expose public parts. Based on its behaviors and properties, consider using a referenced subprocess in the following circumstances: -
-
-
The process to be modeled is too large to be drawn in one sheet. The group of steps included in the subprocess can be reused by other process in the same DC. The subprocess can exist on its own as a main process. The attributes of the properties of a referenced subprocess and their roles are described in the next sections.
LESSON SUMMARY You should now be able to: ●
Configure referenced activities
Prohibida su reproducción 522
© Copyright. All rights reserved.
Unit 9 Lesson 2 519
Explaining Boundary Events in the Delivery and Purchase Order Process LESSON OVERVIEW This lesson gives you an explanation on boundary events in the delivery and purchase order process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain boundary events in the delivery and purchase order process
Boundary Event Types In Business Process Modeling Notation (BPMN) 2.0, there are special types of events called boundary events. These types of events are triggered from outside the process or when something does not go according to the plan of the process while performing a human or automatic activity. When an exception is thrown by an activity, the process flow stops the normal process execution and follows an alternative path, as defined by the outgoing sequence flow of that particular boundary event. The boundary event and an end event are both represented with a thick-lined circle. With a boundary event, you can define how to deal (that is, catch the exception) with exceptional situations when they arise at runtime in the process flow. Boundary events are a must have when using automated activities in your business processes. They allow you to perform exception handling after an application or technical exception has occurred. You can configure a boundary event to automatically handle exceptions thrown by automatic activities. You can do this by binding boundary events to fault message types defined in your web services definition. Typical examples of application exceptions are functional errors and wrong input or output inside business rules. Technical exceptions, on other hand, are timeouts, authentication issues, network-related issues, and so on. For those of you with a software programming background in Java or C#, you can compare it with a TRY/CATCH exception block. A boundary event has a single outbound sequence flow and is connected to the boundary of an activity. The outbound sequence flow of a boundary event indicates how the process should continue or recover after an exception has been detected.
Prohibida su reproducción © Copyright. All rights reserved.
523
Unit 9: The Complete Integration Process
Figure 509: Boundary Event Types
In the figure, Boundary Event Types, an escalation event is triggered if the employee does not complete his task by the set deadline. The outgoing sequence flow of this boundary event goes into a notification task, which sends a reminder email to the employee. In a real-life scenario, we recommend that you add a condition (for example, a max of three reminders, and then exit the loop) that prevents an endless loop situation like the one in this example. You should take note of the following event characteristics: ●
Events are the things that you expect to happen at process runtime.
●
They exist in four main groups: start, end, intermediate, and boundary.
●
Start, end, and intermediate message events are linked to service interfaces at design time.
●
There is no guarantee that an intermediate event may or may not occur in the process.
●
Boundary events are used to handle exceptions thrown by process activities during runtime.
When looking at boundary events from a specific human task context, they represent situations in which the execution of a human task can fail or terminate in error. The exceptions are generally generated as a result of one of the constraints set by the task’s attribute settings (such as start deadline, activation time and so on) not being met. The exceptional or erroneous situation in a human task can be categorized as follows: ●
Critical Exceptions The task processing is canceled, and the corresponding boundary event should catch and handle the exception.
●
Noncritical Exceptions The task processing is not canceled and carries on its processing normally from the noncritical boundary event.
Table 16: Human Task Exception Events These are the possible exception types:
Prohibida su reproducción 524
© Copyright. All rights reserved.
Lesson: Explaining Boundary Events in the Delivery and Purchase Order Process
Exception
Description
CompletionDeadlineIsCriticalException
Completion Deadline Raise critical exception when deadline is reached.
CompletionDeadlineIsNonCriticalException
Completion Deadline constraint is not met and the Raise Critical Exception When Deadline Is Reached and the Raise Critical Exception Deadline Is Reached attribute has not been checked in the task’s settings.
HandleExceptionErrorEvent
Thrown in any case not listed.
StartDeadlineIsCriticalException
Thrown when the Start Deadline is not met and the Raise Critical Exception Deadline Is Reached attribute has been checked in the task’s settings.
StartDeadlineIsNonCriticalException
Thrown when the constraint is not met and the Raise Critical Exception Deadline Is Reached attribute has not been checked in the task’s settings.
Boundary Event Usage In the purchase order process, you can use two boundary events as follows: 1. An escalation boundary event 2. Error boundary event In the exercise, Assign the Procurement Process to the Purchase Order Process and Assign Boundary Events, you will use boundary events to ensure, that only one branch is performed by the Advance Adapter Engine Extended (AEX). To use boundary events, you choose a referenced process object and from the properties tab, you choose the Boundary Events Editor. With this editor you can add a boundary event. You will add two boundary events. An escalation one and an error boundary event. The Escalation boundary event is used, to start the activities to inform a customer about a late delivery. In the error case, the activities to inform the customer, that no delivery is possible are started.
How to Maintain the PO Process PO_GoToProcurement_RP For the demonstration steps, see the exercise, Maintain the PO Process PO_GoToProcurement_RP.
Prohibida su reproducción © Copyright. All rights reserved.
525
Unit 9: The Complete Integration Process
Prohibida su reproducción 526
© Copyright. All rights reserved.
Unit 9 Exercise 18 523
Maintain the PO Process in PO_GoToProcurement_RP SP03 Business Example This is the process flow in this exercise:
Figure 510: Purchase Order Process
In this exercise, we want to use Boundary events, to hand over the different results from the Procurement Process. In the case, when an article is in stock, a “normal” delivery shall take place. In case, that the article is not in stock, the customer shall be informed by e-mail. In this exercise you will perform the following steps: ●
●
●
Create the Boundary Event Create a 1:1 Input Mapping from PO_goToDistribution_RP/ PO_purchaseOrder_DO to MT_SupplierService/PurchaseOrder Configure the PO_informCustomer_noDelivery_NA
In this exercise, when the values include ## or xx, replace the characters with the group-number your instructor assigned to you. Create the Boundary Event 1. Create a DefaultEscalationCritical Boundary Event to the PO_goToProcurement_RP. Create a 1:1 Input Mapping from PO_goToDistribution_RP/ PO_purchaseOrder_DO to MT_SupplierService/PurchaseOrder 1. Create a 1:1 Input Mapping from PO_goToDistribution_RP/ PO_purchaseOrder_DO to MT_SupplierService/PurchaseOrder. Configure the PO_informCustomer_noDelivery_NA The procedure was explained in greater detail in a previous exercises. In this exercises only a short summary is given.
Prohibida su reproducción © Copyright. All rights reserved.
527
Unit 9: The Complete Integration Process
1. Configure the PO_informCustomer_noDelivery_NA. Create a function to calculate the recipient and include in the e-mail the CustomerName and the SparePartNo . getExternalUser(PO_purchaseOrder_DO/customer/email,"English","Eastern Standard Time")
Prohibida su reproducción 528
© Copyright. All rights reserved.
Unit 9 Solution 18 525
Maintain the PO Process in PO_GoToProcurement_RP SP03 Business Example This is the process flow in this exercise:
Figure 510: Purchase Order Process
In this exercise, we want to use Boundary events, to hand over the different results from the Procurement Process. In the case, when an article is in stock, a “normal” delivery shall take place. In case, that the article is not in stock, the customer shall be informed by e-mail. In this exercise you will perform the following steps: ●
●
●
Create the Boundary Event Create a 1:1 Input Mapping from PO_goToDistribution_RP/ PO_purchaseOrder_DO to MT_SupplierService/PurchaseOrder Configure the PO_informCustomer_noDelivery_NA
In this exercise, when the values include ## or xx, replace the characters with the group-number your instructor assigned to you. Create the Boundary Event 1. Create a DefaultEscalationCritical Boundary Event to the PO_goToProcurement_RP. a) In PO_goToProcurement_RP → Properties → Boundary EventsChoose Add and choose DefaultEscalationCritical . b) Choose OK.
Prohibida su reproducción © Copyright. All rights reserved.
529
Unit 9: The Complete Integration Process
Figure 511: Boundary Event Creation
c) Choose Save. d) From the Boundary event , using the Speed buttons, create a new Notification Activity , and name it PO_informCustomer_noDelivery_NA. e) Drag a line from PO_informCustomer_noDelivery_NA to PO_End_EE, see next figure.
Figure 512: Purchase Order Process
Create a 1:1 Input Mapping from PO_goToDistribution_RP/ PO_purchaseOrder_DO to MT_SupplierService/PurchaseOrder 1. Create a 1:1 Input Mapping from PO_goToDistribution_RP/ PO_purchaseOrder_DO to MT_SupplierService/PurchaseOrder. a) Create a 1:1 Input Mapping from PO_purchaseOrder_DO to MT_P_startProcess.
Figure 513: Input Mapping
b) Create a 1:1 Input Mapping from PO_CatalogProperties_DO to MT_P_startProcess/ SpareParts/isAvailible.
Prohibida su reproducción 530
© Copyright. All rights reserved.
Lesson: Explaining Boundary Events in the Delivery and Purchase Order Process
Figure 514: Input Mapping
Configure the PO_informCustomer_noDelivery_NA The procedure was explained in greater detail in a previous exercises. In this exercises only a short summary is given. 1. Configure the PO_informCustomer_noDelivery_NA. Create a function to calculate the recipient and include in the e-mail the CustomerName and the SparePartNo . getExternalUser(PO_purchaseOrder_DO/customer/email,"English","Eastern Standard Time") a) Create a function, to read the user in PO_purchaseOder_DO and set it as recipient. getExternalUser(PO_purchaseOrder_DO/customer/ email,"English","Eastern Standard Time") b) Use the function in the To tab, select External Users → Use an Expression.
Figure 515: Notification Activity - To
c) Create and fill two variables: SparePartNo and CustomerName . ●
SparePartNo: PO_purchaseOrder_DO/sparePartNo
●
CustomerName: PO_purchaseOrder_DO/customer/lastName
Figure 516: Variables
d) Choose Parameterized Texts → Subject or Message enter the following:
Prohibida su reproducción © Copyright. All rights reserved.
531
Unit 9: The Complete Integration Process
Field
Value
Subject
Dear {CustomerName}
Message:
Your spare Part with the number: {SparePartNo} could not be delivered. Please try an other one. Best regards your friendly store
Figure 517: E-mail Text
Figure 518: E-Mail
e) Choose Save. f) Build and deploy.
Prohibida su reproducción 532
© Copyright. All rights reserved.
Lesson: Explaining Boundary Events in the Delivery and Purchase Order Process
How to Insert a MessageMapping into the iFlow For the demonstration steps, see the exercise, Insert a MessageMapping into the iFlow.
Prohibida su reproducción © Copyright. All rights reserved.
533
Unit 9: The Complete Integration Process
Prohibida su reproducción 534
© Copyright. All rights reserved.
Unit 9 Exercise 19 529
Insert a MessageMapping into the iFlow SP03
Business Example This is the message flow in this exercise: ●
●
●
●
●
●
●
The messages, which are processed by the Flow CallSupplierService_xx and the Iflow FromSupplierService_xx, are exchanged by the File sytem. this is a simplification The content can not be changed by the File system Especially the MT_SupplierSerice_In/Supplierservice/isAvailable field. which changes from false to true during processing. This does not works, because no real Web service is utilised To fix that, we implement a message mapping, which changes this value. In this case, the iFlow must be deployed again, to apply the changes Contains the sparePartNo field a value “true”, the MT_SupplierSerice_In/Supplierservice/ isAvailable field, will be “true”, too. For example: -
sparePartNo : 500: true
-
SupplierProperties/isAvailable: true
Or: -
sparePartNo : 5000
-
SupplierProperties/isAvailable: false
In this exercise, when the values include ## or xx, replace the characters with the group-number your instructor assigned to you. Create Message Mapping 1. Create Message Mapping with this information: Field
Value
Name
MM_P_Process2SupplierService_xx
Source Messages
siSupplierServiceIn http:// services .bit800/com
Target Messages
siSupplierServiceIn http:// services .bit800/com
Create a User Defined Function setTrue
Prohibida su reproducción © Copyright. All rights reserved.
535
Unit 9: The Complete Integration Process
1. Create a User Defined Function setTrue, for the code, see the next figure:
Figure 521: setTrue Function
Create Operation Mapping 1. Create Operation Mapping. Use the following data: Field
Value
Name
OM_P_Process2SupplierService_xx
Source Operations
SI_CallSupplierService_outb
Target Operations
SI_CallSupplierService_inb
Integrate the Operation Mapping into the iFlow CallSupplierService_xx 1. Integrate the Operation Mapping into the iFlow CallSupplierService_xx. Test 1. Test case: the procurement is terminated in the Message End event. Use the following data: Field
Value
SparePartNo
500true
isAvailable
false or true
The general way to process a test, was explained in great detail in an earlier exercise. In this exercise, only the required data and the expected result is discussed. 2. Procurement is terminated by the Escalation End. Use the following data: Field
Value
SparePartNo
500
isAvailable
false or true
Prohibida su reproducción 536
© Copyright. All rights reserved.
Unit 9 Solution 19 531
Insert a MessageMapping into the iFlow SP03
Business Example This is the message flow in this exercise: ●
●
●
●
●
●
●
The messages, which are processed by the Flow CallSupplierService_xx and the Iflow FromSupplierService_xx, are exchanged by the File sytem. this is a simplification The content can not be changed by the File system Especially the MT_SupplierSerice_In/Supplierservice/isAvailable field. which changes from false to true during processing. This does not works, because no real Web service is utilised To fix that, we implement a message mapping, which changes this value. In this case, the iFlow must be deployed again, to apply the changes Contains the sparePartNo field a value “true”, the MT_SupplierSerice_In/Supplierservice/ isAvailable field, will be “true”, too. For example: -
sparePartNo : 500: true
-
SupplierProperties/isAvailable: true
Or: -
sparePartNo : 5000
-
SupplierProperties/isAvailable: false
In this exercise, when the values include ## or xx, replace the characters with the group-number your instructor assigned to you. Create Message Mapping 1. Create Message Mapping with this information: Field
Value
Name
MM_P_Process2SupplierService_xx
Source Messages
siSupplierServiceIn http:// services .bit800/com
Target Messages
siSupplierServiceIn http:// services .bit800/com
Prohibida su reproducción © Copyright. All rights reserved.
537
Unit 9: The Complete Integration Process
a) Switch to the Enterprise Service Repository perspective. b) Choose SC_SELLSPAREPARTS_BIT800 1.0 > → urn:bit800:xx:com → New to create a message mapping with the data from the table above.
Figure 519: New Message Mapping
Figure 520: Signature Definition
Create a User Defined Function setTrue 1. Create a User Defined Function setTrue, for the code, see the next figure:
Figure 521: setTrue Function
a) Choose the message mapping MM_P_Process2SupplierService_xx . Choose the Overview tab. . b) Create a user function using Local function, Edit, the Java code opens.
Prohibida su reproducción 538
© Copyright. All rights reserved.
Lesson: Explaining Boundary Events in the Delivery and Purchase Order Process
c) After the code: @Cleanup public void cleanup (GlobalContainer container) StreamTransformationException{ }
throws
Add the following code: @LibraryMethod(title="setTrue", description="", category="User-Defined", type=ExecutionType.SINGLE_VALUE) public String setTrue ( String str ) {
}
if (str.contains("true")) { return "true"; } else return "false";
Note: The errors in the code are because of missing Libraries. Right click somewhere in the code and choose Source Code → Organize Imports to import the required libraries. d) Save e) Close the Java file and go back to the MM_P_Process2SupplierService_xx message mapping. f) Choose the Definition to implement the mapping. g) Double-click in theTarget field isAvailable. h) Create the mapping as display in the next figure. The function setTrue will provide a string value, but we need a value of boolean type. So we have to use other functions.
Figure 522: Mapping for isAvailable
i) Map all other values 1:1.
Prohibida su reproducción © Copyright. All rights reserved.
539
Unit 9: The Complete Integration Process
Note: Make sure all the other fields are mapped 1:1 including the parent nodes. If the Default Matcher is use, map the parent nodes manually because they won’t be created automatically as they are optional. j) Choose Save. k) Activate. Create Operation Mapping 1. Create Operation Mapping. Use the following data: Field
Value
Name
OM_P_Process2SupplierService_xx
Source Operations
SI_CallSupplierService_outb
Target Operations
SI_CallSupplierService_inb
a) Choose New in SC_SELLSPAREPARTS_BIT800 1.0 → urn:bit800:xx:com to create an operation mapping. Use the data from the table above.
Figure 523: Operation Mapping
b) Choose the Definition tab, to assign the message mapping MM_P_Process2SupplierService_xx .
Figure 524: Choose Message Mapping
Integrate the Operation Mapping into the iFlow CallSupplierService_xx
Prohibida su reproducción 540
© Copyright. All rights reserved.
Lesson: Explaining Boundary Events in the Delivery and Purchase Order Process
1. Integrate the Operation Mapping into the iFlow CallSupplierService_xx. a) Choose the iFlow CallSupplierService_xx , then choose Add Mapping and then right click and assign the operation mapping OM_P_Process2SupplierService_xx. b) Save and Activate, so that the iFlow can become active.
Figure 525: Assign Operation Mapping
c) Choose Save. d) Activate. e) Deploy. Test 1. Test case: the procurement is terminated in the Message End event. Use the following data: Field
Value
SparePartNo
500true
isAvailable
false or true
The general way to process a test, was explained in great detail in an earlier exercise. In this exercise, only the required data and the expected result is discussed. a) Open the WS Navigator using http://nwktdc00.wdf.sap.corp:50000/wsnavigator b) Use the data from the table above.
Figure 526: Data
Prohibida su reproducción © Copyright. All rights reserved.
541
Unit 9: The Complete Integration Process
c) This is the data flow:
Figure 527: Data Flow
d) It is expected, the in the iFlow CallSupplierService the value isAvailable is set to true. The procurement process is terminated without error. 2. Procurement is terminated by the Escalation End. Use the following data: Field
Value
SparePartNo
500
isAvailable
false or true
a) Use the data from the table above.
Figure 528: Test Data
b) This is the data flow:
Figure 529: Data Flow
c) It is expected, the in the iFlow CallSupplierService the value isAvailable is set to false. The procurement process is terminated by the terminating Escalation Event.
Prohibida su reproducción 542
© Copyright. All rights reserved.
Lesson: Explaining Boundary Events in the Delivery and Purchase Order Process
LESSON SUMMARY You should now be able to: ●
Explain boundary events in the delivery and purchase order process
Prohibida su reproducción © Copyright. All rights reserved.
543
Unit 9 Lesson 3 538
Running the Purchase Order Process
LESSON OVERVIEW This lesson shows you how to run the purchase order process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Execute a purchase order process
Integration Process Overview You have created a big integration process with several processes, which are all integrated at the end. The main challenge beside creating this working process is to keep them up and running in the business. We have already discussed the monitoring, now we focus on the lifecycle.
The Java Log Viewer ●
●
●
●
J2EE Engine Log — The J2EE Log viewer allows you to search for exception IDs and time constraint issues. Process Log — The Process Log provides information about execution times, process outcomes, and individual steps. You can display basic or detailed log information. Business Log — The Business Log contains information about Business Process Management (BPM) processes and tasks and can be used to identify problems. It includes the history of tasks and processes. Connection Log and Tracing — The Connectivity Log and Tracing helps analyze problems with Web services and RFC calls.
Prohibida su reproducción 544
© Copyright. All rights reserved.
Lesson: Running the Purchase Order Process
Figure 530: J2EE Engine Log Viewer (1)
You can filter and sort of the results of the view you choose. Use the content filter to search for a known exception ID or time constraints. Use the filter row for a direct filter (for example, your application name).
Figure 531: J2EE Engine Log Viewer (2)
The Log Viewer in NetWeaver Administrator is used to access the runtime logs of Java Applications. The data contained in the logs represents a low-level trace of any application running on AS Java and includes the applications that provide your Web services and the BPM engine itself. To start the Log Viewer, choose Problem Management → Log and Traces → Log Viewer, then choose the logging source (for example, the default trace).
Prohibida su reproducción © Copyright. All rights reserved.
545
Unit 9: The Complete Integration Process
Log Views
Figure 532: The Process Log
To reach the Process Log, choose NWA → Operation Management → Processes and Tasks → Manage Processes.
Figure 533: The Business Log
Figure 534: The Connectivity Log
Prohibida su reproducción 546
© Copyright. All rights reserved.
Lesson: Running the Purchase Order Process
Process Debugging
Figure 535: Process Debugger
The SAP NetWeaver Developer Studio (NWDS) Process Debugger includes the following features: ●
Debugging of running process instances at the model level
●
Stepping over, into, and out of a subflow
●
Stopping at breakpoints
●
Resuming process execution
●
Inspecting process context
●
Sending notification of process errors
●
Initiating new processes
●
Attaching new processes started outside of NWDS
Figure 536: Debugging BPM Processes
The Process Debugger must be configured to initiate process debugging. Depending on your configuration, either a new process instance is created or the debugger waits for a new process instance to start. Once the target process starts, the debugger attaches to it. To set up a process debug configuration, use the following high level procedure (as shown in the figure, Process Debug Configuration — Main Tab): 1. In the Debug Configuration window, choose the process type, then choose the New button. 2. Enter a name for the new debug configuration. 3. Choose the project and the process you want to debug. 4. Choose the AS Java you want to debug on.
Prohibida su reproducción © Copyright. All rights reserved.
547
Unit 9: The Complete Integration Process
Figure 537: Process Debug Configuration — Main Tab
Error Handling in the PO Process The process debugger can be used to initiate a new process from SAP NWDS or to attach to new processes that are started outside of SAP NWDS. This is configured on the Arguments tab. 1. Choose the radio button Attach to all process instances for the debugger to attached to all process instances started outside of NWDS. 2. Choose the radio button Attach to a new process instances to start a new process instance from NWDS. You must also enter the Web service input values here.
Figure 538: Process Debug Configuration — Arguments Tab
In the debug configuration, choose Debug for the debug configuration you are using. The Debug perspective opens. Depending on the configuration, either a new process instance is created, or the debugger will wait for a new process instance to be started.
Prohibida su reproducción 548
© Copyright. All rights reserved.
Lesson: Running the Purchase Order Process
Figure 539: Starting the Debugger (1)
Figure 540: Starting the Debugger (2)
How to Test the Whole Process For the steps and data of this demonstration refer to the exercise, Test the Whole Process.
Prohibida su reproducción © Copyright. All rights reserved.
549
Unit 9: The Complete Integration Process
Prohibida su reproducción 550
© Copyright. All rights reserved.
Unit 9 Exercise 20 545
Test the Whole Process SP03
Business Example In this exercise you will build, deploy, and test the whole process in four different test cases. In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Test case 1: SparePartNo = 500, article is not available 2. Test case 2: SparePartNo = 500true 3. Test case 3: SparePartNo = 500, order data are changed 4. Test case 4: SparePartNo = 600, the “Happy Path”
Prohibida su reproducción © Copyright. All rights reserved.
551
Unit 9 Solution 20 546
Test the Whole Process SP03
Business Example In this exercise you will build, deploy, and test the whole process in four different test cases. In this exercise, when the values include ## or XX, replace the characters with the group-number your instructor assigned to you. 1. Test case 1: SparePartNo = 500, article is not available a) Build and Deploy the Process. b) As SparePartNo use 500. c) The other order data is not changed. The article is not deliverable.
Figure 541: Test case 1 Data Flow
2. Test case 2: SparePartNo = 500true a) As SparePartNo use 500true. b) The other order data is not changed. c) In the procurement process, change the value of isAvailable to true The article is deliverable.
Prohibida su reproducción 552
© Copyright. All rights reserved.
Lesson: Running the Purchase Order Process
Figure 542: Test case 2 Data Flow
3. Test case 3: SparePartNo = 500, order data are changed a) As SparePartNo use 500. b) Change the order data as follows: Field
Value
SparePartNo
700
isSparePartAvailible
true
Figure 543: Test case 3 Data Flow
4. Test case 4: SparePartNo = 600, the “Happy Path” a) As SparePartNo use 600. The article is deliverable.
Figure 544: Test case 4 Data Flow
Prohibida su reproducción © Copyright. All rights reserved.
553
Unit 9: The Complete Integration Process
LESSON SUMMARY You should now be able to: ●
Execute a purchase order process
Prohibida su reproducción 554
© Copyright. All rights reserved.
Unit 9
549
Learning Assessment
1. Which of the following logs allows users to search for exception IDs and time constraint issues? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
2. Which of the following logs provides information about execution times, process outcomes, and individual step? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
3. Which of the following log helps analyze problems with Web services and RFC calls? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
Prohibida su reproducción © Copyright. All rights reserved.
555
Unit 9
550
Learning Assessment - Answers
1. Which of the following logs allows users to search for exception IDs and time constraint issues? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
2. Which of the following logs provides information about execution times, process outcomes, and individual step? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
3. Which of the following log helps analyze problems with Web services and RFC calls? Choose the correct answer. X
A Business log
X
B Connection log
X
C J2EE Engine log
X
D Process log
Prohibida su reproducción 556
© Copyright. All rights reserved.
UNIT 10
Business Rules Management
Lesson 1 Explaining Testing and Monitoring of a PO Process Exercise 21: Create the Simple Distribution Process SP03
558 575
Lesson 2 Explaining Data Flow Modeling
585
Lesson 3 Explaining Business Rules Management
590
Lesson 4 Creating Rules with Rules Composer
597
Lesson 5 Managing Business Rules with Rules Manager Exercise 22: Create a Flow Ruleset to Determine the Storage Location of the Ordered Spare Parts SP03
602 609
UNIT OBJECTIVES ●
Explain testing and monitoring of PO processes
●
Explain data flow modeling
●
Explain Business Rules Management (BRM)
●
Create rules with the Rules Composer
●
Use the Business Rules Manager
Prohibida su reproducción © Copyright. All rights reserved.
557
Unit 10 Lesson 1 552
Explaining Testing and Monitoring of a PO Process LESSON OVERVIEW This lesson gives you an explanation of testing and monitoring of a PO Process. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain testing and monitoring of PO processes
Business Process Start Overview There are several ways of starting a process, depending on its purpose and starting point. In order for a process to start, it must have an active version. The methods for starting a process include the following: ●
Starting processes from the Process Repository Start the process from the Process Repository tool that is integrated in the SAP NetWeaver Administrator. This method is mostly used for test purposes.
●
Starting processes by Web services This method can be used to start a process from the Web Service Navigator, Web Dynpro applications, or from a Web service client.
●
Starting processes from the Debugger You can start a process from the Debugger that is integrated in the SAP NetWeaver Developer Studio (NWDS).
Business Process Start from the Process Repository For testing purposes, BPM processes can be started using the Process Repository in the NetWeaver Administrator. To start a process in the NetWeaver Administrator, use the following method: 1. Start the NetWeaver Administrator by going to the following URL and providing your user name and password: http://:/nwa. 2. Choose SAP NWA → Configuration Management → Processes and Tasks → Process Repository. The system displays the development components of the deployed processes and their details. 3. Choose the development component (DC) of the process you want to start.
Prohibida su reproducción 558
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
4. Choose the Processes, Tasks, and Rules tab. 5. Choose the applicable process, then choose Start Process.
Figure 545: Process Start from the Repository
For testing purposes, Business Process Management (BPM) process can be started using the Process Repository in the NetWeaver Administrator. Although users typically do not use the NetWeaver Administrator BPM processes, this application provides a Web service that allows you to start a BPM process through a standard wWeb service call. This includes processes with UIs built in Web Dynpro, Visual Composer, and similar technologies. These Web services can be used by any application. The Web services can include data, which can be passed from the UIs to the processes that are started. The data stored in the process context can influence the process flow or be processed in process activities.
Navigation Process Selecting a Workspace When the Workbench is launched, the first thing you see is a dialog that allows you to select where the workspace will be located. The workspace is the directory where your work will be stored. If you do not specify otherwise, Eclipse creates the workspace in your user directory. This workspace directory is used as the default content area for your projects as well as for holding any required metadata. For shared or multi-workspace installs you must explicitly specify the location for your workspace using the dialog (or via the "-data" command line argument). Working with Perspectives Perspectives define the initial set and layout of views in the Workbench window. They provide a set of functionality aimed at accomplishing a specific type of task or working with specific types of resources. Opening Perspectives
Prohibida su reproducción © Copyright. All rights reserved.
559
Unit 10: Business Rules Management
Perspectives provide combinations of views and editors that are suited to performing a particular set of tasks. For example, can open the Debug perspective to debug a Java program. To open a new perspective, use the following procedure: 1. Choose Open Perspective on the shortcut bar on the left side of the Workbench window. (This provides the same function as the Window → Open Perspective menu on the menu bar.) 2. To see a complete list of perspectives, choose Other... from the dropdown menu. 3. Select the perspective that you want to open.
Figure 546: Opening Perspectives
When the perspective opens, the title bar of the window it is in changes to display the name of the perspective. In addition, an icon is added to the shortcut bar, allowing you to quickly switch back to that perspective from other perspectives in the same window. By default, a perspective will open in the same window. If you would rather it opened in a new window, change the setting in the General → Perspectives preference page. Switching Between Perspectives Open perspectives are represented by icons on the perspective bar. When you have more than one perspective open, you can switch between them by clicking the icons on the shortcut bar.
Figure 547: Switching Between Perspectives
Changing Where Perspectives Open You can change the default behavior for how perspectives are opened in the Workbench using the following procedure:
Prohibida su reproducción 560
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
1. Open the General → Perspectives preference page. 2. Choose either In the same window or In a new window from the Open a new perspective group. 3. Choose OK. Configuring Perspective Shortcuts You can choose which menu items are available under the File → New, Window → Open Perspective, and Window → Show View menus using the Shortcuts tab of the Customize Perspective dialog. To configure shortcuts, use the following procedure: 1. Switch to the perspective that you want to configure. 2. Select Window → Customize Perspective. 3. Choose the Shortcuts tab. 4. Choose the sub-menu whose shortcuts you want to edit. 5. Use the Categories tree to turn groups of related shortcuts on or off, or select categories to work with individual menu items in the Shortcuts list. 6. To cause the changes to take effect, choose OK. Saving a User Defined Perspective If you have modified a perspective by adding, deleting, or moving (docking) views, you can save your changes for future use using the following procedure: 1. Switch to the perspective that you want to save. 2. Choose Window → Save Perspective As. 3. Type a new name for the perspective into the Name field. Choose OK. Deleting a User Defined Perspective You can delete perspectives that you defined yourself, but not those that are delivered with the Workbench. Use the following procedure: 1. Open the General → Perspectives preference page. 2. From the Available perspectives list, select the one that you want to delete and choose Delete. 3. Choose OK. Resetting Perspectives To restore a perspective to its original layout, use the following procedure: 1. Open the General → Perspectives preference page. 2. From the Available perspectives list, select the perspective you want to restore. 3. Choose Reset. 4. Choose OK. Working with Views and Editors
Prohibida su reproducción © Copyright. All rights reserved.
561
Unit 10: Business Rules Management
Views and editors are the main visual entities that appear in the Workbench. In any given perspective there is a single editor area, which can contain multiple editors, and a number of surrounding views that provide context. The Workbench provides a number of operations for working with views and editors.
Figure 548: Working with Views and Editors
Opening Views Perspectives offer predefined combinations of views and editors. To open a view that is not included in the current perspective, choose Window → Show View from the main menu bar. You can also create fast views to provide quick access to views that you use often. Moving and Docking Views To change the location of a view in the current perspective, use the following procedure: 1. Drag the view by its title bar. Do not release the left mouse button yet. 2. As you move the view around the Workbench, the mouse pointer changes to one of the drop cursors shown in the table below. The drop cursor indicates where the view will be docked if you release the left mouse button. To see the drop cursor change, drag the view over the left, right, top, or bottom border of another view or editor. You may also drag the view outside of the Workbench area to turn it into a "Detached" view. 3. When the view is in the location that you want, relative to the view or editor area underneath the drop cursor, release the left mouse button. 4. (Optional) If you want to save your changes, choose Window → Save Perspective As from the main menu bar. 5. Note that a group of stacked views can be dragged using the empty space to the right of the view tabs.
Prohibida su reproducción 562
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
You can also move a view by using the pop-up menu for the view. (Click the icon at the left end of the view's title bar, or right-click anywhere else in the view's title bar). As well as moving the view this menu will provide shortcut options for turning a view into either a "Fast" or "Detached" view. Rearranging Tabbed Views In addition to dragging and dropping (docking) views inside the Workbench, you can rearrange the order of views within a tabbed notebook using the following procedure: 1. Choose the tab of the view that you want to move and drag it to where you want it. A stack symbol appears as you drag the view across other view tabs. 2. Release the mouse button when you have the view tab in the desired location. The view that you selected is now moved. Creating Fast Views Fast views are hidden views that can be quickly opened and closed. They work like other views except they do not take up space in your Workbench window. To create a fast view, use the following procedure: 1. Click the title bar of the view that you want. Hold the mouse button down. 2. Drag the view to the Fast View bar and release the mouse button. By default the shortcut bar is located in the lower left corner of the window. Alternatively, you can choose the button located on the left side of the Fast View bar that will present you with a selection of views. Choosing one of these views will add it to the Fast View bar immediately.
Figure 549: Navigator
The icon for the view that you dragged now appears on the shortcut bar. You can look at the view by clicking its icon on the shortcut bar. As soon as you click somewhere else outside the view, it is hidden again. To restore the view to its original location (and remove it from the Fast View bar), toggle the fast view item in the view button's context menu. You can also create and restore fast views by selecting Fast View from the context menu that opens when you click the icon at the left side of the view's title bar. Detaching Views
Prohibida su reproducción © Copyright. All rights reserved.
563
Unit 10: Business Rules Management
Detached views are views that are shown in a separate window with a smaller trim. They work like other views except they are always shown in front of the Workbench window To detach a view, use the following procedure: 1. If the Workbench window is maximized, resize it so that it does not fill the entire screen. 2. Click the title bar of the view that you want to detach. Hold the mouse button down. 3. Drag the view to the outside of the Workbench window and release the mouse button. To restore the view to be shown inside of the Workbench window, drag it into the Workbench window. You can also detach a view by selecting Detached from the context menu that opens when you click the icon at the left side of the view's title bar. Working with Projects, Folders, and Files There are three different types of resources in the workbench: projects, folders, and files. Projects are the largest structural unit used by the Workbench. Projects contain folders and files, and they can be opened, closed, or built. Folders can contain other folders and files. The Workbench provides a number of mechanisms for working with projects, folders and files.
Figure 550: Working with Projects, Folders, and Files
Creating a Project To create a project, use the following procedure: 1. On the main menu bar, choose File → New Project. 2. Select a category from the left column and then select the type of project to create from the right column. To assist in locating a particular wizard, the text field can be used to show only the wizards that match the entered text. Choose Next. 3. In the Project name field, type a name for your new project.
Prohibida su reproducción 564
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
4. (Optional) The project that you create will map to a directory structure in the file system. The default file system location is displayed in the Location field. If you want to create the project and its contained resources in a different location, clear the Use default location checkbox and specify the new location. 5. If you want the new project to be dependent on one or more other projects, choose Next and select the projects to be referenced. 6. Choose Finish. The new project is listed in one of the navigation views.
Hint: The General → Perspectives preference page allows you to specify the perspective behavior when a new project is created. Closing Projects When a project is closed, it can no longer be changed in the Workbench and its resources no longer appear in the Workbench, but they do still reside on the local file system. Closed projects require less memory. Also, since they are not examined during builds, closing a project can improve build time. To close a project, use the following procedure: 1. Select the project in one of the navigation views. 2. Choose Close Project on the pop-up menu. To re-open the project, use the following procedure: 1. Select the project in one of the navigation views. 2. Choose Open Project on the pop-up menu. Deleting Projects To delete a project and remove its contents from the file system, use the following procedure: 1. Select the project in one of the navigation views. 2. Choose Delete on the pop-up menu. 3. In the dialog box that opens, choose Also delete contents under. 4. Choose Yes. To delete a project from the workspace without removing its contents from the file system, use the following procedure: 1. Select the project in one of the navigation views. 2. Choose Delete on the pop-up menu. 3. In the dialog box that opens, choose Do not delete contents. 4. Choose Yes. Creating a Folder To create a new folder, use the following procedure:
Prohibida su reproducción © Copyright. All rights reserved.
565
Unit 10: Business Rules Management
1. In one of the navigation views, right-click the project or folder where you want to create the new folder. 2. From the pop-up menu, choose New → Folder. 3. Enter the name of the new folder and choose Finish. Creating a File To create a file, use the following procedure: 1. In one of the navigation views, right-click the project or folder where you want to create the new file. 2. From the pop-up menu, choose New → File 3. Specify the name of the file, including the file extension (for example, newfile.txt). 4. Choose Finish. Setting Local History Preferences To indicate the level of local history that should be kept for each resource in the Workbench, use the following procedure: 1. Open the General → Workspace → Local History preference page. 2. In the Days to keep files field, type the number of days that you want to keep records for any one Workbench resource. For example, if you type 7, then a history of saved states from the last seven days will be kept. 3. In the Maximum entries per file field, type the number of states to keep for any one Workbench resource. Note that when you exceed the number of entries per file, the oldest changes are discarded to make room for the newer changes. 4. In the Maximum file size (MB) field, type the maximum file size (in MB) of a resource for which a local history should be kept. If the size of the resource exceeds the maximum amount of file size allocated, no local history is kept for that resource. 5. Choose OK to set your preferences and close the Local History Preferences page. Importing You can import files into the Workbench in several ways, depending on your operating system, using the following procedure: ●
By using the Import wizard
●
By dragging files or folders from the file system to one of the navigation views
●
By copying files or folders from the file system and pasting them into one of the navigation views
Prohibida su reproducción 566
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
Figure 551: Importing
Importing Existing Projects You can use the Import Wizard to import an existing project into workspace using the following procedure: 1. From the main menu bar, choose File → Import. 2. Choose General → Existing Project into Workspace and choose Next. 3. Choose either Select root directory or Select archive file and choose the associated Browse to locate the directory or file containing the projects. 4. In the Projects screen area, select the project or projects that you would like to import. 5. Choose Finish to start the import. Importing Resources from the File System You can use the Import Wizard to import resources from the local file system into an existing project using the following procedure: 1. From the main menu bar, choose File → Import. 2. Choose General → File System and choose Next. 3. Choose the Browse button on the next page of the wizard to select the directories from which you would like to add the resources. 4. In the import selection panes, use the following methods to select exactly the resources you want to add:
Prohibida su reproducción © Copyright. All rights reserved.
567
Unit 10: Business Rules Management
●
●
●
●
Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the right pane, select or clear checkboxes for individual files. Choose Filter Types to filter the current selection for files of a specific type. Choose Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add. Choose Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.
5. Specify the Workbench project or folder that will be the import destination. 6. When you have finished specifying your import options, choose Finish.
Hint: You can also import folders and files by dragging them from the file system and dropping them into one of the navigation views, or by copying and pasting. Importing Resources from an Archive File You can use the Import wizard to extract files from an archive file into the Workbench using the following procedure: 1. From the main menu bar, choose File → Import. 2. Choose General → Archive File and choose Next. 3. Choose the Browse button on the next page of the wizard, to select the archive files that contain the files you want to extract and import into the Workbench. 4. In the import selection panes, use the following methods to select exactly the resources you want to add: ●
●
●
●
Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the right pane, select or clear checkboxes for individual files. Choose Filter Types to filter the current selection for files of a specific type. Choose Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add. Choose Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.
5. Specify the Workbench project or folder that will be the import destination. 6. When you have finished specifying your import options, choose Finish. Exporting You can export files from the Workbench in several ways, depending on your operating system, using the following procedure:
Prohibida su reproducción 568
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
●
By using the Export wizard
●
By dragging files or folders from one of the navigation views to the file system
●
By copying files or folders from one of the navigation views and pasting them into the file system
Exporting Resources to the File System You can use the Export wizard to export resources from the Workbench to the file system using the following procedure: 1. In one of the navigation views, select the resources that you want to export. 2. From the main menu bar, choose File → Export. 3. Choose General → File System and choose Next. 4. By default, the resources that you selected will be exported, along with all their children. Optionally, use the checkboxes in the left and right panes to select the set of resources to export, and use push buttons such as Select Types to filter the types of files that you want to export. 5. Choose the Browse button on the next page of the wizard, to select the directory you would like to export the resources to. 6. Specify the directory in the file system that will be the export destination. 7. Choose Finish.
Hint: You can also export folders and files by dragging them from one of the navigation views to the file system and dropping them in the file system, or by copy and paste. Exporting Resources to an Archive File You can use the Export wizard to export resources from the Workbench to an archive file in the file system using the following procedure: 1. In one of the navigation views, select the resources that you want to export. 2. From the main menu bar, choose File → Export. 3. Choose General → Archive File and choose Next. 4. By default, the resources that you selected will be exported along with their children. Optionally, use the checkboxes in the left and right panes to select the set of resources to export, and use push buttons such as Select Types to filter the types of files that you want to export. 5. Specify the path and name of the archive file into which you want to export the selected resources. 6. Choose Finish.
Prohibida su reproducción © Copyright. All rights reserved.
569
Unit 10: Business Rules Management
BPM Process Monitoring The SAP NetWeaver Administrator includes a system status monitor that allows you to view the configuration of processes and tasks. This monitor is accessible at http://:/ nwa, under Availability and Performance → BPM System Overview.
Figure 552: Monitoring Overview
Manage Processes in the NWA To view a comprehensive overview of all running and finished processes in SAP NetWeaver, choose Operations → Processeses and Tasks → Manage Processes. From here you have access to all process details.
Prohibida su reproducción 570
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
Figure 553: Process Management Overview
The figure, Process Management Overview, progresses as follows: 1. Once a process is selected, all the currently running instances of the process appear. 2. Actions such as Suspend and Resume can be chosen for currently running process instances. 3. Choosing the Show Process Flow button opens a new window with a graphical representation of the selected process. In the example the green dot indicates that the process in currently in waiting. This process waits on the intermediate message event waitOfMessages.
Prohibida su reproducción © Copyright. All rights reserved.
571
Unit 10: Business Rules Management
Figure 554: Monitoring Messages
You can monitor messages by choosing the link Show Related PI Messages from the Details tab. The message monitor that appears displays XI protocol messages for the selected process. History Tab
Figure 555: Process Instance History Tab
The History tab allows you to view the steps of the selected process according to the option chosen in the Show drop-down box. In particular, you can view outgoing and incoming messages. The Group by drop-down box allows you to filter what appears in the display.
Prohibida su reproducción 572
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
Context Data Tab
Figure 556: Process Instance Context Data Tab
The current values of context data in the register for individually selected data objects is shown in the Context Data tab.
How to Create a simple Distribution Process For the demonstration steps, see the exercise, Create a simple Distribution Process.
Prohibida su reproducción © Copyright. All rights reserved.
573
Unit 10: Business Rules Management
Prohibida su reproducción 574
© Copyright. All rights reserved.
Unit 10 Exercise 21 569
Create the Simple Distribution Process SP03
1. Create a Simple Distribution process based on the ZIP Code where is sent from. Assign Administratorxx as the Pool Administrator. 2. Create a new Message Trigger called D_StartProcess_Trigger and assign it to the D_Start_SE event. The Service Interface D_startProcess needs to be imported. 3. Create two new Services Interfaces in the ESR called Si_CallStorageService_outb and SI_CallStorageService_in based in the StorageService WSDL. 4. Create two new Services Interfaces in the ESR called Si_CallDeliveryService_outb and SI_CallDeliveryService_in based in the DeliveryService WSDL. 5. Import the Service Interfaces SI_CallDeliveryService_outb and SI_CallDeliveryService_inb under Service Reference CallServiceViaAEX and SI_CallStorageService_outb and SI_CallStorageService_inb under Service Reference Services in Process Composer. Connect the Distribution Process and the Purchase Order Process
Figure 570: Purchase Order Process
1. Define the Input Mapping from PO_purchaseOrder_DO to PO_goToDistribution_RP. For simplicity reasons the mapping should be a 1:1. 2. Open the Distribution Process and create a Data Object called D_DistributionProperties_DO, the data type should be DT_DeliveryServiceAddOn urn:bit800:xx:com 3. Configure the Service Interfaces SI_CallDeliveryService_outb and SI_CallStorageService_outb under Service Reference CallServiceViaAEX. The interfaces should be XI
Prohibida su reproducción © Copyright. All rights reserved.
575
Unit 10 Solution 21 570
Create the Simple Distribution Process SP03
1. Create a Simple Distribution process based on the ZIP Code where is sent from. Assign Administratorxx as the Pool Administrator. a) Go to the Process Composer perspective and create a new process called Distribution Process. The Pool should be called D_PoolAdministrator and the lane D_LaneAdministrator b) Select the Start Event and change the name to D_start_SE and the End Event to D_End_EE.
Figure 557: Distribution Process
c) Under Distribution Process → D_PoolAdministrator → Administrators add your Administratorxx to the UME principals
Figure 558: Pool Administrator
2. Create a new Message Trigger called D_StartProcess_Trigger and assign it to the D_Start_SE event. The Service Interface D_startProcess needs to be imported. a) In the Process Composer perspective, import the Service Interface D_StartProcess under the Service Reference StartProcesses
Prohibida su reproducción 576
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
Figure 559: Import Service Interface
b) Create a Message Event Trigger called D_StartProcess_Trigger using the D_StartProcess interface and assign it to the D_Start_SE event.
Figure 560: Start MessageTrigger
3. Create two new Services Interfaces in the ESR called Si_CallStorageService_outb and SI_CallStorageService_in based in the StorageService WSDL. a) Find the StorageService WSDL using the inspection.wsil: http://nwktdc00.wdf.sap.corp: 50000/inspection.wsil and choose CTRL+F to find SIStorageServiceImplBean. Copy the WSDL URL, it should be similar to: http://nwktdc00.wdf.sap.corp:50000/ SIStorageServiceImplBeanService/SIStorageServiceImplBean?wsdl. Copy and paste the URL in a new window and save it under Documents. Remember to change the extension from XML to WSDL.
Figure 561: WSDLs
b) Go back to Eclipse in the Enterprise Services Browser perspective. Import the SIStorageServiceImplBean.wsdl as an External Definition in your group’s namespace.
Figure 562: External Definitions
c) Create an Outbound Interface called SI_CallStorageService_outb, use information below:
Prohibida su reproducción © Copyright. All rights reserved.
577
Unit 10: Business Rules Management
Category
Outbound
Type
Synchronous
Input
siStorageServiceIn urn:bit800:xx:com
Output
siStorageServiceOut urn:bit800:xx:com
Figure 563: Outbound Service Interface
d) Create an Inbound Interface called SI_CallStorageService_inb, use information below: Category
Inbound
Type
Synchronous
Input
siStorageServiceIn urn:bit800:xx:com
Output
siStorageServiceOut urn:bit800:xx:com
Figure 564: Inbound Service Interface
e) Save and Activate. 4. Create two new Services Interfaces in the ESR called Si_CallDeliveryService_outb and SI_CallDeliveryService_in based in the DeliveryService WSDL. a) Find the DeliveryService WSDL using the inspection.wsil: http://nwktdc00.wdf.sap.corp: 50000/inspection.wsil and choose CTRL+F to find SIDeliveryServiceImplBean. Copy the WSDL URL, it should be similar to: http://nwktdc00.wdf.sap.corp:50000/ SI_Delivery_Service/SIDeliveryeServiceImplBean?wsdl. Copy and paste the URL in a new window and save it under Documents. Remember to change the extension from XML to WSDL.
Prohibida su reproducción 578
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
Figure 565: WSDLs
b) Go back to Eclipse in the Enterprise Services Browser perspective. Import the SIDeliveryServiceImplBean.wsdl as an External Definition in your group’s namespace.
Figure 566: External Definitions
c) Create an Outbound Interface called SI_CallDeliveryService_outb, use information below: Category
Outbound
Type
Synchronous
Input
MT_DeliveryService_IN urn:bit800:xx:com
Output
MT_DeliveryService_OUT urn:bit800:xx:com
Figure 567: Outbound Service Interface
d) Create an Inbound Interface called SI_CallDeliveryService_inb, use information below: Category
Inbound
Type
Synchronous
Input
MT_DeliveryService_IN urn:bit800:xx:com
Prohibida su reproducción © Copyright. All rights reserved.
579
Unit 10: Business Rules Management
Output
MT_DeliveryService_OUT urn:bit800:xx:com
Figure 568: Inbound Service Interface
e) Save and Activate. 5. Import the Service Interfaces SI_CallDeliveryService_outb and SI_CallDeliveryService_inb under Service Reference CallServiceViaAEX and SI_CallStorageService_outb and SI_CallStorageService_inb under Service Reference Services in Process Composer. a) In Process Composer import the services interfaces SI_CallDeliveryService_outb and SI_CallDeliveryService_inb, when asked use the CallServiceViaAEX service reference. b) Import the services interfaces SI_CallStorageService_outb and SI_CallStorageService_inb, when asked use the Services service reference.
Figure 569: Services References
Connect the Distribution Process and the Purchase Order Process
Figure 570: Purchase Order Process
Prohibida su reproducción 580
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
1. Define the Input Mapping from PO_purchaseOrder_DO to PO_goToDistribution_RP. For simplicity reasons the mapping should be a 1:1. a) Open the Purchase Order process and select the PO_goToDistribution_RP reference process. b) Go to the Properties and then Input Mapping tab. Note: If you see Empty in the Input Mapping Target structure, go back to the process tab and re select the Distribution process. c) Drag and drop (with the right click mouse) the PO_purchaseOrder_DO node into the MT_D_startProcess and choose Execute Default Matcher, it should map all the fields 1:1.
Figure 571: Input Mapping
Note: Because of simplification, we require no Output Mapping. 2. Open the Distribution Process and create a Data Object called D_DistributionProperties_DO, the data type should be DT_DeliveryServiceAddOn urn:bit800:xx:com a) Create a new Data Object. In the properties change the name to D_DistributionProperties_DO. b) In the Data Type tab from the drop down menu choose DT_DeliveryServiceAddOn urn:bit800:xx:com
Prohibida su reproducción © Copyright. All rights reserved.
581
Unit 10: Business Rules Management
Figure 572: Data Object
3. Configure the Service Interfaces SI_CallDeliveryService_outb and SI_CallStorageService_outb under Service Reference CallServiceViaAEX. The interfaces should be XI a) In Process Composer navigate to Services References → CallServiceViaAEX → SI_CallStorageService_outb → Overview change type to XI.
Figure 573: Service References
b) In Process Composer navigate to Services References → CallServiceViaAEX → SI_CallDeliveryService_outb → Overview change type to XI.
Figure 574: Service References
Prohibida su reproducción 582
© Copyright. All rights reserved.
Lesson: Explaining Testing and Monitoring of a PO Process
c) Save, build and deploy.
Prohibida su reproducción © Copyright. All rights reserved.
583
Unit 10: Business Rules Management
LESSON SUMMARY You should now be able to: ●
Explain testing and monitoring of PO processes
Prohibida su reproducción 584
© Copyright. All rights reserved.
Unit 10 Lesson 2 579
Explaining Data Flow Modeling
LESSON OVERVIEW This lesson explains data flow modeling. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain data flow modeling
Composite Application Framework (CAF) The SAP Composite Application Framework is used for Java business object modeling and service abstraction. It can be reached in the SAP NetWeaver Developer Studio (NWDS). The tools in the NWDS are organized. This enables application developers to focus on specific tasks. To reach the Composite Application Framework, choose the Composite Application perspective to develop with the CAF. Use CAF for standard persistence scenarios where highest possible performance is not needed and out-of-the-box conventions established by CAF are suitable. That is, relations are stored in a separate table, finder methods follow the (p1 OR p2) and (q1 and q2) style, equi-joins are used, and flushes take place immediately. Use JPA specifically if performance needs to be tweaked, standard table layout is not acceptable, or complex queries are required. In this case, use the JPA Editor to model JPA entities and apply templates to generate CRUD session beans. Motivation CAF aims at supporting the standard use cases of data persistence without requiring detailed JPA knowledge. Knowing the boundaries of CAF before deciding to use it is crucial to avoid getting trapped in them later.
Requirements and Constraints of CAF The SAP CAF application service acts as an adaptation component to adapt data and the SAP CAF business object to locally store data. The SAP CAF application services are exposed as Web services and can compose other services. Business objects in SAP CAF can be used as persistent storage of data that has to be available in processes and UI applications. Here, the lifecycle of the content is not bound to a UI session or process instance. It has a lifecycle of its own. Data in an SAP CAF business object has its own lifetime, is persistable, and is not coupled to anything else.
Prohibida su reproducción © Copyright. All rights reserved.
585
Unit 10: Business Rules Management
Figure 575: Intermediate Storage
Java Persistence Framework (JPA) Persistence components are responsible for fast access, management, and persistence of data. They rely on Enterprise Information Systems, such as an SAP system and database servers.
Figure 576: Java Persistence Framework
The main differences between the use of databases and ABAP are the following: ●
Java and ABAP data have separate database schemas.
●
There is no direct table access between ABAP/Java stacks.
●
The collaboration takes place at component level: JCo, WebServices, XI
With Java EE 5, a new object-relational persistence API, the Java Persistence API (JPA), has been added to the Java EE standard. SAP NetWeaver Application Server, Java EE 5 Edition contains a JPA implementation that is provided by SAP and called SAP JPA 1.0.
Prohibida su reproducción 586
© Copyright. All rights reserved.
Lesson: Explaining Data Flow Modeling
Figure 577: Java and ABAP Schemas
Entities JPA is an API for storing lightweight Java objects called entities in a relational database. An entity appears as a regular Java object, often referred to as a "Plain Old Java Object (POJO)." It does not need to implement any particular interface or extend a special class – all technical overhead associated with Enterprise JavaBeans Container-Managed Persistence (EJB CMP) entity beans is gone with JPA. You are free to define the entity according to your data model, including inheritance and polymorphism, without major restrictions being imposed by the persistence framework. Although an entity looks like a simple Java object, it is a Java object with a mapping to a relational database. Therefore it is necessary to declare an entity explicitly in order to distinguish it from other regular Java objects that you might use within your application, and you need a way to define how exactly to map the entity onto your existing database table(s). Since this kind of information can be considered metadata for the entity class, it is not surprising that JPA relies on the Java SE 5 standard technique for providing metadata: annotations.
Note: JPA allows the object-relational mapping information to be provided in XML format. However, annotations are easier to understand for a human reader, so annotations are used within this article. Defining the Object-Relational Mapping When developing a JPA application, you will often encounter entities just regular Java objects that you instantiate, fill with data, send to other application components, and otherwise manipulate by Java means. The relational aspect of the entity, the fact that it also resides as a row in a database table, and the problem of accessing it there, is most of the time hidden by the JPA framework. When designing the entity class itself, however, you must consider its representation in the database. You have to tell the JPA framework how exactly to map the entity to the relational database, that is, you have to define the object-relational mapping. In contrast to the situation with CMP 2.1 or JDO 1.0, the object-relational mapping is an integral part of the JPA specification and therefore standardized. JPA makes the application developer’s job as easy as possible by defining a set of very reasonable default mappings. If nothing else is stated, JPA makes assumptions on the names of
Prohibida su reproducción © Copyright. All rights reserved.
587
Unit 10: Business Rules Management
tables and columns, for example. Only if they do not match your situation will you have to add an appropriate declaration. The following table summarizes the most important default rules: Table 17: Default Mapping Roles Area
Default Role
Override by
Table name
An entity is mapped onto a ta- @Table ble having the name as the entity (usually the unqualified name of the entity class).
Persistent fields
All fields (with field based ac@Transient cess) or properties (with property based access) are persistent.
Column name
A persistent field or property is @Column mapped onto a column of the same name.
Unfortunately, the JPA specification does not define whether table and column names are casesensitive. With SAP JPA 1.0, if a table name or column name is specified explicitly, its case is respected. If the table name or column name is generated according to a default rule, upper case is assumed Defining the Persistence Unit The data model of a JPA application typically consists of several related entity classes, which have to be mapped together to the same database. The entity classes form a logical unit that is called a persistence unit. Within a JPA application, you have to define the persistence unit by a configuration file called persistence.xml. It is possible, but not required, to list the entities explicitly that form the persistence unit. If you do not do so, the JPA implementation scans the application for entities and detects them automatically.
Note: Always specify a data source in persistence.xml. Technically, specifying the name of the data source related to the persistence unit is optional in the persistence.xml file. If the name of the data source is omitted, some providers automatically use a built-in default data source, others assume a default name but do not provide the data-source itself, while others again might even reject the persistence unit as being incomplete. For this reason and for clarity, it is highly recommended to always specify the name of the data source to be used. Working with Entities – The Entity Manager Since entities are regular Java objects, you can work with them in the same way you usually do. Instantiate an entity, read and modify its data, do whatever you like – but do not expect any of those operations to be reflected in the database automatically. If you want the JPA framework to
Prohibida su reproducción 588
© Copyright. All rights reserved.
Lesson: Explaining Data Flow Modeling
manage a particular entity instance, you have to put it explicitly under the control of a JPA component called entity manager. As long as the entity manager controls the entity, you can expect that changes to the entity will be synchronized with the database. Once this control ends, however, the entity is again nothing but a regular Java object.
Requirements and Constraints of JPA Business applications often have to deal with persistent data stored in a relational database. For the Java platform, there are a variety of standards and proprietary solutions that address the issue, making it difficult to decide. The most fundamental, low-level programming interface is the Java Database Connectivity (JDBC). JDBC works with tabular row and column data rather than with Java objects, so that a considerable amount of work has to be spent to convert data back and forth. Object-relational persistence frameworks, on the other hand, allow you to work with the Java object model only. The framework undertakes the task to map the Java objects to the relational database, translates searches on the objects to SQL and handles all communication with the database. JPA is an API for storing lightweight Java objects called entities in a relational database. An entity is nothing more than a regular Java object, often referred to as a "Plain Old Java Object" (POJO). LESSON SUMMARY You should now be able to: ●
Explain data flow modeling
Prohibida su reproducción © Copyright. All rights reserved.
589
Unit 10 Lesson 3 584
Explaining Business Rules Management
LESSON OVERVIEW This lesson gives you an explanation of Business Rules Management. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain Business Rules Management (BRM)
Business Rules Business rules represent the constraints on behavior of the business and the policies and guidelines which drive business decisions. Business rules are owned by LoB and not by IT. Business users participate in and control rule definition and change, while business process experts model, validate, deploy, update, and archive business rules through their lifecycle. This enables IT organizations to work with business users to manage the business rules that drive process flow and execution. Application Rules and Business Rules A business rule is not the same as a rule defined and used in software applications. It is important to understand the difference between rules and business rules. Rules used in software applications are a set of conditions with associated actions. These are typically introduced in the form of an If/Then statement, for example, database constraint rules and object model rules. The rules are owned and managed by IT and not by the business. Business rules represent a set of standard business practices and policies that need to be applied consistently across business activities and are owned and managed by the business. Examples of business rules include Loan Product Eligibility Guidelines and Product Configuration Rules. Business Rules in an Organization Business rules are the most dynamic component of any application. Using business rules consistently improves an organization's adaptability to industry changes and competition. Externalizing business logic in the form of simple rules ensures that these rules are easily communicated across the organization and managed separately from the application code: business adaptability and flexibility via IT stability. Business rules are an integral and inherent part of an organization's daily operations. When introducing business rules, organizations have to consider the rules inherent in the following items: ●
Corporate charters
●
Management practices
Prohibida su reproducción 590
© Copyright. All rights reserved.
Lesson: Explaining Business Rules Management
●
Regulatory forces
●
Human resources management
●
Marketing strategies
●
Pricing policies
●
Products and services offerings
●
Customer relationship practices
BRM Offers SAP Business Rules Management (BRM) contain rules modeling capabilities targeting business analysts and rules implementation capabilities targeting business rules developers. Technical capabilities of SAP BRM for business rules composition and modeling use the following guidelines: ●
●
●
●
Business analysts are enabled to model complex business rules in an appropriate format of their choice. Both business analysts and rules developers are capable of inspecting business rules consistency and resolving conflicts. Developers are able to use rule models with data definitions of their choice for implementing executable rules. A seamless navigation from business process to business rules through integrated modeling for processes and rules is used.
If-Then Rules use the following guidelines: ●
Simple English like statements joined with and/or
●
Priorities for specifying sequences of execution
●
Rules overrides to declare mutually exclusive rules
Decision tables use the following guidelines: ●
Tabular representation of rules
●
Integration with Microsoft Excel
●
Features such as returning multiple rows of values and dynamic invocation
Prohibida su reproducción © Copyright. All rights reserved.
591
Unit 10: Business Rules Management
Figure 578: Flow Rules Example
Flow rules are laid out in a flow-like structure. Complex rules can be modeled using the following methods: ●
Gateways to branch out into different paths
●
Rule scripts to hold a set of actions
●
If-Then rules
●
Decision tables
●
Other flows and rule sets
Flow rules can integrate through flow elements until some condition is satisfied and make it easier to get an overview of the rule implementation.
Prohibida su reproducción 592
© Copyright. All rights reserved.
Lesson: Explaining Business Rules Management
Figure 579: End-to-End Change Management
End-to-End development support is provided through the Eclipse-based Rules Composer, a user interface with role-based access to manage and deploy business rules at runtime, manage access permissions and versioning, and trace business rules reports. Rules accelerates SAP Business Process Management (BPM) by providing the following features: ●
Clear decoupling of process logic from decision logic
●
Automated decisioning
●
Reusable business rules services
●
Rules-based correlations for real-time business events
Use cases for rules in SAP BPM include the following examples: ●
Complex rules-based decisions (for example, pricing and credit decisions)
●
Responsibility determination
●
Recognition of business events
●
Routing rules
●
Parameter thresholds and tolerance (constraint rules)
Prohibida su reproducción © Copyright. All rights reserved.
593
Unit 10: Business Rules Management
Figure 580: Tight Integration with SAP BPM
SAP BRM provide complete lifecycle change management capabilities for securing, governing and managing business rules. Rules versioning, permissions, alerts, are provided with the Rules Repository, containing data types, service interfaces, and service operations for composition and reuse. SAP BRM provides both design-time and runtime rules repository services. Business users are able to completely coordinate management, review, and change approval activities in a collaborative fashion using a secure and protected wWeb based business UI. Access management, reporting services, traceability and change approval mechanisms enable organizations to perform rules asset management, having the security of managing their business rules as concisely as any other organizational asset. ●
Tabular representation of rules
●
Integration with Microsoft Excel
●
Features such as returning multiple rows of values and dynamic invocation
Reusability of Rules Technical usage scenarios for rules with SAP BRM include the following: ●
●
Model rules driven decisions from within a composite business process model. Model rules in SAP Composition Environment independently and reuse them across a variety of edge composite applications and BPM functionalities.
Prohibida su reproducción 594
© Copyright. All rights reserved.
Lesson: Explaining Business Rules Management
●
●
Model rules in SAP Composition Environment and call these rules from an ABAP business application through the Business Rules Framework Plus-Java BRM Connector. Call a rule driven decision modeled as a Web service in SAP Composition Environment from within the SAP Business Warehouse component.
Rules Composer and Process Composer Business rules can be created in the Rules Composer or the Process Composer.
Figure 581: BRM Components
Business rules describe the operation, definition, and constraints on the behavior of a business and enables decision automation. Business rules represent the core business logic of each organization and guide and control the basic business processes form the back bone of any business transaction. The following are two types of composers: ●
●
Rules Composer — Business rules modeled the Rules Composer can be used in any other business application or business process. Process Composer — Business rules modeled in the Process Composer can only be used in a business process context.
Rules Composer allows a separation of business rules from the application code and from a complex business process workflow. Rules Composer also reduces the complexity in maintaining constraints, which affects the business process. Process Composer helps you centralize the entire process. It shows the business process and the constraints affecting the process in the same development component.
Complex Business Rules Implementation Tasks SAP BRM contains rule modeling capabilities targeting business analysts and rule implementation capabilities targeting business rule developers. SAP BRM business rules composition and modeling includes the following technical capabilities: ●
Business analysts can model complex business rules in different formats, for example: complex guidelines using inference rules, involved decision sequences using graphical modeling, and rule-based responses to complex patterns of business events, like fraud detection.
Prohibida su reproducción © Copyright. All rights reserved.
595
Unit 10: Business Rules Management
●
●
●
Business analysts and rule developers are capable of inspecting business rule consistency and resolving conflicts. Developers are able to use rule models with data definitions of their choice for implementing executable rules. A seamless navigation from the business process to business rules through integrated modeling.
Business Rules Management Components BRM consists of three components to help you model your business rules. Rules Composer Rules Composer is a user-friendly interface that enables you to create rich rule formats. It supports multiple data models for rules implementation and business vocabulary independent of the data model. Rules Composer provides validation of business rules, testing and refinement of rules based on test results, and report generation for rule results. Rules Manager Rules Manager is a Web-based tool used by business analysts to maintain rules. Rules versioning, repository service, permissions, access control, and rules governance all can be managed through the Rules Manager. Like Rules Composer, Rules Manager can validate, test, refine, and generate reports for rules. Rules Engine The Rules Engine is a high-performance, stateless Enterprise JavaBeans (EJB) engine. It includes Rete-based inference and sequential engines. LESSON SUMMARY You should now be able to: ●
Explain Business Rules Management (BRM)
Prohibida su reproducción 596
© Copyright. All rights reserved.
Unit 10 Lesson 4 591
Creating Rules with Rules Composer
LESSON OVERVIEW This lesson shows you how to create rules with Rules Composer. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Create rules with the Rules Composer
Rules Composer Overview
Figure 582: Rules Composer Overview
Rules Composer allows you model, implement, test, and refine rules. In Rules Composer you can define the following rules-based objects: ●
Flow rulesets including rule flow elements, rule scripts, and gateways
●
Common definitions
●
Rule overrides
●
Activities
●
Enumeration types
Rules Composer comes with the following features: ●
Integrating rules with Microsoft Office Excel
●
Testing XSD rulesets
Prohibida su reproducción © Copyright. All rights reserved.
597
Unit 10: Business Rules Management
●
HTML reporting of entities within rulesets and decision tables
●
Storing different versions of rulesets in DTR using addition, modification, and deletion data
●
Generating Web services for rulesets
Rule Flow Task Modelling
Figure 583: Flow Rulesets — Overview
A flow ruleset executes rules as designed in the Composite Explorer flow chart. Flow rulesets always have a single, main flow with potentially many other rule flows. The execution of the ruleset starts with the main flow. A rule flow is a reusable entity within a flow ruleset and is based on activities associated with artifacts including rule scripts, rule flow, rulesets, rules, and decision tables. Flow Rule Elements ●
●
●
●
●
Start and end events and error elements — A rule flow has a single start event and can have one or more end events and error elements. Rule scripts — A rule script is a reusable artifact within a flow ruleset and is a sequence of actions. Exclusive choice gateway — An exclusive choice gateway has at least two named branches, one being the default branch. Each named branch has a condition associated with it. Ruleset — Rulesets are a collection of multiple rules related to a specific business situation. If-Then rules — If-Then rules use the following syntax: IF the conditions are satisfied, THEN the action is started.
Prohibida su reproducción 598
© Copyright. All rights reserved.
Lesson: Creating Rules with Rules Composer
●
●
Decision tables — Decision tables are a collection of If-Then rules that have conditions with the same structure. These can be viewed in as a spreadsheet. Connectors — Connectors join all activities and elements in a rule flow to each other.
Decision Tables and Rule Scripts Implementation An exclusive choice gateway has at least two named branches, one of these being a default. Each named branch has a condition associated with it. A rule script is a sequence of actions. A rule override helps resolve conflicts between two satisfied If-Then rules by suppressing execution of lower priority rule. Date effectivity can be used to specify the time period during which a rule is effective, and can thereby be executed. The rules composer provides the capability for rules, decision tables to use restricted value from a list of drop-down choices in conditions and action. These restricted drop-down choices are enumeration types, or groups of values of a standard primitive type.
Figure 584: Rule Overrides and Enumeration Types
The Rules Composer provides the capability to export a decision table to a spreadsheet. Users are able to seamlessly edit and analyze data using the capabilities of Microsoft Excel. It is possible to import these changes back into the decision table without any loss of data.
Prohibida su reproducción © Copyright. All rights reserved.
599
Unit 10: Business Rules Management
Figure 585: Integration with MS Excel
The Rules Composer provides a capability to generate a printable report for ruleset and decision tables. The reports include information about all entities within a ruleset. The Rules Composer also allows you to compare different versions of rulesets in the Design Time Repository (DTR) in a text format. DIFF captures three types of edit operations between two different versions of ruleset, name addition, modification, and deletion.
Figure 586: HTML Reports of Rulesets, Diff Between Two Ruleset Versions
Rules Composer provides a simple menu driven facility to provision a Web service for a ruleset written on XML schema. When the rules are deployed on a server, the Web server also gets deployed. It can be verified using the SAP NetWeaver Administrator.
Prohibida su reproducción 600
© Copyright. All rights reserved.
Lesson: Creating Rules with Rules Composer
Figure 587: Web Service Generation for a Ruleset
Rule override and date effectivity are managed as follows: ●
●
Rule override — Resolves conflicts between two satisfied If-Then rules by allowing the rule with the highest priority to start. Date effectivity — Used to specify the time period during which a rule is effective and can be executed.
The Rules Composer provides the capability for rules and decision tables to use restricted condition and action values. Restricted values are available from a drop-down menus. These restricted drop-down menu choices are enumeration types, or groups of standard, primitive type values.
Rulesets as a Web Service Rules Composer provides a simple menu driven UI to create Web services for rulesets written using an XML schema. When rules are deployed on a server, the Web service is also deployed. Web services can be verified using SAP NetWeaver Administrator. To set rulesets as a Web service, use the following procedure: 1. In the Project Explorer view, expand the Rules Composer DC and the Rules Modeling nodes. 2. In the context menu of a ruleset or flow ruleset, choose Web Service Create WSDL Artifact. 3. In the dialog box that appears, in the Ruleset Name: Service Attributes area, accept the defaults values or makes changes. Then, choose Next. 4. In the Ruleset Name: Service Signature area, the input and output types appear and the checkboxes are selected. Choose Next. 5. In the Ruleset Name: WSDL Preview area, the contents of the WSDL artifact appear. Choose Finish. 6. Deploy the rules composer DC. The Web service is now ready for use. LESSON SUMMARY You should now be able to: ●
Create rules with the Rules Composer
Prohibida su reproducción © Copyright. All rights reserved.
601
Unit 10 Lesson 5 596
Managing Business Rules with Rules Manager
LESSON OVERVIEW This lesson shows you how to manage business rules with Rules Manager. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Use the Business Rules Manager
Rules Manager Overview
Figure 588: Rules Manager Overview
Rules Manager allows rule testing, rule refinement, and end-to-end change management. With Rules Manager, business users can observe and change business policies that are deployed in an application without needing to stop the application. The provides complete management of the business rules life cycles.
Prohibida su reproducción 602
© Copyright. All rights reserved.
Lesson: Managing Business Rules with Rules Manager
Figure 589: Rules Manager — Overview
Rules Composer comes with the following features: ●
Business user-friendly rich rule formats
●
Support for multiple data models for rules implementation
●
Data model independent business vocabularies
●
High performance rules engine
●
Stateless Enterprise JavaBeans (EJB) engine
●
Rete-based inference and sequential engines
Rules Manager Rule Changes Rules Manager Capabilities ●
Role-based access to rules projects created with Rules Composer or Process Composer
●
Create, duplicate, and edit If-Then rules, decision tables, and definitions
●
View and compare version histories
●
Generate reports for rulesets, rules, and decision tables
●
Show usage of decision tables and definitions
●
Check consistency for If-Then rules and decision tables
Prohibida su reproducción © Copyright. All rights reserved.
603
Unit 10: Business Rules Management
Figure 590: Rules Manager — Roles Based Access
Role-based access can be assigned for BRM entities by using SAP NetWeaver Administrator. Permissions range from read-only to edit. Different access permissions can be given to different entities of a rules project.
Figure 591: Decision Table Experience in the Rules Manager
Prohibida su reproducción 604
© Copyright. All rights reserved.
Lesson: Managing Business Rules with Rules Manager
Figure 592: Microsoft Excel Integration
Integration with Microsoft Excel enables business users to make changes in decision table rules by exporting decision table data to Microsoft Excel, modifying it, and then importing it back into the decision table. Feature parity with the Rules Composer is provided so that business users are able to make changes to values using Microsoft Excel 2007 and upload the changes at runtime. Rules Manager enables decision tables to be exported to Microsoft Excel for easy editing. After changes are made to the decision table, you can re-import it back into the ruleset.
Prohibida su reproducción © Copyright. All rights reserved.
605
Unit 10: Business Rules Management
Rules Reporting and Versioning
Figure 593: Rules Manager Versioning: Latest and Active Version
During versioning, the user is asked to choose between an active or latest version of the product, and will keep working on the chosen version until Change Project or Logoff is chosen. This enables users to work on active or latest versions of rules artifacts and perform changes incrementally without activation.
Figure 594: Rules Manager Versioning: History
Prohibida su reproducción 606
© Copyright. All rights reserved.
Lesson: Managing Business Rules with Rules Manager
Rules Manager shows the version history of a rules project. Business users can compare the different versions of rules by added data, modified data, deleted data, If-Then rules, and decision tables. Changes are color coded to easily see the differences in rulesets, rules, and definitions.
Figure 595: Refactoring Rules
Refactoring rules enable users to create complex conditions for rules and then group the conditions logically. Reports of Rulesets Business users can generate reports of rulesets. The reports contain details regarding the rules; decision tables and other rule elements contained in a ruleset.
Figure 596: Rules Manager — Report Generation
Prohibida su reproducción © Copyright. All rights reserved.
607
Unit 10: Business Rules Management
Rules Manager allows business users to find usage of a decision table or a definition, making it easier to track the effect of changes.
Figure 597: Rules Manager Show Usage
Rules Manager also provides a consistency checker feature to check syntactic properties of rules and decision tables. The consistency checker can also be used to check for overlapping conditions and missing ranges in decision tables.
Figure 598: Rules Manager— Consistency Checker
How to Create a Flow Ruleset to Determine the Storage Location of the Ordered Spare Parts For the steps and data of this demonstration refer to the exercise Create a Flow Ruleset to Determine the Storage Location of the Ordered Spare Parts.
Prohibida su reproducción 608
© Copyright. All rights reserved.
Unit 10 Exercise 22 603
Create a Flow Ruleset to Determine the Storage Location of the Ordered Spare Parts SP03 We want to build up a business rules which determine by given postal code the storage location of the ordered spare parts. We will implement a Java method. In the first step we define the method signature with input parameter and return parameter. In a second step we define the local parameters and then in the third step we implement the logic. 1. Define the Flow RuleSet susing the data from the table. Label
Value
Comment
Name
determineStorageLocation
Return Type
string — http://www.w3.org/ Choose 2001/XMLSchema
Parameters
Name: customer — urn:bit800:xx:com Type: DT_Customer Collection: unmarked
First click Add to insert a new row
2. Define the following fixed and variable definitions: Table 18: Fixed Definitions Value left (String 1)
Data Type
Value Right (Default Value)
STOCK_NORTH
String [java.lang]
us.north
STOCK_EAST
String [java.lang]
us.east
STOCK_WEST
String [java.lang]
us.west
STOCK_SUD
String [java.lang]
us.sud
Table 19: Variable Definitios Value left (String 1)
Data Type
Value Right (Default Value)
Comments
stock
String [java.lang]
STOCK_NORTH
Choose from list under Definitions
Prohibida su reproducción © Copyright. All rights reserved.
609
Unit 10: Business Rules Management
postalCodeAsString
String [java.lang]
Null as string
First choose step under Functions Util>{Object} as string
Null
String [java.lang]
customer/address/ postalCode
Click on Null and choose the postalCode in the list customer
3. Define a decision table
Figure 603: Decision Table
4. Define a Rule Flow with one step postalCode2StorageLocation 5. Use the Ruleset in the Output Mapping of the D_start_SE with a Data Object called D_DistributionProperties_DO with Data Type DT_DeliveryServiceAddOn urn:bit800:services:com in the Distribution Process. 6. Test with the Happy Path
Figure 611: Test
Prohibida su reproducción 610
© Copyright. All rights reserved.
Unit 10 Solution 22 605
Create a Flow Ruleset to Determine the Storage Location of the Ordered Spare Parts SP03 We want to build up a business rules which determine by given postal code the storage location of the ordered spare parts. We will implement a Java method. In the first step we define the method signature with input parameter and return parameter. In a second step we define the local parameters and then in the third step we implement the logic. 1. Define the Flow RuleSet susing the data from the table. Label
Value
Comment
Name
determineStorageLocation
Return Type
string — http://www.w3.org/ Choose 2001/XMLSchema
Parameters
Name: customer — urn:bit800:xx:com Type: DT_Customer Collection: unmarked
First click Add to insert a new row
a) Navigate to bit800_xx/pr/pm → Process Modeling → Rule Sets and with the mouse right-click chose New Flow Ruleset… b) In the new window, New Flow Ruleset fill in the values from the table. c) Choose Finish. Compare the result with the figure below:
Figure 599: Flow Ruleset
Note: The error displayed is because at the moment there is no result value.
Prohibida su reproducción © Copyright. All rights reserved.
611
Unit 10: Business Rules Management
2. Define the following fixed and variable definitions: Table 18: Fixed Definitions Value left (String 1)
Data Type
Value Right (Default Value)
STOCK_NORTH
String [java.lang]
us.north
STOCK_EAST
String [java.lang]
us.east
STOCK_WEST
String [java.lang]
us.west
STOCK_SUD
String [java.lang]
us.sud
Table 19: Variable Definitios Value left (String 1)
Data Type
Value Right (Default Value)
Comments
stock
String [java.lang]
STOCK_NORTH
Choose from list under Definitions
postalCodeAsString
String [java.lang]
Null as string
First choose step under Functions Util>{Object} as string
Null
String [java.lang]
customer/address/ postalCode
Click on Null and choose the postalCode in the list customer
a) In the Flow Ruleset click on the Definitions tab. b) In the Fixed Definitions area, click on the + symbol and chose a string data type String [ java.lang] in the pop up window and accept with enter. c) Click on the value String1 and replace it with STOCK_NORTH accepts with enter. Click on Default Value and replace it with us.north. In the same manner define the rest of Fixed Definitions as displayed in the table above. And save your work! d) Repeat steps a-c for the rest of the data in the table.
Figure 600: Fixed Definitions
e) Save
Prohibida su reproducción 612
© Copyright. All rights reserved.
Lesson: Managing Business Rules with Rules Manager
f) In the same manner set the string types in the Variable Definitions area. Work here also row by row. For the postalcodeAsString we need 2 steps because it is a big integer but we need a string so we have to use a cast.
Figure 601: Variable Definitions
g) Save h) Now change back to the Overview tab and choose you’re Result to the variable stock. Save your work. After this step there are no more error messages.
Figure 602: Overview Tab
3. Define a decision table
Figure 603: Decision Table
a) Change to Decision Tables tab and click on New. A new window opens, Decision Table Creation Wizard. b) Fill in the Decision Table Name: postalCode2StorageLocation and click on Next In the next mask choose in the Available Condition list, postalCodeAsString and accept the value with the arrow symbol. The value is now listed in the Selected Conditions area.
Prohibida su reproducción © Copyright. All rights reserved.
613
Unit 10: Business Rules Management
Figure 604: Available Conditions
c) Click Next. From the selected Actions choose stock.
Figure 605: Actions
d) Click on Finish. Now the table has been created and we can begin to fill in the values.
Figure 606: Decision Table
e) To fill in the storage location data make a right click with your mouse and choose Add Conditions by Pressing Ctrl ++. Here you insert the following data (only left side) and click on OK.
Figure 607: Decision Table
Prohibida su reproducción 614
© Copyright. All rights reserved.
Lesson: Managing Business Rules with Rules Manager
f) Delete Default Value and start filling the stock column with data. Start with a right mouse click in the first row and call Set Dynamic Value by Pressing F2. Choose the fixed values as described in the following table. Accept your values with Alt and Enter!
Figure 608: Decision Table
g) Save. 4. Define a Rule Flow with one step postalCode2StorageLocation a) Change to the Rule Flows tab and delete the connection between Start and End. b) Insert a Decision Table flow object and connect it with the End. c) Change in the Property view the Decision Table to postalCode2StorageLocation. Use the list box and the browse function in the selection row. Save your work..
Figure 609: Rule Flow
5. Use the Ruleset in the Output Mapping of the D_start_SE with a Data Object called D_DistributionProperties_DO with Data Type DT_DeliveryServiceAddOn urn:bit800:services:com in the Distribution Process. a) Open the Distribution Process. Create a Data Object in the Distribution Process with Data Type DT_DeliveryServiceAddOn - urn:bit800:services:com b) Select the D_start_SE event and go to Properties → Output Mapping c) Define a mapping from MT_D_startProcess / customer to the D_DistributionProperties_DO/storageLocation d) Create a function by double clicking in the mapping. Enter: determineStorageLocation (MT_D_startProcess / customer). Your rule set is available in the sap.education.com/bit800_xx/pm
Prohibida su reproducción © Copyright. All rights reserved.
615
Unit 10: Business Rules Management
Figure 610: Output Mapping
e) Save, build and deploy your DC. 6. Test with the Happy Path
Figure 611: Test
a) Use the WS Navigator to test, use: ●
SparePartNo = 600 (item is available)
●
PostalCode = 123456
●
E-mail = [email protected]
b) Check in /nwa Manage Processes look at the details of your process instance. You should be able to see the Storage Location in the context of the D_DistributionProperties_DO data object.
Prohibida su reproducción 616
© Copyright. All rights reserved.
Lesson: Managing Business Rules with Rules Manager
LESSON SUMMARY You should now be able to: ●
Use the Business Rules Manager
Prohibida su reproducción © Copyright. All rights reserved.
617
Unit 10: Business Rules Management
Prohibida su reproducción 618
© Copyright. All rights reserved.
Unit 10
613
Learning Assessment
1. Input masks are commonly used in technical processes in the business layer and are created using various technologies. Which of the following technologies is used in SAP BPM to create input masks? Choose the correct answer. X
A Visual Forms
X
B Web Dynpro
X
C Adobe Composer
2. What is Visual Composer used for? Choose the correct answer. X
A Configuring events
X
B Creating applications
X
C Creating a business process
X
D Viewing process context graphically
3. What do business rules describe? Choose the correct answers. X
A Constraints
X
B Definitions
X
C Operations
X
D Process flows
Prohibida su reproducción © Copyright. All rights reserved.
619
Unit 10: Learning Assessment
4. What do application rules define? Choose the correct answer. X
A A set application tasks and sequencing.
X
B A set of restrictions placed on the process model.
X
C A set of conditions with associated actions.
X
D A set of standard practices and policies.
5. What do business rules define? Choose the correct answer. X
A A set application tasks and sequencing.
X
B A set of restrictions placed on the process model.
X
C A set of conditions with associated actions.
X
D A set of standard practices and policies.
6. In which of the following applications can business rules be created? Choose the correct answers. X
A Process Composer
X
B Rules Composer
X
C Visual Composer
X
D Web Dynpro
7. What rules-based actions can you define? Choose the correct answers. X
A HTML reporting
X
B Integrating rules with Microsoft Excel
X
C Generating Web services for rulesets
X
D Testing XML rulesets
Prohibida su reproducción 620
© Copyright. All rights reserved.
Unit 10: Learning Assessment
8. Which of the following are BRM components? Choose the correct answers. X
A Rules Composer
X
B Rules Engine
X
C Rules Server
X
D Rules Manager
9. What is Rules Manager used for? Choose the correct answers. X
A Creating rules
X
B Modeling business processes
X
C Storing rules
X
D Testing rules
Prohibida su reproducción © Copyright. All rights reserved.
621
Unit 10
616
Learning Assessment - Answers
1. Input masks are commonly used in technical processes in the business layer and are created using various technologies. Which of the following technologies is used in SAP BPM to create input masks? Choose the correct answer. X
A Visual Forms
X
B Web Dynpro
X
C Adobe Composer
2. What is Visual Composer used for? Choose the correct answer. X
A Configuring events
X
B Creating applications
X
C Creating a business process
X
D Viewing process context graphically
3. What do business rules describe? Choose the correct answers. X
A Constraints
X
B Definitions
X
C Operations
X
D Process flows
Prohibida su reproducción 622
© Copyright. All rights reserved.
Unit 10: Learning Assessment - Answers
4. What do application rules define? Choose the correct answer. X
A A set application tasks and sequencing.
X
B A set of restrictions placed on the process model.
X
C A set of conditions with associated actions.
X
D A set of standard practices and policies.
5. What do business rules define? Choose the correct answer. X
A A set application tasks and sequencing.
X
B A set of restrictions placed on the process model.
X
C A set of conditions with associated actions.
X
D A set of standard practices and policies.
6. In which of the following applications can business rules be created? Choose the correct answers. X
A Process Composer
X
B Rules Composer
X
C Visual Composer
X
D Web Dynpro
7. What rules-based actions can you define? Choose the correct answers. X
A HTML reporting
X
B Integrating rules with Microsoft Excel
X
C Generating Web services for rulesets
X
D Testing XML rulesets
Prohibida su reproducción © Copyright. All rights reserved.
623
Unit 10: Learning Assessment - Answers
8. Which of the following are BRM components? Choose the correct answers. X
A Rules Composer
X
B Rules Engine
X
C Rules Server
X
D Rules Manager
9. What is Rules Manager used for? Choose the correct answers. X
A Creating rules
X
B Modeling business processes
X
C Storing rules
X
D Testing rules
Prohibida su reproducción 624
© Copyright. All rights reserved.
UNIT 11
Configuration Tasks and Extensions
Lesson 1 Explaining Special Configuration Tasks in SAP NetWeaver Administrator (NWA)
626
Lesson 2 Monitoring the Health State of the Application
630
Lesson 3 Explaining SAP Operational Process Intelligence
635
UNIT OBJECTIVES ●
Explain special configuration tasks in SAP NetWeaver Administrator (NWA)
●
Monitor the health state of the application
●
Explain SAP operational process intelligence
Prohibida su reproducción © Copyright. All rights reserved.
625
Unit 11 Lesson 1 620
Explaining Special Configuration Tasks in SAP NetWeaver Administrator (NWA) LESSON OVERVIEW This lesson explains special configuration tasks in SAP NetWeaver Administrator (NWA). LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain special configuration tasks in SAP NetWeaver Administrator (NWA)
Java System Properties The Java system properties can be set in the NWA, at the path: NWA → Configuration → Infrastructure → Java System Properties.
Figure 612: Java System Properties
When the activity is started, the already configured properties are displayed.
Prohibida su reproducción 626
© Copyright. All rights reserved.
Lesson: Explaining Special Configuration Tasks in SAP NetWeaver Administrator (NWA)
Figure 613: Java System Properties Overview
The Java System Properties tool enables you to view and edit online the current system configuration of the AS Java. This includes default and custom property data. You can perform the following tasks: ●
View and edit properties of kernel and service modules
●
View properties of Java applications
●
View and edit JVM parameters on a particular instance
●
View shared tables (shared memory)
●
View and edit filters
These tasks are valid for all server processes on template and instance level.
Special Configuration Tasks In the exercise, Create the Configuration of a Process, we set the communication to the SR, the ID, and so on. Additionally, it is possible to configure further details of the Java environment, in the Java Parameter settings (or parameter tuning). Depending on the expected scenarios and the number of requests that will be running on the SAP PO system, the system must be tuned accordingly to be able to cope with the load. There are no golden rules about how to tune a system, but there are some parameters within the Java stack that need to be taken into account in the context of sizing and tuning. Some of these parameters will be explored in the next sections. FCAServerThreadCount
Prohibida su reproducción © Copyright. All rights reserved.
627
Unit 11: Configuration Tasks and Extensions
For systems that need to process high volumes of synchronous SOAP messages or that have a large amount of concurrent users, this parameter should be increased. The default value for FCAServerThreadCount is 30, but in high-volume systems it should be doubled. If this is not enough, then the parameter should be further increased. However, it is advised to use small incremental steps each time. The FCAServerThreadCount parameter is part of the HTTP provider service of the Java stack and can be changed via configtool. Note that when changing FCAServerThreadCount, the number of server threads will be affected. Therefore, you should ensure that the number of Java server threads is changed accordingly. CM Timeout Values The first entry point for client requests to the Java instance is the ICM. The ICM forwards the request to an available Java server node, where the processing takes place. If the request processing takes longer than defined by the timeout parameter, then the request is automatically terminated. Therefore, it is important to configure a reasonable timeout value for the ICM parameters. As its name suggests, the timeout value defines how long it takes before a session times out and the connection is reset. The proctimeout parameter defines the allowed processing time for an HTTP(S) request. This value should not be set very high because it is preferable that the processing of requests takes place in a reasonable amount of time. Furthermore, the session timeout should not be set too high because sessions are kept open for the duration of the timeout value and, therefore, hold resources for this same duration. These resources are no longer usable for other processes. If you require a high timeout value, then it might be better to increase the number of sessions or threads on the ICM. The ICM parameters can be set in the following way: ●
icm/server_port_0 = PROT=HTTPS, PORT=443, TIMEOUT=60, PROCTIMEOUT=600
The parameters are as follows: ●
icm/server_port_#: Defines the number of the parameter. You can configure multiple ICM server ports, each for its own purpose.
●
PROT: The protocol that is being used for this particular port.
●
PORT: The port number that the defined protocol “listens” to.
●
TIMEOUT: The timeout value for the connections.
●
PROCTIMEOUT: The timeout value for the actual processing of a request.
The ICM parameters need to be set in the instance profile of the Java instance, which can be found in /sapmnt//profile. After changing the values of these parameters, a restart of the Java system is required to activate them. Garbage Collection Configuration In most cases, the default garbage collection (which comes preconfigured with the SAP Java installation) is sufficient to match the workload of the Java server tasks. In special cases, the garbage collection algorithm can be adjusted, but only after consulting SAP. Database Connection Pool Configuration
Prohibida su reproducción 628
© Copyright. All rights reserved.
Lesson: Explaining Special Configuration Tasks in SAP NetWeaver Administrator (NWA)
A Java server process makes use of threads to process requests. For each request (user request or a system request) that enters the system, the server creates a thread. If data needs to be fetched from or written to the database, then a database connection is established. This database connection is taken from the connection pool. When the activity is finished, the database connection is freed and cleared after the expiration time, and the thread becomes available again for new processes. You need to ensure that the database connection pool is large enough to cope with the demand. If you need to increase the number of threads while tuning your system, then remember to also accordingly adjust the database connection pool. The database connection pool can be modified by opening the Configtool and navigating to Cluster Data → Template → Instance → Services → DBpool . LESSON SUMMARY You should now be able to: ●
Explain special configuration tasks in SAP NetWeaver Administrator (NWA)
Prohibida su reproducción © Copyright. All rights reserved.
629
Unit 11 Lesson 2 624
Monitoring the Health State of the Application
LESSON OVERVIEW This lesson explains how to monitor the health state of the application. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Monitor the health state of the application
The Health State of a J2EE Application Server It is possible to check the health state of your PO application with several tools as follows: ●
The Runtime Workbench
●
Wily Enterprise Manager (EM)
●
SAP Management console
●
SAP Solution Manager Monitoring
●
JVMMON
The Runtime Workbench is a central entry point to access several functions and overviews in the SAP PO system. It can be very useful for quick insight into the high-level status of certain components. Wily Enterprise Manager Wily Enterprise Manager (EM) is delivered as a standard component within the SAP support contract and is free of charge. Within Wily EM, there are many standard dashboards that can help you analyze the current state of the Java stack. It also caters for historical analysis by providing historical data up to 30 days in the past. It is equipped with a console view that shows the high-level status of the system. For a deep-dive analysis, it provides a tool known as the Investigator. Wily EM also provides detailed insight for every node of the Java instance. Performance Analysis with Wily Enterprise Manager Wily EM can be used to narrow down performance and stability issues within the Java stack, and it has some standard dashboards to monitor the most important key performance indicators of your Java stack. It also provides insight into the queues of the AEX and communication channels. Besides being used for troubleshooting issues, Wily EM can (and should) also be used to perform regular health checks on the system. Monitor System and Application Thread Utilization
Prohibida su reproducción 630
© Copyright. All rights reserved.
Lesson: Monitoring the Health State of the Application
All activities within the Java stack are performed by the usage of threads. When the SAP PO system starts and on thereafter on request, an initial and minimum thread count is allocated. Additional threads can be progressively allocated until the maximum usage has been reached. If the maximum number of threads becomes allocated and in use, then no additional processing can take place, and the system will basically come to a standstill. In many cases, it’s sufficient to stick to the default number of system and application threads, but it is important to regularly perform health checks on the system to check if the number of allocated threads remains stable or sufficient. If you find that the thread utilization on the system is high, then further analysis should be performed to identify the root cause. Several reasons can justify a high number of threads being used by the system. Applications that were not properly closed, hanging sessions, a bug in the software, and so on, can be among the possible reasons. A system running out of its capacity can also justify such an issue. In that case, one of the possibilities to resolve the issue will be to configure an additional server node or install an additional application server. Monitor Java Heap Utilization All processing within the Java server node takes place in the SAP JVM. The heap memory forms an important part of the JVM. When a process is started, it claims memory in the heap space in order to process requests. The garbage collection process is responsible for checking the heap memory at regular time intervals to verify whether the allocated memory segments (in the heap space) are still allocated to an active process. If that is not the case, then they will be moved to another space segment within the heap or be cleared. SAP Management Console The SAP Management Console provides a common framework for centralized system management. SAP MMC can be accessed via the following URL, which will launch a Java applet from the browser: http://:513. The SAP MMC is responsible for the following tasks: ●
Display the current system status
●
Monitor and control the SAP system (stop and start)
●
Display log and trace files, profiles, parameters, and system environment
●
Display Internet Communication Manager statistics
●
Display and control Java instance processes
●
Monitor system alerts
●
List access points to the SAP system
●
Display information about threads, sessions, and caches
●
Display JVM garbage collection and heap information
●
Save the current system status information, which can be provided to SAP if support is required
SAP Solution Manager
Prohibida su reproducción © Copyright. All rights reserved.
631
Unit 11: Configuration Tasks and Extensions
SAP Solution Manager has the following core capabilities for administering and monitoring AEX installations: ●
Overview Monitor, including integration server, central and decentral adapter engines, and business systems (including ABAP proxies)
●
Central message monitoring
●
Root-cause analysis
●
Unified Alerting Infrastructure and Inbox
●
Notification via e-mail and SMS
●
Incident management and ticketing
●
Central PI message search (user-defined search)
These capabilities become essential when executing the following administrative tasks: ●
End-to-end error detection to perform root-cause analysis
●
Spot and troubleshoot performance bottlenecks
●
Support system upgrades and changes
●
Regular system health checks
●
Handover procedures
●
Trends analysis
JVMMON JVMMON is a monitoring tool that’s delivered as part of the SAP JVM. The tool provides a wide range of monitoring tasks. The JVMMON application can be found in the JVM directory and is delivered with a command-line tool and a separate tool with a graphical user interface. The JVMMON application can be attached to a running SAP JVM and provides comprehensive monitoring information or controls various aspects of the JVM configuration. After selecting a running JVM, the following information about its current state is presented: ●
VM-related information, such as version, platform, build information, and so on
●
Stack traces, optionally enriched with additional descriptive information
●
Class statistics in detail or short summary
●
Information about the VM and the cluster memory consumption
●
Heap dump, optionally enriched with additional information
●
Information about the shared libraries loaded by the VM
●
Garbage collection history information
Furthermore, the following actions can be performed on the JVM: ●
Starting and stopping debugging on the fly
Prohibida su reproducción 632
© Copyright. All rights reserved.
Lesson: Monitoring the Health State of the Application
●
Setting trace flags to enable or disable specific trace output
●
Forcing a full garbage collection or a maximum compaction garbage collection
Thread Dumps In cases in which the system is hanging or very poorly performing and past thread dumps are no longer available in the system, you might need to generate dumps of the current situation. These thread dumps are often required by SAP support to help them troubleshoot customer issues. Heap Dumps When a very high amount of memory is allocated within a server node of the Java stack, the server node might generate a heap dump: the complete contents of the memory will be written to a dump file on the Operating System level. In such a case, the server process will generally be restarted automatically by the startup and control framework. Heap dumps can also be performed manually using the JVMMON tool. To analyze the contents of a heap dump, the Memory Analyzer tool can be used. The Java heap analyzer can be found within SAP NetWeaver Developer Studio as an Eclipse plug-In.
The Health State of a BPM Engine You can test the health of the BPM engine by using the following two applications: ●
Component Monitor
●
System Overview
The SAP_BPM_ENGINE_TEST action is needed to run the BPM engine test. To run the application, it is required that your user contains the following roles: Table 20: User Roles Role
Activities
NWA_SUPERADMIN
●
●
●
View the number of process and task instances in different statuses. View the status of the BPM subsystems, adapters, and so on. Navigate to the process troubleshooting screen and start the BPM applications when something fails.
●
Configure the process engine.
●
Test the basic BPM functionalities.
●
View or configure the process instance memory threshold.
Prohibida su reproducción © Copyright. All rights reserved.
633
Unit 11: Configuration Tasks and Extensions
Role
Activities
NWA_READONLY
●
●
●
●
SAP_BPM_SuperDisplay
●
●
SAP_BPM_Navigation
●
●
SAP_BPM_SuperAdmin
●
●
●
View the number of process and task instances in different statuses. View the status of the BPM subsystems, adapters, and so on. Navigate to the process troubleshooting screen and start the BPM applications when something fails. View the process instance memory threshold. View the number of process and task instances in different statuses. View the status of the BPM subsystems, adapters, and so on. View the number of process and task instances (for which you are the administrator) in different statuses. View the status of the BPM subsystems, adapters, and so on. View the number of process and task instances in different statuses. View the status of the BPM subsystems, adapters, and so on. Test the basic BPM functionalities.
The 2 applications are used to perform the following: ●
Monitor the availability of the BPM subsystems, adapters, and so on.
●
Start a BPM application as part of the troubleshooting action when something fails.
●
Configure the process engine.
●
Check if the basic BPM functionalities work properly.
●
View the number of process and task instances in different statuses.
LESSON SUMMARY You should now be able to: ●
Monitor the health state of the application
Prohibida su reproducción 634
© Copyright. All rights reserved.
Unit 11 Lesson 3 629
Explaining SAP Operational Process Intelligence
LESSON OVERVIEW This lesson explains SAP Operational Process Intelligence. LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain SAP operational process intelligence
SAP Operational Process Intelligence SAP Operational Process Intelligence powered by SAP HANA enables line-of-business users to gain process visibility across their end-to-end business processes. It provides a clear focus, improving the operational decision making to achieve better business outcomes. End-to-end business processes can span multiple systems (SAP and non-SAP), be either modeled (as in SAP Business Workflow and SAP BPM) or built-in (as transaction or programmed in SAP Business Suite). In addition, end-to-end processes can span between on-premise and on-demand systems. At the same time, they can deal with structured data as well as streaming data from social media feeds, internet of things (RFIDs, sensors, and so on) and clickstreams. Users have a variety of high volume and high velocity data from many sources. The question is how to make sense of all of the input in a focused and tailored way; how to provide business relevant information on performance, KPIs, or trends, and how to ensure the processes stay on track. SAP Operational Process Intelligence powered by SAP HANA brings the answer. Using the SAP HANA platform to correlate and contextualize operational data, that is the data from implemented end-to-end processes (process logs, transaction logs, business object data, and so on), into a business scenario that the business users will be able to get the right information on their processes in real-time. You can acquire visibility on orchestrated business processes from various SAP back-end systems as follows: ●
Process Observer on SAP Business Suite
●
Business Workflow on SAP Business Suite
●
SAP Business Process Management
●
SAP Process Integration
Prohibida su reproducción © Copyright. All rights reserved.
635
Unit 11: Configuration Tasks and Extensions
SAP Operational Process Intelligence Use Cases SAPOPInt SAPOPInt was designed to be the business navigation system (GPS) for line-of-business users. Like a typical GPS navigator in your car, SAPOPInt allows business users to navigate through their daily business operations, avoiding bottlenecks and reaching successful business outcomes. It is possible to test the product here: http://hanademo.testdrivesap.com/sapopint/ BIG Processes and SAPOPint Technically, BIG processes span multiple technical systems, packaged applications (such as SAP ERP, CRM, and so on), BPM platforms (such as NetWeaver BPM), ESBs (enterprise service bus such as NetWeaver PI), operational systems (such as Web servers, manufacturing systems, telecom provisioning systems, and so on). BIG processes generate high volumes of structured, unstructured process data as well as machine data. What are the typical challenges that BIG processes pose to companies? ● Lack of Visibility ●
Lack of Context
●
Latency
BIG processes borrow the 5 Vs of Big Data, characteristics as follows: ●
Volume Large volumes of data (for example, replenishment requests in a retail chain from all the retail outlets, parcel tracking in a logistics company)
●
Velocity Streaming data coming in at high velocity (for example, clickstream data for real-time offer management, machine data from shop floor sensors)
●
Variety Structured, semi-structured and unstructured data
●
Veracity Accurate process data that business users can trust and act upon (no false positives or false negatives)
●
Visibility End-to-end process visibility is a challenge that BIG processes pose due to heterogeneous IT systems and several process participants. Some of the questions for end-users are: Where do I stand in the process, where do I go next, what are my next best actions?
SAP’s Operational Process Intelligencies helps line-of-business users to gain process visibility across their end-to-end business processes, without forcing IT to rip and replace existing systems. By acting as a business navigation system, SAPOPInt helps business users to achieve business outcomes. Improved process visibility immediately results in superior operational responsiveness and better tactical decisions in day-to-day business operations. Strong execution
Prohibida su reproducción 636
© Copyright. All rights reserved.
Lesson: Explaining SAP Operational Process Intelligence
on day-to-day tactical objectives improves customer satisfaction and leads to long-term stability and success of any organization. LESSON SUMMARY You should now be able to: ●
Explain SAP operational process intelligence
Prohibida su reproducción © Copyright. All rights reserved.
637