A Step By Step Guide Creating A Bpm Scenario In Sap Exchange Infrastructure 3.0

12,325 views

Published on

This book runs through a step by step detailed procedure on how to create an end-to-end BPM process in XI 3.0. Although this version is 5+ years old the concepts are the same although the screens have changed. Many folks have found it useful so we thought we\'d open it up to the public....

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
12,325
On SlideShare
0
From Embeds
0
Number of Embeds
63
Actions
Shares
0
Downloads
695
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

A Step By Step Guide Creating A Bpm Scenario In Sap Exchange Infrastructure 3.0

  1. 1. A Step by Step Guide Creating a BPM Scenario in SAP Exchange Infrastructure 3.0Email Client XI BPM Integration Process M Order Response A MI_BPM_TRIGGER_MATCH I 4c) XI_MAIL Failure MT_BPM_TRIGGER L (DT_BPM_TRIGGER) DocNum MI_BPM_TRIGGER MT_BPM_TRIGGER (DT_BPM_TRIGGER) 2b) MI_BPM_TRIGGER 4b) MI_BPM_TRIGGER_MATCHDEMO XI IS CRM S I O 1) MT_ORDER 2a) ORDERS D Order A Receiver Determination O Sales Order (DT_ORDER) (ORDERS05) P C MiddlewareXI IS ECC I F 4a) MT_ORDERRESPONSE Sales Order 3) ORDRSP D Order Response T Receiver Determination O P (DT_ORDERRESPONSE) (ORDERS05) Response C Authored by Kevin Wilson With contributions by Alistair Rooney and David Propst http://www.geniepress.com © Genie Press 2007
  2. 2. Copyright @ 2012 by Genieholdings.com, Inc.Published 2007 and re-released in 2012 by Genie Press, a division of Genieholdings.com, Inc.All rights reserved. No part of this publication may be used or reproduced in any manner whatsoeverwithout either the prior written permission of the publisher or a license permitting restricted copying in theUnited States or abroad.Trademarks:Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence ofa trademarked name, we use the names only in an editorial fashion and to the benefit of the trademarkowner, with no intention of trademark infringement.SAP, SAP Logo, R/3, mySAP, mySAP.com and other SAP products and services mentioned herein aretrademarks or registered trademarks of SAP AG.All product names are trademarks of their respective companies.Disclaimer:This is not a product of SAP AG nor are they the publisher of this book and as such are not responsible for itunder any aspect of the law. This publication is an independent view and is for instructional purposes only.The publisher does not offer any warranties or representations nor does it accept any liabilities with respectto the content of this publication. The information in this book is distributed on an “as is” basis, withoutwarranty. Although every precaution has been taken in the preparation of this work, neither the author(s),nor Genie Press of Genieholdings.com Inc. shall have any liability to any person or entity with respect to anyloss or damage caused or alleged to be caused directly or indirectly by the information contained in thiswork. http://www.geniepress.com © Genie Press 2007
  3. 3. “A big shout out to my fellow road warriors Dave Propst and Alistair Rooney for their valuable contributions, not only to this quick guide book, but to the SAP integration community as a whole. Dave and I have worked several projects together and he’s my number 1 go to guy for Integration Architecture stuff….Whereas Alistair literally wrote the book on ABAP and Java! Who knows it better than him? I challenge you to find someone….Although this book runs the older release of XI, I still have folks finding it useful inpulling it together for the new versions of PI. The screens may have changed but the concept and objects haven’t changed too much. This book helped several folks find their legs in XI to such an extent that they became XI and now PI consultants and make a decent living out of it. If this is too old for you then don’t print it and carry on with life, but if it is then know that I am pleased that it hashelped out a little. Please don’t ask me to update it to the latest version, as I have moved on to more fun topics like SAP Event Management and Sybase ESP ;)” Kevin Wilson In association with http://www.erpgenie.com © Genie Press 2007
  4. 4. Table of ContentsINTRODUCTION 8 Background ............................................................................................................................... 8 About the Author ....................................................................................................................... 9 How to use this book ................................................................................................................ 9 The Scenario ............................................................................................................................ 10PHASE 1 : SYSTEM CONFIGURATION 12 1.1. Software Component ................................................................................................. 12 1.2. Clear SLD Cache .............................................................................................................. 13 1.3. Import Software Component ........................................................................................... 14PHASE 2 : INTEGRATION BUILDER DESIGN 15 2.1. External Definitions ......................................................................................................... 15 2.1.1. XI_MAIL .................................................................................................................. 16 2.2. Data Types ........................................................................................................................ 17 2.2.1. DT_ORDERS ......................................................................................................... 18 2.2.2. DT_ORDERRESPONSE ........................................................................................ 18 2.2.3. DT_BPM_TRIGGER ............................................................................................... 19 2.3. Message Types ................................................................................................................. 20 2.3.1. MT_ORDER ........................................................................................................... 20 2.3.2. MT_ORDERRESPONSE ....................................................................................... 21 2.3.3. MT_BPM_TRIGGER .............................................................................................. 21 2.4. Message Interfaces .......................................................................................................... 22 2.4.1. MI_ORDER ............................................................................................................. 23 2.4.2. MI_ORDERRESPONSE......................................................................................... 23 2.4.3. MI_BPM_TRIGGER ............................................................................................... 24 2.4.4. MI_BPM_TRIGGER_MATCH ................................................................................ 24 2.4.5. MI_EMAIL ............................................................................................................... 25 2.5. Import IDoc Type .............................................................................................................. 26 2.5.1. ORDERS.ORDERS05 and ORDRSP.ORDERS05 ................................................ 26 2.6. Message Mapping ............................................................................................................ 27 2.6.1. MM_Order_to_ORDERS05 .................................................................................... 27 2.6.2. MM_Order_to_BPM_TRIGGER ............................................................................. 28Table of Contents © Genie Press 2007 Page 4 of 159
  5. 5. 2.6.3. MM_ORDERS05_to_OrderResponse .................................................................... 29 2.6.4. MM_ORDRSP_to_BPM_TRIGGER ....................................................................... 30 2.6.5. MM_BPM_to_EMAIL .............................................................................................. 31 2.7. Interface Mapping ............................................................................................................ 32 2.7.1. IM_Order_to_ORDERS05 ...................................................................................... 33 2.7.2. IM_Order_to_BPM_TRIGGER ............................................................................... 33 2.7.3. IM_ORDRSP_to_OrderResponse .......................................................................... 34 2.7.4. IM_ORDRSP_to_BPM_TRIGGER_CATCH .......................................................... 35 2.7.5. IM_BPM_to_EMAIL ................................................................................................ 36 2.8. Integration Scenario ........................................................................................................ 37 2.8.1. Actions .................................................................................................................... 37 2.8.2. Integration Scenario ............................................................................................... 43 2.9. Integration Process .......................................................................................................... 51 2.9.1. IP_Orders ............................................................................................................... 52 2.10. Create Alert Category .................................................................................................... 66 2.10.1. TESTALERT ......................................................................................................... 67 2.10.2. TESTALERT1 ....................................................................................................... 68 2.10.3. Assign Users / Roles to Alert Categories ............................................................. 69 2.10.4. Update Alert Categories ....................................................................................... 70PHASE 3 : INTEGRATION BUILDER CONFIGURATION 71 3.1. Create Configuration Scenario ....................................................................................... 71 3.1.1. Order_OrderResponse_Demo ............................................................................... 71 3.2. Create Integration Process Service ............................................................................... 72 3.2.1. IP_ORDERS ........................................................................................................... 72 3.3. Create Services without Party ........................................................................................ 74 3.3.1. Business Service: DEMO ....................................................................................... 74 3.3.2. Business Service: MAIL_SERVICE ........................................................................ 75 3.3.3. Business System: SAPCRM .................................................................................. 76 3.3.4. Business System: SAPECC ................................................................................... 76 3.4. Create Communication Channels .................................................................................. 76 3.4.1. CC_DEMO_SOAP_SENDER ................................................................................ 76 3.4.2. CC_DEMO_FILE_RECEIVER ............................................................................... 77 3.4.3. CC_EMAIL .............................................................................................................. 78 3.4.4. GeneratedReceiverChannel_IDoc ......................................................................... 80 3.5. Use Wizard to set up Determination and Agreements ................................................. 80 3.5.1. Orders interface between DEMO and CRM ........................................................... 80 3.5.2. Orders interface between DEMO and BPE ............................................................ 86 3.5.3. Order Response interface between ECC and DEMO ............................................ 92 3.5.4. Order Response interface between ECC and BPE ................................................ 98Table of Contents © Genie Press 2007 Page 5 of 159
  6. 6. 3.5.5. Email interface between BPE and Email Service ................................................. 104 3.6. Receiver Determination ................................................................................................. 111 3.6.1. DEMO : MI_ORDER ............................................................................................. 111 3.6.2. IP_ORDERS : MI_EMAIL ..................................................................................... 111 3.6.3. SAPECC : ORDRSP.ORDERS05 ........................................................................ 112 3.7. Interface Determination ................................................................................................. 112 3.7.1. DEMO : MI_ORDER : SAPCRM .......................................................................... 112 3.7.2. DEMO : MI_ORDER : IP_ORDERS ..................................................................... 113 3.7.3. SAPECC : ORDRSP.ORDERS05 : DEMO .......................................................... 113 3.7.4. SAPECC : ORDRSP.ORDERS05 : IP_ORDERS ................................................ 114 3.7.5. IP_ORDERS : MI_EMAIL : MAIL_SERVICE........................................................ 114 3.8. Sender Agreements ....................................................................................................... 115 3.8.1. DEMO:MI_ORDER ............................................................................................... 115 3.9. Receiver Agreements .................................................................................................... 115 3.9.1. DEMO : SAPCRM : ORDERS.ORDERS05 ......................................................... 115 3.9.2. SAPECC : DEMO : ORDERRESPONSE ............................................................. 116 3.9.3. IP_ORDERS : MAIL_SERVICE : MI_EMAIL........................................................ 116 3.10. Create and Publish Web Service ................................................................................ 116PHASE 4 : SAP CONFIGURATION 120 4.1. Maintain Port in IDoc adapter ....................................................................................... 120 4.1.1. SAPCRM .............................................................................................................. 120 4.2. Maintain Metadata Overview for IDoc adapter ............................................................ 121 4.2.1. ORDERS05 .......................................................................................................... 121PHASE 5 : TESTING 122 5.1. Testing the interface in XI ............................................................................................. 122 5.1.1. Create a sample XML payload ............................................................................. 122 5.1.2. Launch the test tool .............................................................................................. 123 5.2 Testing the web service using XML SPY ...................................................................... 124 5.3. Runtime workbench ....................................................................................................... 126 5.3.1. View Integration Server ........................................................................................ 127 5.3.2. View Integration Engine........................................................................................ 127 5.3.3. View Adapter Engine ............................................................................................ 128 5.3.4. View alert inbox .................................................................................................... 129 5.3.5. Workflow Log ........................................................................................................ 129 5.3.6. Verify email ........................................................................................................... 130Table of Contents © Genie Press 2007 Page 6 of 159
  7. 7. GLOSSARY 131APPENDIX A. ABBREVIATIONS USED 137APPENDIX B. DATA TYPES 138 XSD – DT_ORDERS ............................................................................................................... 138 XSD – DT_ORDERRESPONSE ............................................................................................. 139 XSD – DT_BPM_TRIGGER .................................................................................................... 141APPENDIX C. WSDL FILES 144 MI_ORDER.WSDL .................................................................................................................. 144APPENDIX D. EXTERNAL FILES 147 XIMAIL30.XSD File for Mail adapter .................................................................................... 147APPENDIX E. MESSAGE MAPPINGS 151 MM_Order_to_ORDERS05 .................................................................................................... 151 MM_Order_to_BPM_TRIGGER............................................................................................. 152 MM_ORDERS05_to_OrderResponse .................................................................................. 153 MM_ORDRSP_to_BPM_TRIGGER ....................................................................................... 154 MM_ BPM_to_EMAIL ............................................................................................................. 155INDEX TABLE 156Table of Contents © Genie Press 2007 Page 7 of 159
  8. 8. Creating a BPM Scenario in XIIntroductionBackgroundExchange Infrastructure has grown out of the enormously disparate world of –and I use this in its most general sense – Electronic Data Interchange. ExchangeInfrastructure 3.0 brings together a lot of technologies. Some of thesetechnologies are open standards that have been embraced over the years andhave become the de facto standard. These are XML and its cousins SOAP,WSDL, XPATH, XSLT and so on. Other technologies are proprietary to SAP AG,like IDOCS, ALE, ABAP Objects and even certain class libraries used by Java.One of the most interesting developments in recent years has been theemergence of graphical mapping to chart out an organization’s businessprocesses. One of the leaders in this has been the ARIS product. SAP and IDSScheer1 have teamed up to bring us Business Process Management or BPM. XIplays an important role in this by “linking” the business processes together.This book describes the process to map a BPM scenario in XI. It covers the 5phases required:  System configuration  Integration Builder Design  Integration Builder Configuration  SAP Configuration  TestingIt does not try to describe all the functionality that you will encounter in XI and theBPM module. After all BPM is larger than just XI and conversely XI is more thanjust BPM! It does not attempt to provide you with a production solution for thescenario provided. The scenario is made up to incorporate as many aspects of XImessaging and BPM as is feasible.A note about authorization: The tasks in the system configuration phase will takea higher level of authorization then the remaining 4 phases. The tasks in the firstphase will require the role of SAP_XI_ADMINISTRATOR. The remaining forphases can be performed by a user with the role of SAP_XI_DEVELOPER.1 IDS Scheer are the developers of the ARIS productIntroduction © Genie Press 2007 Page 8 of 159
  9. 9. Creating a BPM Scenario in XIAbout the AuthorAlistair Rooney is a Principal NetWeaver Consultant with SAP. Alistair has beeninvolved in 11+ SAP projects and has been Development Lead or TechnicalArchitect on all but two of these. Alistair has a wide range of skills as a result ofhis 25+ years in the industry. Alistair started as a junior programmer in the early‘80’s and progressed to an IT Manager position in London, UK before enteringconsulting. Alistair is an accredited member of the Institute of IT Management,holds a number of Technical Certifications and is an accredited TOGAFArchitect. Alistair is the author of “Foundations of Java for ABAP Programmers”.David W Propst was the SAP NetWeaver XI lead for Insight Inc., SAPNetWeaver PI / Integration architect at Monsanto and now holds a similarposition at HD Supply. He has over 18 years of experience creating innovativesystem integration solutions, the past nine years of which have been integratingSAP systems. David has designed, implemented, and managed large scale B2B,EDI, and EAI solutions in the transportation, distribution, and retail industries.David has proven his ability to utilize his vast technical and business knowledgeto produce highly available, scalable, maintainable, and above all profitable -solutions.Kevin Wilson, associate partner at Q Data USA Inc. and founder ofERPGenie.COM, has over 20 years of large scale integrated information systemsimplementation experience, the last 16 of which were dedicated to SAPimplementations. Kevin has designed, configured, developed and implementedsolutions for over 29 projects worldwide. Interfacing technologies such as EDI,ALE, ITS, XI / PI, SAP Event Management, Workflow and ABAP are skills that hehas expertise in. Kevin typically fulfills the role of team or project lead and oftenoffers training on these technologies to clients seeking to acquire these rareskills. Kevin holds a Bachelor’s Degree in Science majoring in Mathematics andComputer Science and also holds a diploma in Project Management. He alsoregularly talks at conferences around the world on his topics of interest.How to use this bookThe book is written in such a way as to be a step by step quick guide toimplementing the given scenario. It details, as far as possible, every step that isrequired in order to deliver the documented scenario. It also assumes, althoughyou may be able to muddle through, that you have a basic knowledge of XI 3.0and some XML fundamentals.Author: Kevin Wilson © Genie Press 2007 Page 9 of 159
  10. 10. Creating a BPM Scenario in XIKey: Italic words Transactions Italic words -> Italic wordsMenu path to follow Underlined Indicates a Tab on a screenAll figures are labeled with a number. If that figure is referenced in the text then itis reference with this number. For your convenience a table of figures is listedafter the table of contents.The ScenarioAn external system (DEMO) sends an XML representation of an order through toXI. We want to transform this order in to a small BPM message destined for theBPM engine and also transform it in to an ORDERS05 IDoc destined for theCRM system.This ORDERS05 IDoc creates a sales order in CRM which is then replicated tothe ECC system, via middleware. The sales order in ECC then generates anORDRSP IDoc which is then sent to XI. This ORDRSP IDoc is then transformedin to a small BPM message that is correlated with the ORDERS BPM messagesent earlier. It is also transformed in to an order response XML message which issent through the FTP Adapter to a specific file on the Integration server. TheBPM also has timeout and exception handling capabilities using the alertframework as well as the email adapter.Don’t Panic – this all seems rather daunting at this point but the diagram inFigure 1 will simplify our task considerably!Author: Kevin Wilson © Genie Press 2007 Page 10 of 159
  11. 11. Creating a BPM Scenario in XIEmail Client XI BPM Integration Process M Order Response A MI_BPM_TRIGGER_MATCH I 4c) XI_MAIL Faliure MT_BPM_TRIGGER L (DT_BPM_TRIGGER) DocNum MI_BPM_TRIGGER MT_BPM_TRIGGER (DT_BPM_TRIGGER) 2b) MI_BPM_TRIGGER 4b) MI_BPM_TRIGGER_MATCHDEMO XI IS CRM S I O 1) MT_ORDER 2a) ORDERS D Order A Receiver Determination O Sales Order (DT_ORDER) (ORDERS05) P C MiddlewareXI IS ECC I F 4a) MT_ORDERRESPONSE Sales Order 3) ORDRSP D Order Response T Receiver Determination O P (DT_ORDERRESPONSE) (ORDERS05) Response CFigure 1: BPM ScenarioAuthor: Kevin Wilson © Genie Press 2007 Page 11 of 159
  12. 12. Creating a BPM Scenario in XIPHASE 1 : SYSTEM CONFIGURATIONWe have 4 “systems” in our scenario:  The Demo system sending the order in XML format  The CRM system that receives the ORDERS IDoc in order to create a sales order  The ECC system that sends the ORDRSP IDoc to XI and ultimately to an email address  The XI system housing the interfaces, the BPM scenario and the adapter frameworkWe’ll go through configuring the Demo system as a Software Component.Furthermore we will assume that the CRM and ECC business systems havebeen set up and imported in to the Integration Directory. We’ll be covering theadding of the communication channels (We will use the IDoc adapter) to thesebusiness services.All our design work will be done under the DEMOCOMPONENT SoftwareComponent.1.1. Software ComponentSo, let’s get going with our first task. We need to configure the DEMO system if it’snot a part of the business landscape. In our case we need to createDEMOCOMPONENT as a Software Component in the SLD. Most SAP shops do notallow just anyone into the SLD. This task is usually performed by a developmentlead or basis. You will need the SAP_XI_ADMINISTRATOR orSAP_XI_CONTENT ORGANIZER role to perform the SLD tasks. You may needto have basis set this up for you. 1. Log in to the XI server 2. Run transaction SXMB_IFR to start the Integration BuilderPhase 2 – Integration Builder Design © Genie Press 2007 Page 12 of 159
  13. 13. Creating a BPM Scenario in XI Figure 2: Integration Builder 3. Start System Landscape Directory 4. Click on Software Catalog 5. Click on New Product 6. Enter a vendor, name and version and Create 7. Now you need to add a Software Component. Enter Vendor, name (Software Component name), version and Create 8. Your Software Component should look like that shown in Figure 3 Figure 3: Software Component Version1.2. Clear SLD Cache 1. Fire up the Integration Directory (CONFIGURATION) 2. Clear the cache using the menu option as shown in Figure 4: Environment -> Clear SLD Data Cache2. Figure 4: Clear SLD Cache Data2 The Systems Landscape Directory can be viewed as a separate entity to the Integration Builder.So, if we had to access the SLD from the Integration Builder every time we made a change, itwould slow the whole process down considerably. The obvious solution was to provide a cachethat holds the SLD information within the Integration Builder. Unfortunately this means that whenwe make a change to the SLD – our changes will not be picked up by the Integration Builder. Forthis reason we always clear the SLD cache and reload the SLD Software Components.Phase 2 – Integration Builder Design © Genie Press 2007 Page 13 of 159
  14. 14. Creating a BPM Scenario in XI1.3. Import Software Component 1. Start the Integration Repository 2. Import your Software Component. From the menu choose Tools -> Transfer from System Landscape Directory -> Import Software Component Versions Figure 5: Import Software Component Version 3. Select Demo component and click Import 4. Once it’s been successfully imported click exit 5. Double click your Software Component version DEMOCOMPONENT 6. Create a namespace (http://www.demo.com/xi) and Save Figure 6: Create NamespacePhase 2 – Integration Builder Design © Genie Press 2007 Page 14 of 159
  15. 15. Creating a BPM Scenario in XIPHASE 2 : INTEGRATION BUILDER DESIGNIn order to map an interface we need certain elements to be defined. We definethese elements in the integration repository. These elements include:  Data Type  Message Type  Message interface  Message Mapping  Mapping Interface Interface Mapping Interface Mapping Message Interface (Receiver Determination, Interface Determination, (WSDL) Sender agreement, Receiver agreement) Message Type Message Mapping (XSD) Data Type (XSD)Figure 7: XI Interface ProcessThese elements will then be used in the XI configuration phase to assemble therequired interface.2.1. External DefinitionsThe email XSD provided by SAP needs to be uploaded as an external definition.This will save us a huge amount of work since we now have a preformattedstructure to use in our interface. This is just one of the cool new features with XI3.0!Phase 2 – Integration Builder Design © Genie Press 2007 Page 15 of 159
  16. 16. Creating a BPM Scenario in XI2.1.1. XI_MAIL 1. Open up your applicable namespace under the DEMCOMPONENT software component 2. Open Interface Objects 3. Right click External Definitions -> New 4. Enter Name (XI_MAIL) and Description -> Create 5. Change category to XSD Figure 8: External Definition Category 6. Click to “Import External Definitions” 7. Browse to the XIMAIL30.XSD file -> Open (See definition at APPENDIX C) 8. Your External definition should look like that shown in Figure 9 Figure 9: External Definition - Mail Message Definition 9. Check that your External Definition has 3 messages associated with it as shown in Figure 10. We do this by clicking on the Messages tab. This isPhase 2 – Integration Builder Design © Genie Press 2007 Page 16 of 159
  17. 17. Creating a BPM Scenario in XI an important step, if you do not see the messages defined here; there was a problem with the import. Figure 10: External Definition - Mail Messages Naming ConventionsAt this point I’d like a quick word, if you don’t mind. It’s important that we emphasize theimportance of Naming Conventions here. As you have probably noticed, Data Types have aprefix of DT, Message Types have a prefix of MT and Message Interfaces have MI and so on.This is not the whole picture, however. You may want to qualify the interfaces further by using asuffix of OUT for outbound (Remember this is outbound from the server – never from XI) and INfor inbound. Trust us, (We’re professionals), defining your standards up front will take away hoursof frustration later.2.2. Data TypesNow that we have our mail structure, we need to create 3 new data types (It maybe a good idea to read the sidebar on “Naming Conventions” first):  DT_ORDER: The XML definition of the order message being sent in from the demo vendor using the SOAP protocol  DT_ORDERRESPONSE: The XML definition of the order response message being save to an FTP drive  DT_BPM_TRIGGER: A small XML message that we will use to send through the BPM process. Whenever possible, it’s best not to send large files through the BPM process. Both the ORDERS and ORDERRESPONSE messages will create a message of this type which will be correlated with each other Let’s have a look at each of these Data Types in more detail:Phase 2 – Integration Builder Design © Genie Press 2007 Page 17 of 159
  18. 18. Creating a BPM Scenario in XI2.2.1. DT_ORDERS 1. Right click data types -> New 2. Enter Name and Description -> Create 3. Complete the definition as shown in Figure 11 (See the XSD definition in APPENDIX A on page 137) and yes, if you’re feeling lazy, you could just import this – but keying it in will give you a better understanding of the whole process! Figure 11: Data Type - DT_ORDERS 4. Save2.2.2. DT_ORDERRESPONSE 1. Right click data types -> New 2. Enter Name and Description -> Create 3. Complete the definition as shown in Figure 12 (See the XSD definition in APPENDIX A on page 139)Phase 2 – Integration Builder Design © Genie Press 2007 Page 18 of 159
  19. 19. Creating a BPM Scenario in XI Figure 12: Data Type - DT_ORDERRESPONSE 4. Save2.2.3. DT_BPM_TRIGGER 1. Right click data types -> New 2. Enter Name and Description -> Create 3. Complete the definition as shown in Figure 13 (See the XSD definition in APPENDIX A on page 141) Figure 13: Data Type - DT_BPM_TRIGGER 4. SavePhase 2 – Integration Builder Design © Genie Press 2007 Page 19 of 159
  20. 20. Creating a BPM Scenario in XI2.3. Message TypesNow that we have the data types we need to build the next “layer” up by creating3 message types:  MT_ORDER: Linked to Data type DT_ORDER and used in Message Interface MI_ORDER  MT_ORDERRESPONSE: Linked to Data type DT_ORDERRESPONSE and used in Message Interface MI_ORDERRESPONSE  MT_BPM_TRIGGER: Linked to Data type DT_BPM_TRIGGER and used in Message Interfaces MI_BPM_TRIGGER (Orders) and MI_BPM_TRIGGER_MATCH (Order Response)Let’s have a look at each of these in more detail:2.3.1. MT_ORDER 1. Right mouse click Message Types -> New 2. Enter Name and Description -> Create 3. Select the data type DT_ORDER by clicking Figure 14: Message Type - MT_ORDER 4. SavePhase 2 – Integration Builder Design © Genie Press 2007 Page 20 of 159
  21. 21. Creating a BPM Scenario in XI2.3.2. MT_ORDERRESPONSE 1. Right mouse click Message Types -> New 2. Enter Name and Description -> Create 3. Select the data type DT_ORDERRESPONSE by clicking Figure 15: Message Type - MT_ORDERRESPONSE 4. Save2.3.3. MT_BPM_TRIGGER 1. Right mouse click Message Types -> New 2. Enter Name and Description -> Create 3. Select the data type DT_BPM_TRIGGER by clickingPhase 2 – Integration Builder Design © Genie Press 2007 Page 21 of 159
  22. 22. Creating a BPM Scenario in XI Figure 16: Message Type - MT_BPM_TRIGGER 4. Save2.4. Message InterfacesRight! Take a coffee break here if you need one. The next “layer” is the MessageInterface layer. We need to create 5 Message Interfaces. Go back to thediagram in Figure 1 on page 11 to refresh your memory:  MI_ORDER: Outbound asynchronous interface of type MT_ORDER. This interface will be configured with 2 receivers. 1 being the CRM system receiving the ORDERS IDoc using the IDoc adapter and the second being the Integration process for the message interface MI_BPM_TRIGGER. We’ll also configure a Sender Agreement for this message interface for the SOAP call using the SOAP adapter  MI_ORDERRESPONSE: Inbound asynchronous interface of type MT_ORDERRESPONSE. This will be configured between the ECC and DEMO system. The DEMO system will receive the Order Response via the FILE adapter  MI_EMAIL: Abstract asynchronous interface of External Definition type XI_MAIL (Configured in 2.1.1. XI_MAIL)  MI_BPM_TRIGGER: Abstract asynchronous interface of type MT_BPM_TRIGGER. This will serve as the interface for the ORDER message getting to the BPM engine. It will be correlated with the MI_BPM_TRIGGER_MATCH using the DocNum field  MI_BPM_TRIGGER_MATCH: Abstract asynchronous interface of type MT_BPM_TRIGGER. This will serve as the interface for thePhase 2 – Integration Builder Design © Genie Press 2007 Page 22 of 159
  23. 23. Creating a BPM Scenario in XI ORDERRESPONSE message getting to the BPM engine. It will be correlated with the MI_BPM_TRIGGER using the DocNum field. This is the terminating portion of the BPM process2.4.1. MI_ORDER 1. Right mouse click Message Interfaces -> New 2. Enter Name and Description -> Create 3. Select Outbound and Asynchronous 4. Select the Message type MT_ORDER by clicking 5. Your Message Interface should look like that shown in Figure 17 Figure 17: Message Interface - MI_ORDER 6. Save2.4.2. MI_ORDERRESPONSE 1. Right mouse click Message Interfaces -> New 2. Enter Name and Description -> Create 3. Select Inbound and Asynchronous 4. Select the Message type MT_ORDERRESPONSE by clicking 5. Your Message Interface should look like that shown in Figure 18Phase 2 – Integration Builder Design © Genie Press 2007 Page 23 of 159
  24. 24. Creating a BPM Scenario in XI Figure 18: Message Interface - MI_ORDERRESPONSE 6. Save2.4.3. MI_BPM_TRIGGER 1. Right mouse click Message Interfaces -> New 2. Enter Name and Description -> Create 3. Select Abstract and Asynchronous 4. Select the Message type MT_BPM_TRIGGER by clicking 5. Your Message Interface should look like that shown in Figure 19 Figure 19: Message Interface - MI_BPM_TRIGGER 6. Save2.4.4. MI_BPM_TRIGGER_MATCH 1. Right mouse click Message Interfaces -> New 2. Enter Name and Description -> CreatePhase 2 – Integration Builder Design © Genie Press 2007 Page 24 of 159
  25. 25. Creating a BPM Scenario in XI 3. Select Abstract and Asynchronous 4. Select the Message type MT_BPM_TRIGGER by clicking 5. Your Message Interface should look like that shown in Figure 20 Figure 20: Message Interface - MI_BPM_TRIGGER_MATCH 6. Save2.4.5. MI_EMAIL 1. Right mouse click Message Interfaces -> New 2. Enter Name and Description -> Create 3. Select Abstract and Asynchronous 4. Select the External Definition XI_MAIL - Mail by clicking 5. Expand External Definitions -> XI_MAIL 6. Select Mail as shown in Figure 21 Figure 21: Message Interface - Select Mail Message 7. Your Message Interface should look like that shown in Figure 22Phase 2 – Integration Builder Design © Genie Press 2007 Page 25 of 159
  26. 26. Creating a BPM Scenario in XI Figure 22: Message Interface - MI_EMAIL 8. Save2.5. Import IDoc TypeOnly perform this step if you do not already have access to the applicable IDocmessage type in one of the Software Components. You should see it there if youdo! We will import the IDoc types to the DEMO component. (Have a look atFigure 23).2.5.1. ORDERS.ORDERS05 and ORDRSP.ORDERS05 1. Under the DEMO component - right mouse click on imported objects -> New 2. Enter system and login details -> Continue 3. When the results come back expand the IDoc tree 4. Select the applicable IDocs (ORDERS.ORDERS05 and ORDRSP.ORDERS05) -> Finish Figure 23: Importing IDoc TypesPhase 2 – Integration Builder Design © Genie Press 2007 Page 26 of 159
  27. 27. Creating a BPM Scenario in XI2.6. Message MappingOK now we need to bring these all together with Message Mappings! We willneed to create the 5 Message Mappings that we need as follows:  MM_Order_to_ORDERS05: The MT_ORDER Message Type will be mapped to the ORDERS (ORDERS05) IDoc  MM_Order_to_BPM_TRIGGER: The MT_ORDER Message Type will also be mapped to the small MT_BPM_TRIGGER message type which will be used to kick off the BPM scenario  MM_ORDERS05_to_OrderResponse: The ORDRSP (ORDERS05) IDoc will be sent from the ECC system and mapped to the MT_ORDERRESPONSE XML Message Type  MM_ORDRSP_to_BPM_TRIGGER: The ORDRSP (ORDERS05) IDoc will also be mapped to our MT_BPM_TRIGGER message type which will correlate to the ORDERS BPM message and effectively end the BPM process  MM_BPM_to_EMAIL: This is a mapping between the message type MT_BPM_TRIGGER and the XI_MAIL -> Mail External Definition Type which will form an email message. This will be used in the BPM process to send out an email message when the Order Response message is not received in a specified period of time2.6.1. MM_Order_to_ORDERS05 1. Open Mapping Objects 2. Right mouse click Message Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source message and enter MT_ORDER message type 5. Click the button to choose a target message and enter ORDERS.ORDERS05 message type 6. Perform the mappings. See APPENDIX E on page 151 for the detailed mapping 7. Your mapping should look as follows:Phase 2 – Integration Builder Design © Genie Press 2007 Page 27 of 159
  28. 28. Creating a BPM Scenario in XI Figure 24: Message Mapping - MM_Order_to_ORDERS05 8. Save2.6.2. MM_Order_to_BPM_TRIGGER 1. Open Mapping Objects 2. Right mouse click Message Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source message and enter MT_ORDER message type 5. Click the button to choose a target message and enter MT_BPM_TRIGGER message type 6. Perform the mappings. See APPENDIX E on page 152 for the detailed mapping 7. Your mapping should look as follows:Phase 2 – Integration Builder Design © Genie Press 2007 Page 28 of 159
  29. 29. Creating a BPM Scenario in XI Figure 25: Message Mapping - MM_Order_to_BPM_TRIGGER 8. Save2.6.3. MM_ORDERS05_to_OrderResponse 1. Open Mapping Objects 2. Right mouse click Message Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source message and enter ORDRSP.ORDERS05 message type 5. Click the button to choose a target message and enter MT_ORDERRESPONSE message type 6. Perform the mappings. See APPENDIX E on page 153 for the detailed mapping 7. Your mapping should look as follows:Phase 2 – Integration Builder Design © Genie Press 2007 Page 29 of 159
  30. 30. Creating a BPM Scenario in XI Figure 26: Message Mapping - MM_ORDERS05_to_OrderResponse 8. Save2.6.4. MM_ORDRSP_to_BPM_TRIGGER 1. Open Mapping Objects 2. Right mouse click Message Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source message and enter ORDRSP.ORDERS05 message type 5. Click the button to choose a target message and enter MT_BPM_TRIGGER message type 6. Perform the mappings. See APPENDIX E on page 154 for the detailed mapping 7. Your mapping should look as follows:Phase 2 – Integration Builder Design © Genie Press 2007 Page 30 of 159
  31. 31. Creating a BPM Scenario in XI Figure 27: Message Mapping - MM_ORDRSP_to_BPM_TRIGGER 8. Save2.6.5. MM_BPM_to_EMAIL 1. Open Mapping Objects 2. Right mouse click Message Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source message and enter MT_BPM_TRIGGER message type 5. Click the button to choose a target message and enter XI_MAIL->Mail message type 6. Perform the mappings. See APPENDIX E on page 155 for the detailed mapping 7. Your mapping should look as follows:Phase 2 – Integration Builder Design © Genie Press 2007 Page 31 of 159
  32. 32. Creating a BPM Scenario in XI Figure 28: Message Mapping - MM_BPM_to_EMAIL 8. Save2.7. Interface MappingThis is a good point to review what we’ve done so far. We’ve created thenecessary data types, XSD imports, message types, Message Interfaces,imported IDocs and created Message Mappings. Whew! A lot of work I know, butwe’re nearly there! We now need to bring this all together by creating 5 interfacemappings as follows:  IM_Order_to_ORDERS05: o Source interface: MI_ORDER o Target interface: ORDERS.ORDERS05 o Message mapping: MM_Order_to_ORDERS05Error! Bookmark not defined.  IM_Order_to_BPM_TRIGGER: o Source interface: MI_ORDER o Target interface: MI_BPM_TRIGGER o Message mapping: MM_Order_to_BPM_TRIGGER  IM_ORDRSP_to_OrderResponse: o Source interface: ORDRSP.ORDERS05 o Target interface: MI_ORDERRESPONSE o Message mapping MM_ORDERS05_to_OrderResponse  IM_ORDRSP_to_BPM_TRIGGER_CATCH: o Source interface: ORDRSP.ORDERS05 o Target interface: MI_BPM_TRIGGER_MATCH o Message mapping MM_ORDRSP_to_BPM_TRIGGER  IM_BPM_to_EMAIL: o Source interface: MI_BPM_TRIGGERPhase 2 – Integration Builder Design © Genie Press 2007 Page 32 of 159
  33. 33. Creating a BPM Scenario in XI o Target interface: MI_EMAIL o Message mapping: MM_BPM_to_EMAIL2.7.1. IM_Order_to_ORDERS05 1. Open Mapping Objects 2. Right mouse click Interface Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source interface and enter Message Interface MI_ORDER -> Apply 5. Click the button to choose a target interface and enter ORDERS.ORDERS05 (Imported Objects -> IDocs) -> Apply 6. Save 7. The Message Type MT_ORDER and ORDERS.ORDERS05 are displayed as the source and target message types respectively. 8. Click the button in the mapping program name to choose Message Map MM_Order_to_ORDERS05 9. Your Interface Mapping should look as shown in Figure 29 Figure 29: Interface Mapping - IM_Order_to_ORDERS05 10. Save2.7.2. IM_Order_to_BPM_TRIGGER 1. Open Mapping ObjectsPhase 2 – Integration Builder Design © Genie Press 2007 Page 33 of 159
  34. 34. Creating a BPM Scenario in XI 2. Right mouse click Interface Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source interface and enter Message Interface MI_ORDER -> Apply 5. Click the button to choose a target interface and enter Message Interface MI_BPM_TRIGGER -> Apply 6. Save 7. The Message Type MT_ORDER and MT_BPM_TRIGGER are displayed as the source and target message types respectively. 8. Click the button in the mapping program name to choose Message Map MM_Order_to_BPM_TRIGGER 9. Your Interface Mapping should look as shown in Figure 30 Figure 30: Interface Mapping - IM_Order_to_BPM_TRIGGER 10. Save2.7.3. IM_ORDRSP_to_OrderResponse 1. Open Mapping Objects 2. Right mouse click Interface Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source interface and enter ORDRSP.ORDERS05 (Imported Objects -> IDocs) -> Apply 5. Click the button to choose a target interface and enter Message Interface MI_ORDERRESPONSE -> Apply 6. SavePhase 2 – Integration Builder Design © Genie Press 2007 Page 34 of 159
  35. 35. Creating a BPM Scenario in XI 7. The Message Type ORDRSP.ORDERS05 and MT_ORDERRESPONSE are displayed as the source and target message types respectively. 8. Click the button in the mapping program name to choose Message Map MM_ORDERS05_to_OrderResponse 9. Your Interface Mapping should look as shown in Figure 31 Figure 31: Interface Mapping - IM_ORDRSP_to_OrderResponse 10. Save2.7.4. IM_ORDRSP_to_BPM_TRIGGER_CATCH 1. Open Mapping Objects 2. Right mouse click Interface Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source interface and enter ORDRSP.ORDERS05 (Imported Objects -> IDocs) -> Apply 5. Click the button to choose a target interface and enter Message Interface MI_BPM_TRIGGER_MATCH -> Apply 6. Save 7. The Message Type ORDRSP.ORDERS05 and MT_BPM_TRIGGER are displayed as the source and target message types respectively. 8. Click the button in the mapping program name to choose Message Map MM_ORDRSP_to_BPM_TRIGGER 9. Your Interface Mapping should look as shown in Figure 32Phase 2 – Integration Builder Design © Genie Press 2007 Page 35 of 159
  36. 36. Creating a BPM Scenario in XI Figure 32: Interface Mapping - IM_ORDRSP_to_BPM_TRIGGER_CATCH 10. Don’t forget to Save!2.7.5. IM_BPM_to_EMAIL 1. Open Mapping Objects 2. Right mouse click Interface Mappings -> New 3. Enter Name and Description -> Create 4. Click the button to choose a source interface and enter Message Interface MI_BPM_TRIGGER -> Apply 5. Click the button to choose a target interface and enter Message Interface MI_EMAIL -> Apply 6. Save 7. The Message Type MT_BPM_TRIGGER and Mail (From External Definition XI_MAIL) are displayed as the source and target message types respectively. 8. Click the button in the mapping program name to choose Message Map MM_BPM_to_EMAIL 9. Your Interface Mapping should look as shown in Figure 33Phase 2 – Integration Builder Design © Genie Press 2007 Page 36 of 159
  37. 37. Creating a BPM Scenario in XI Figure 33: Interface Mapping - IM_BPM_to_EMAIL 10. Save2.8. Integration ScenarioThe Integration Scenario is a great way to document (Yes we know, it’ssometimes seen as a bad word) your BPM process. This is the fun part as areward for all your hard work so far. We need to first create our actions before wecan put together our integration scenario. Again, notice the descriptive names weuse for these actions.2.8.1. Actions6 Actions need to be created as follows:  Send_Order: Demo system sends order using Message Interface MI_ORDER. It has 2 receivers, being the Integration Process (IP_ORDER) and the CRM system  Receive_Order: Receive the ORDERS IDoc in to the CRM system  Receive_BPM_TRIGGER: Receive the Message Type MT_BPM_TRIGGER via the Message Interface MI_BPM_TRIGGER. This will be correlated (through field DocNum) to the MI_BPM_TRIGGER_MATCH Message Interface  Send_OrderResponse: Send the ORDRSP IDoc from the ECC system. This IDoc will then have 2 receivers, being the Integration Process (IP_ORDER) and the DEMO systemPhase 2 – Integration Builder Design © Genie Press 2007 Page 37 of 159
  38. 38. Creating a BPM Scenario in XI  Receive_OrderResponse: Receive the Message Type MT_OrderResponse via Message Interface MI_ORDERRESPONSE  Receive_BPM_TRIGGER_MATCH: Receive the Message Type MT_BPM_TRIGGER via the Message Interface MI_BPM_TRIGGER_MATCH. This then correlates (through field DocNum) to the MI_BPM_TRIGGER Message Interface of the Send_Order action2.8.1.1. Send_Order 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Actions -> New 3. Enter Name Send_Order and Description -> Create 4. Enter type of Usage: External 5. Since this action represents an outbound interface, click the icon under the Outbound Interfaces tab 6. Drag and Drop your Message Interface MI_ORDER in to the new line of Outbound Interfaces. Ensure the full Object Type (Message Interface), Name (MI_ORDER) and Namespace (http://www.demo.com/XI) are entered 7. Your action will look as shown in Figure 34 Figure 34: Action - Send_OrderPhase 2 – Integration Builder Design © Genie Press 2007 Page 38 of 159
  39. 39. Creating a BPM Scenario in XI 8. Save2.8.1.2. Receive_Order 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Actions -> New 3. Enter Name Receive_Order and Description -> Create 4. Enter type of Usage: External 5. Since this action represents an inbound interface, click the icon under the Inbound Interfaces tab 6. Drag and Drop your Imported Object IDoc ORDERS.ORDERS05 in to the new line of Inbound Interfaces. Ensure the full Object Type (IDoc), Name (ORDERS.ORDERS05) and Namespace (urn:sap- com:document:sap:idoc:messages) are entered 7. Your action will look as shown in Figure 35 Figure 35: Action - Receive_Order 8. Save2.8.1.3. Receive_BPM_TRIGGER 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Actions -> New 3. Enter Name Receive_BPM_TRIGGER and Description -> Create 4. Enter type of Usage: ExternalPhase 2 – Integration Builder Design © Genie Press 2007 Page 39 of 159
  40. 40. Creating a BPM Scenario in XI 5. Since this action represents an inbound interface, click the icon under the Inbound Interfaces tab 6. Drag and Drop your Message Interface MI_BPM_TRIGGER in to the new line of Inbound Interfaces. Ensure the full Object Type (Message Interface), Name (MI_BPM_TRIGGER) and Namespace (http://www.demo.com/XI) are entered 7. Your action will look as shown in Figure 36 Figure 36: Action - Receive_BPM_TRIGGER 8. Save2.8.1.4. Send_OrderResponse 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Actions -> New 3. Enter Name Send_OrderResponse and Description -> Create 4. Enter type of Usage: External 5. Since this action represents an outbound interface, click the icon under the Outbound Interfaces tab 6. Drag and Drop your Imported Object IDoc ORDRSP.ORDERS05 in to the new line of Outbound Interfaces. Ensure the full Object Type (IDoc), Name (ORDRSP.ORDERS05) and Namespace (urn:sap- com:document:sap:idoc:messages) are entered 7. Your action will look as shown in Figure 37Phase 2 – Integration Builder Design © Genie Press 2007 Page 40 of 159
  41. 41. Creating a BPM Scenario in XI Figure 37: Action - Send_OrderResponse 8. Save2.8.1.5. Receive_OrderResponse 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Actions -> New 3. Enter Name Receive_OrderResponse and Description -> Create 4. Enter type of Usage: External 5. Since this action represents an inbound interface, click the icon under the Inbound Interfaces tab 6. Drag and Drop your Message Interface MI_ORDERRESPONSE in to the new line of Inbound Interfaces. Ensure the full Object Type (Message Interface), Name (MI_ORDERRESPONSE) and Namespace (http://www.demo.com/XI) are entered 7. Your action will look as shown in Figure 38Phase 2 – Integration Builder Design © Genie Press 2007 Page 41 of 159
  42. 42. Creating a BPM Scenario in XI Figure 38: Action - Receive_OrderResponse 8. Save2.8.1.6. Receive_BPM_TRIGGER_MATCH 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Actions -> New 3. Enter Name Receive_BPM_TRIGGER_MATCH and Description -> Create 4. Enter type of Usage: External 5. Since this action represents an inbound interface, click the icon under the Inbound Interfaces tab 6. Drag and Drop your Message Interface MI_BPM_TRIGGER_MATCH in to the new line of Inbound Interfaces. Ensure the full Object Type (Message Interface), Name (MI_BPM_TRIGGER_MATCH) and Namespace (http://www.demo.com/XI) are entered 7. Your action will look as shown in Figure 39Phase 2 – Integration Builder Design © Genie Press 2007 Page 42 of 159
  43. 43. Creating a BPM Scenario in XI Figure 39: Action - Receive_BPM_TRIGGER_MATCH 8. Save2.8.2. Integration ScenarioThe integration scenario is where things start to get exciting! It brings youractions together with the system components, showing the interfacing betweenthe systems.2.8.2.1. IS_Orders 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Actions -> New 3. Enter Name IS_Orders and Description -> Create 4. Right mouse click the first swim lane on the left and Insert Application ComponentPhase 2 – Integration Builder Design © Genie Press 2007 Page 43 of 159
  44. 44. Creating a BPM Scenario in XI Figure 40: Integration Scenario - Insert Software Component 5. Choose the DEMO system -> OK Figure 41: Integration Scenario - Choose Product Version 6. Enter Name PurchaseOrderCreation under the Role tab 7. Click the Further Attributes tab and enter extended name Order 8. Your application component should look as described in Figure 42Phase 2 – Integration Builder Design © Genie Press 2007 Page 44 of 159
  45. 45. Creating a BPM Scenario in XI Figure 42: Integration Scenario - Application Component 9. Click Apply 10. Your Integration Scenario should now look as described in Figure 43. Note that these vertical columns that we are building up are termed “Swim Lanes”. If you’ve done any swimming you’ll know why, if not, don’t worry about it. Figure 43: Integration Scenario - Component Added 11. Similarly - now we need to add 3 more systems: a. Integration Process (Template Type) b. CRM (Business System) c. ECC (Business System) 12. Right mouse click the second swim lane and Insert Application Component 13. Select Template -> Enter role name IntegrationProcess 14. Select Further Attributes tab 15. Enter XI BPM in the Extended Name fieldPhase 2 – Integration Builder Design © Genie Press 2007 Page 45 of 159
  46. 46. Creating a BPM Scenario in XI 16. Click Apply 17. Right mouse click the third swim lane and Insert Application Component 18. Select your business System for CRM entering the Role name and Extended name attributes -> Apply 19. Right mouse click the forth swim lane and Insert Application Component 20. Select your business System for ECC entering the Role name and Extended name attributes -> Apply 21. Your Integration Scenario should now have 4 swim lanes and look as shown in Figure 44 Figure 44: Integration Scenario - Swim lanes 22. Now we need to add our actions that we created earlier to the Integration Scenario – are you getting excited yet? 23. Right mouse click the Order swim lane at the top -> Insert Action Figure 45: Integration Scenario - Insert Action 24. Expand your Software Component for the Demo system and select the Action Send_Order -> Apply as shown in Figure 46Phase 2 – Integration Builder Design © Genie Press 2007 Page 46 of 159
  47. 47. Creating a BPM Scenario in XI Figure 46: Integration Scenario - Insert Send_Order 25. Your Integration Scenario now looks as described in Figure 47 Figure 47: Integration Scenario - Send_Order added 26. We now will add the 2 receive actions. One in the integration process and 1 in the CRM system 27. Another way of adding actions is to drag and drop them on to the right swim lane at the right position. This is pretty cool so we’ll use this technique to add all the actions! 28. Drag the Receive_BPM_TRIGGER to the 2nd swim lane below the level of the send order action (this ensures that it’s not treated as a parallel action to the send order. We need this in order to link them together). 29. Similarly Drag the Receive_Order to the 3rd swim lane (CRM) below the level of the send order action and adjacent to the Receive_BPM_TRIGGER action (again this tells XI not to treat these as parallel or synchronous actions).Phase 2 – Integration Builder Design © Genie Press 2007 Page 47 of 159
  48. 48. Creating a BPM Scenario in XI Figure 48: Integration Scenario - Added Receive Order 30. Now add the last 3 actions (to end up with a view as shown in Figure 49) as follows: a. Send_OrderResponse in ECC system down and to the right of Receive_Order b. Receive_OrderResponse in Demo system down and to the left of Send_OrderResponse c. Receive_BPM_TRIGGER_MATCH in Integration Process template down and to the left of Send_OrderResponse and adjacent to Receive_OrderResponse Figure 49: Integration Scenario - All actions added 31. This is great! We have all the actions, but now we need to focus on linking the actions together 32. Single click the Send_Order action -> Hold down the Shift Key and single click the Receive_BPM_TRIGGER action to select both 33. Right mouse click one of the selected actions -> Create Connection Between Selected Actions as shown in Figure 50Phase 2 – Integration Builder Design © Genie Press 2007 Page 48 of 159
  49. 49. Creating a BPM Scenario in XI Figure 50: Integration Scenario - Create connection between actions 34. The screen displaying the connection between outbound interface MI_ORDER and inbound interface MI_BPM_TRIGGER should be displayed 35. Click the Assign Mapping tab 36. Click the button in the Assign Interface Mapping Name field to choose Interface Map IM_Order_to_BPM_TRIGGER 37. Click Apply 38. An arrow is now drawn from Send_Order to Receive_BPM_TRIGGER as shown in Figure 51 Figure 51: Integration Scenario - Connection added 39. Similarly connect the following actions together and add the respective interface mappings shown in parentheses: a. Send_Order -> Receiver_Order (IM_Order_to_ORDERS05) b. Send_OrderResponse -> Receive_OrderResponse (IM_ORDRSP_to_OrderResponse) c. Send_OrderResponse -> Receive_BPM_TRIGGER_MATCH (IM_ORDRSP_to_BPM_TRIGGER_CATCH) 40. Your integration scenario should now look as shown in Figure 52Phase 2 – Integration Builder Design © Genie Press 2007 Page 49 of 159
  50. 50. Creating a BPM Scenario in XI Figure 52: Integration Scenario - Completed Connections 41. We can now define our action start and end points 42. The Send_Order is our start action so Right mouse click Send_Order 43. Click Define Action as Start Action as shown in Figure 53 Figure 53: Integration Scenario - Define start action 44. Similarly we will define the Receive_OrderResponse and Receive_BPM_TRIGGER_MATCH actions as end actions 45. Right mouse click Receive_OrderResponse and select Define Action as End Action 46. Right mouse click Receive_BPM_TRIGGER_MATCH and select Define Action as End Action 47. After completion of the definition of the Integration Process described in 2.9. Integration Process starting on page 51, you need to add the Integration Process to the Integration Process Component a. Double click the Integration Process component and select the Integration Process tab b. Select IP_ORDERS as the name from the dropdown list c. Your definition should now look as shown in Figure 54Phase 2 – Integration Builder Design © Genie Press 2007 Page 50 of 159
  51. 51. Creating a BPM Scenario in XI Figure 54: Integration Scenario - Link Integration Process 48. Your overall Integration Scenario IS_Orders should look as shown in Figure 55 Figure 55: Integration scenario – IS_Orders2.9. Integration ProcessThe integration process handles the workflow within the BPM engine. It is basedon SAP’s webflow (workflow) engine.The integration process that we need will contain the following functionality:  Receive the order message (Abstract interface MI_BPM_TRIGGER). Activate correlation on field DocNum  Assign DocNum to a container element called DocNum  Wait for the receipt of the order response message (Abstract interface MI_BPM_TRIGGER_MATCH). Use correlation on DocNumPhase 2 – Integration Builder Design © Genie Press 2007 Page 51 of 159
  52. 52. Creating a BPM Scenario in XI  If the order response message does not come in 5 minutes, then fire off an alert and send an email  If the order response message is received in time then end the process gracefully  If the entire integration process does not end in 30 minutes then fire off an alert and cancel the process. This prevents an orphan process from hanging around in the BPM engine forever, which will use unnecessary resources.For the completed view of what we will develop see Figure 56. We will beworking in the Container, Properties and Graphical Definition windows. We willalso switch to the Correlation Editor to perform the correlation mapping there. Figure 56: Integration Process - Completed2.9.1. IP_Orders 1. Open Integration Scenarios & Integration Processes 2. Right mouse click Integration Processes -> New 3. Enter Name IP_Orders and Description -> Create 4. First thing to do is to add our required container elementsPhase 2 – Integration Builder Design © Genie Press 2007 Page 52 of 159
  53. 53. Creating a BPM Scenario in XISTEP 1 - Create Container Elements 1. In the container window, type DocNum in the name field and enter. The defaults are good for this variable – so we’ll use them 2. To add the Orders message, type Orders in the name field and choose Abstract interface in the Category field – see figure 57 below Figure 57: Integration Process - Add message to container 3. Click the button in the Type field to choose Message Interface MI_BPM_TRIGGER 4. To add the Order Response message, type OrderResponse in the name field and choose Abstract interface in the Category field 5. Click the button in the Type field to choose Message Interface MI_BPM_TRIGGER_MATCH 6. The container should look as shown in Figure 58 Figure 58: Integration Process – ContainerSTEP 2 – Add Receiver Orders Step and set up correlation 1. We now need to add the first step in the process, the receive orders step 2. Click, drag and drop the receiver step from the side bar on the Graphical Definition window to between the start and stop circles as shown in Figure 59 (Orange lines will denote where the step will be inserted if you were to let the mouse button go at that point) Figure 59: Integration Process - Add receiver step 3. In the Properties window you will notice that the Receive step is displayed there.Phase 2 – Integration Builder Design © Genie Press 2007 Page 53 of 159
  54. 54. Creating a BPM Scenario in XI 4. Change the step name from Receive1 to ReceiveOrders 5. Click the button in the Message field to choose the Interface Variable -> Orders (as shown in Figure 60) -> OK Figure 60: Integration Process - Interface Variable 6. We now need to create a correlation field called DocNum 7. In the Container window click and select Correlation List as shown in Figure 61 Figure 61: Integration Process - Correlation List 8. Enter DocNum in the Correlation Name field and Enter 9. In the Graphical Definition window click to fire up the Correlation Editor as shown in Figure 62 Figure 62: Integration Process - Fire up Correlation Editor 10. Ensure that your Correlation Name is DocNum as shown in Figure 63 11. Enter DocNum in the Correlation Container -> Name with type xsd:string 12. We now need to add our 2 Message Interfaces involved in the correlation, namely MI_BPM_TRIGGER and MI_BPM_TRIGGER_MATCH (Remember them?) 13. Drag the Message Interface MI_BPM_TRIGGER to the Involved Messages window (to the blank line). Your screen should look as shown in Figure 63Phase 2 – Integration Builder Design © Genie Press 2007 Page 54 of 159
  55. 55. Creating a BPM Scenario in XI Figure 63: Integration Process - Adding involved messages 14. Click the button in the Value field 15. Select radio button Interface Variable -> XPath 16. Choose the DocNum field from the MT_BPM_TRIGGER message -> OK as shown in Figure 64 Figure 64: Integration Process - Expression Editor 17. Drag the Message Interface MI_BPM_TRIGGER_MATCH to the Involved Messages window (to the blank line). 18. Click the button in the Value field to choose the DocNum field from the MT_BPM_TRIGGER_MATCH message (similarly as done for the MT_BPM_TRIGGER message interface above) -> OK 19. Your correlation should now look as shown in Figure 65 Figure 65: Integration Process - Correlation 20. Go back to the Properties window by selecting and Graphical Definition as shown in Figure 66Phase 2 – Integration Builder Design © Genie Press 2007 Page 55 of 159
  56. 56. Creating a BPM Scenario in XI Figure 66: Integration Process - Graphical Definition 21. With the receive orders step highlighted, click the Value field next to the Activate Correlation name and choose DocNum as shown in Figure 67 Figure 67: Integration Process - Activate Correlation 22. The ReceiverOrders step properties should look as shown in Figure 68 Figure 68: Integration Process - Activate CorrelationSTEP 3 – Create Container Operation step to assign DocNum 1. Drag the container operation step icon to between the Receive Orders step and the Stop marker as shown in Figure 69 Figure 69: Integration Process - Add Container operation 2. In the Properties window 3. Change the step name to Assign DocNum 4. Click on the Target field and select Radio Button Simple Variable 5. Choose variable DocNum as shown in Figure 70 Figure 70: Integration Process - Select variable from containerPhase 2 – Integration Builder Design © Genie Press 2007 Page 56 of 159
  57. 57. Creating a BPM Scenario in XI 6. Choose Assign as the operation 7. Click on the Expression field and select Radio Button Interface Variable 8. Select XPath radio button 9. Select the DocNum field from the MT_BPM_TRIGGER message as shown in Figure 71 Figure 71: Integration Process - Select DocNum from Message 10. Your scenario and Container Operation step should look as shown in Figure 72 Figure 72: Integration Process - Container Operation step addedSTEP 4 – Create Block 1. Drag the block step icon to between the Container Operation Step and the Stop marker as shown in Figure 73 Figure 73: Integration Process - Add Block 2. Select the blockPhase 2 – Integration Builder Design © Genie Press 2007 Page 57 of 159
  58. 58. Creating a BPM Scenario in XI 3. In the Properties window 4. Give the block a descriptive name “Block Receive with Deadline” 5. Leave mode as default 6. Enter 2 exceptions: a. TimeOut b. SystemError 7. Your block definition should now look as shown in Figure 74: Integration Process - Block definitionSTEP 5 – Create deadline branch for the block 1. Right mouse click on the block -> Insert -> Deadline Branch as shown in Figure 75 Figure 75: Integration Process - Insert Deadline Branch 2. A new branch is created inside the block for the deadline 3. Select the deadline branch to complete the properties 4. We are going to set the deadline to 24 hours from the time the step was created 5. In the Properties window 6. Choose Creating the Step for Reference Date / Time 7. Enter 24 for DurationPhase 2 – Integration Builder Design © Genie Press 2007 Page 58 of 159
  59. 59. Creating a BPM Scenario in XI 8. Select Hours as the Unit Figure 76: Integration Process - Deadline branchSTEP 5a – Create process control step to throw alert in deadline branch 1. Drag the control step icon to the center of the block created in the step before as shown in Figure 77 Figure 77: Integration Process - Add Control step 2. Select the control step 3. In the Properties window 4. Change the step name to something meaningful like Deadline Reached 5. Select Throw Alert from the dropdown for the Action 6. Type in TESTALERT, as configured in 2.10.1. TESTALERT on page 67 7. Type in an informative alert message such as Order Response has yet to be received for &DocNum&. &DocNum& refers to the variable in the BPM container called DocNum that was populated by the Container Operation step defined in STEP 3 – Create Container Operation step to assign DocNum on page 56STEP 5b – Create transformation step to generate email message in deadlinebranch 1. In the Container Window create a variable as follows: a. Name: BPM_EMAIL b. Category: Abstract Interface c. Type: From the dropdown select message interface MI_EMAIL d. Container: Block Receive with Deadline The container element should now look as shown in Figure 78 Figure 78: Integration Process - Add container elementPhase 2 – Integration Builder Design © Genie Press 2007 Page 59 of 159
  60. 60. Creating a BPM Scenario in XI 2. Drag the transformation step icon to between the control step created in the step before and the end of the block as shown in Figure 79 Figure 79: Integration Process - Add Transformation step 3. Select the transformation step 4. In the Properties window 5. Change the step name to something meaningful like TransformationAlertEmail 6. Click the icon next to the Interface Mapping to select your interface map IM_BPM_to_EMAIL that you defined in 2.7.5. IM_BPM_to_EMAIL on page 36 7. Select SystemError from the dropdown for field Exception. This system error exception was defined against the block defined in STEP 4 – Create Block on page 57 8. For the source message, from the dropdown ( ), select the Orders Interface Variable as shown in Figure 80 Figure 80: Integration Process - Enter Orders Variable 9. For the target message, from the dropdown ( ), select the BPM_EMAIL Interface Variable created in item 1 of this step. 10. Your transformation step should now look as shown in Figure 81 Figure 81: Integration Process - Transformation step propertiesSTEP 5c – Create send step to send email in deadline branch 1. In the Graphical Definition window drag the send step icon to between the transformation step created in the step before and the end of the block as shown in Figure 82Phase 2 – Integration Builder Design © Genie Press 2007 Page 60 of 159
  61. 61. Creating a BPM Scenario in XI Figure 82: Integration Process - Add Send step 2. Select the send step 3. In the Properties window 4. Change the step name to something meaningful like SendAlertEMail 5. Leave Mode as Asynchronous 6. For the message, from the dropdown ( ), select the BPM_EMAIL Interface Variable as shown in Figure 83 Figure 83: Integration Process - Enter BPM_EMAIL Variable 7. Select SystemError from the dropdown for field Exception. This system error exception was defined against the block defined in STEP 4 – Create Block on page 57 8. Leave the other fields as defaulted. Your completed send step properties should look as shown in Figure 84 Figure 84: Integration Process - Send step propertiesSTEP 5d – Create control step to throw timeout exception in deadline branch 1. In the Graphical Definition window drag the control step icon to between the send step created in the step before and the end of the block as shown in Figure 85 Figure 85: Integration Process - Add control step to throw exceptionPhase 2 – Integration Builder Design © Genie Press 2007 Page 61 of 159
  62. 62. Creating a BPM Scenario in XI 2. Select the control step 3. In the Properties window 4. Change the step name to something meaningful like TimeOut 5. Select Throw Exception from the dropdown box on field Action 6. Select TimeOut from the dropdown box on field Exception. This exception was defined against the block defined in STEP 4 – Create Block on page 57 7. Your completed send step properties should look as shown in Figure 86 Figure 86: Integration Process - Exception control step propertiesSTEP 6 – Create exception branch for system errors 1. Right mouse click on the block -> Insert -> Exception Branch as shown in Figure 87 Figure 87: Integration Process - Insert Exception Branch 2. Select the Exception block that was created 3. In the Properties window 4. Select SystemError from the dropdown for field Exception Handler 5. Your exception block and properties should look like Figure 88 Figure 88: Integration Process - System error exceptionPhase 2 – Integration Builder Design © Genie Press 2007 Page 62 of 159
  63. 63. Creating a BPM Scenario in XISTEP 6a – Create System Error alert in exception branch 1. Drag the control step icon to the center of the SystemError exception block created in the step before as shown in Figure 89 Figure 89: Integration Process - Add Alert Control step to Exception SystemError 2. Select the control step 3. In the Properties window 4. Change the step name to something meaningful like Alert System Error 5. Select Throw Alert from the dropdown for the Action 6. Type in TESTALERT1, as configured in 2.10.2. TESTALERT1 on page 68 7. Type in an informative alert message such as System Error Encountered for &DocNum&. &DocNum& refers to the variable in the BPM container called DocNum that was populated by the Container Operation step defined in STEP 3 – Create Container Operation step to assign DocNum on page 56STEP 6b – Create cancel process step in exception branch 1. Drag the control step icon to after the control step, created in the step before, and the end of the exception block as shown in Figure 90 Figure 90: Integration Process - Add Cancel Process Control step to Exception SystemError 2. Select the control step 3. In the Properties window 4. Change the step name to something meaningful like CancelProcessPhase 2 – Integration Builder Design © Genie Press 2007 Page 63 of 159
  64. 64. Creating a BPM Scenario in XI 5. Select CancelProcess from the dropdown for the ActionSTEP 7 – Create exception branch for timeout processingSimilarly to the previous step we need to create a timeout exception branch 1. Right mouse click on the block -> Insert -> Exception Branch as shown in Figure 91 Figure 91: Integration Process - Insert Exception Branch for TimeOut 2. Select the Exception block that was created 3. In the Properties window 4. Select TimeOut from the dropdown for field Exception Handler 5. Your exception block and properties should look as shown in Figure 92 Figure 92: Integration Process – Time out exceptionSTEP 7a – Create cancel process step in the TimeOut exception branch 1. Drag the control step icon to after the TimeOut control step, created in the step before, and the end of the exception block as shown in Figure 93Phase 2 – Integration Builder Design © Genie Press 2007 Page 64 of 159
  65. 65. Creating a BPM Scenario in XI Figure 93: Integration Process - Add Cancel Process Control step to Exception TimeOut 2. Select the control step 3. In the Properties window 4. Change the step name to something meaningful like Cancel Process due to Time Out 5. Select CancelProcess from the dropdown for the ActionSTEP 8 – Create Receive Order Response Step with correlationWe now need to add the receive order response step 1. Click, drag and drop the receiver step from the side bar on the Graphical Definition window to bottom line under the deadline branch as shown in Figure 94 Figure 94: Integration Process - Add receiver step for order response 2. In the Properties window change the step name from Receive1 to Receive Order Response 3. Click the button in the Message field to choose the Interface Variable -> OrderResponse as shown in Figure 95Phase 2 – Integration Builder Design © Genie Press 2007 Page 65 of 159
  66. 66. Creating a BPM Scenario in XI Figure 95: Integration Process - Interface Variable OrderResponse 4. Select DocNum from the dropdown menu for variable Use Correlations 5. Save 6. Select DocNum from the dropdown menu for variable Activate Correlations 7. Save 8. Your Send Order Response step properties should now look as shown in Figure 96 Figure 96: Integration Process - Receiver order response step properties2.10. Create Alert CategoryWe need to configure an alert category for the alerts we are going to issue in theBPM Integration Process. Here’s how we go about doing that. 1. Fire up the Runtime Workbench from the Integration Builder by clicking Runtime Workbench Figure 97: Launch Runtime Workbench 2. Click Alert Configuration as shown in Figure 98Phase 2 – Integration Builder Design © Genie Press 2007 Page 66 of 159
  67. 67. Creating a BPM Scenario in XI Figure 98: Runtime Workbench 3. Click the Create Alert Category button . Click OK on the warning message shown in Figure 99 (Also Transaction ALRTCATDEF) Figure 99: Creating an Alert Category warning message 4. On the screen showing the Alert Categories Display, click the Display/Change button 5. Click the Webflow Alerts in the Classification window. This will display the related Webflow alerts in the ALV grid on the right of the classification as shown in Figure 100 Figure 100: Select Webflow Alert Classification2.10.1. TESTALERT 1. Click the create alert category icon 2. This adds a line to the ALV grid. Fill in the Alert Category name TESTALERT and a description BPM Alert 3. Hit Enter to see the alert as shown in Figure 101Phase 2 – Integration Builder Design © Genie Press 2007 Page 67 of 159
  68. 68. Creating a BPM Scenario in XI Figure 101: TESTALERT added 4. Click the Dynamic Text checkbox on. The 2 tabs “Long and Short Text” and “Optional Subseq. Activities” disappear. Clicking this checkbox allows you to pass variables to the alert in the BPM process as shown in STEP 5a – Create process control step to throw alert in deadline branch on page 59 5. Leave the other fields with their defaults 6. Save. Your alert now looks as shown in Figure 102 Figure 102: TESTALERT set to dynamic text2.10.2. TESTALERT1Adding the 2nd Alert Category called TESTALERT1. 1. Click the create alert category icon 2. This adds a line to the ALV grid. Fill in the Alert Category name TESTALERT1 and a description BPM Exception Alert 3. Hit Enter to see the alert as shown in Figure 103Phase 2 – Integration Builder Design © Genie Press 2007 Page 68 of 159
  69. 69. Creating a BPM Scenario in XI Figure 103: TESTALERT1 added 4. Click the Dynamic Text checkbox on. The 2 tabs “Long and Short Text” and “Optional Subseq. Activities” disappear. Clicking this checkbox allows you to pass variables to the alert in the BPM process as shown in STEP 6a – Create System Error alert in exception branch on page 63. This is very useful to us! 5. Leave the other fields with their defaults 6. Save. Your alert now looks as shown in Figure 104 Figure 104: TESTALERT1 set to dynamic text2.10.3. Assign Users / Roles to Alert Categories 1. Double click TESTALERT 2. Click the Fixed Recipients Button 3. If you are not in change mode then click the Display / Change button 4. Click the New Entries button 5. Type in your user id and savePhase 2 – Integration Builder Design © Genie Press 2007 Page 69 of 159
  70. 70. Creating a BPM Scenario in XI 6. Click Back -> Back 7. Repeat the above process (Steps 1-6) for TESTALERT1☼ Note that you should probably use the Role functionality to be able to sendalerts based on roles in a user’s profile. For simplicity sake we have hard codedthe user receiving this alert using the Fixed Recipients functionality.2.10.4. Update Alert Categories 1. Close the webgui session and go back to your browser showing the Runtime Workbench 2. Click the button Update Table 3. Your newly created Alert categories are now viewable as shown in Figure 105 Figure 105: Display of Alert CategoriesPhase 2 – Integration Builder Design © Genie Press 2007 Page 70 of 159
  71. 71. Creating a BPM Scenario in XIPHASE 3 : INTEGRATION BUILDER CONFIGURATIONThe system landscape and interface repository steps need to have beencompleted prior to starting this phase. 1. Start the Integration Directory of the Integration Builder3.1. Create Configuration Scenario3.1.1. Order_OrderResponse_Demo 1. Select the Scenarios tab 2. Right mouse click in the window and choose New 3. Enter Description as Order and Order Response Scenario 4. Click to select the Integration scenario IS_Orders we configured in 2.8. Integration Scenario on page 37 5. You’ll notice that the configuration scenario is changed to IS_Orders which is our Integration Scenario name. If you want to change it change it before creating the configuration scenario. Once you’ve changed the name (Order_OrderResponse_Demo) is should now look as shown in Figure 106 Figure 106: Create Integration Scenario 6. Click create 7. SavePhase 3 – Integration Builder Configuration© Genie Press 2007 Page 71 of 159
  72. 72. Creating a BPM Scenario in XI3.2. Create Integration Process Service3.2.1. IP_ORDERS 1. Right mouse click on Integration Party (Under Service without a party in your newly created scenario) 2. Click New 3. Click continue on the screen shown in Figure 107 Figure 107: Install Integration Process 4. Select the IP_Orders Repository Process and click continue as shown in Figure 108 Figure 108: Select Repository Integration Process 5. Enter Name IP_Orders and click Finish as shown in Figure 109Phase 3 – Integration Builder Configuration© Genie Press 2007 Page 72 of 159
  73. 73. Creating a BPM Scenario in XI Figure 109: Give Integration Process a name 6. You then see the screen as shown in Figure 110 Figure 110: Integration Process installed 7. Edit the Integration Process 8. Click the menu option Service -> Adapter Specific Identifiers 9. Enter IP_ORDERS as the Logical System. (If you don’t do this step then you will get an error that the Logical System could not be determined for IP_ORDERSPhase 3 – Integration Builder Configuration© Genie Press 2007 Page 73 of 159
  74. 74. Creating a BPM Scenario in XI 10. Click Apply3.3. Create Services without Party3.3.1. Business Service: DEMO 1. Right click Business Service 2. Click Create 3. On the Receiver tab click to add a line to the Inbound Interfaces 4. Click to choose Message Interface MI_ORDERRESPONSE -> OK 5. Click the Sender tab 6. On the Sender tab click to add a line to the Outbound InterfacesPhase 3 – Integration Builder Configuration© Genie Press 2007 Page 74 of 159

×