C6: Introducing Native Invocation with the OpenEdge® Adapter for Sonic™ ESB Chris James Senior Consultant
Agenda Business Processes and Sonic ESB OpenEdge Adapter for Sonic ESB Native Invocation Methodology
Business Processes How do you create business processes that execute ABL components? With Sonic ESB! Flexibly assemble components Heterogeneous Distributed Scalable Sonic MQ® Reliable Messaging SONIC ESB J2EE™ APPL. PACKAGED APPL. .NET™ APPL. OPENEDGE APPL. WEB SERVICE
Model Business Process: Sonic Itinerary Process Editor
OpenEdge Adapter for Sonic ESB ABL components participate in business processes controlled by Sonic ESB Prior to OpenEdge 10.1C: ABL is disguised as Web services Developer needs detailed knowledge of Web service technologies The setup in OpenEdge and Sonic is complex Starting with OpenEdge 10.1C: Native Invocation Methodology Added!
Adapter Architecture: Web Service Invocation Methodology Service1.wsm Service1.wsdl ProxyGen Service1 Source Code Sonic ESB Container OpenEdge Adapter for Sonic ESB Service1.wsm OpenEdge Service1 SOAP to ABL ABL to SOAP OpenEdge Application Server
ABL Native Invocation Methodology Sonic ESB calls ABL procedures, functions and external procedures directly/natively AppServer™ call information is collected at development time: Source code annotation preferred AppServer run-time properties & service initialization: info stored in invocation files Input/output parameters of ABL procedure mapped to Sonic message content Sonic ESB Process Editor
Adapter Architecture: Native Invocation Methodology Sonic ESB Container OpenEdge Adapter for Sonic ESB OpenEdge Service1 SOAP to ABL ABL to SOAP Service1.wsm OpenEdge Service2 Service2.esboe OpenEdge Application Server
Supported AppServer Session Models Session-free (recommended) No session between client & AppServer is maintained AppServer runs in a state-free operating mode Session-managed Client to AppServer persistent connection maintained AppServer runs in State-reset, State-aware or Stateless operation modes
Unified Development Environment OpenEdge Architect and Sonic Workbench are both based on Eclipse Easy to configure a combined development environment in a single Eclipse instance OpenEdge 10.1C and either Sonic 7.5 or 7.6 No switching between OpenEdge and Sonic Single unified view of project resources
Demonstration: Unified Development Environment
Native Invocation Development Process New in OpenEdge 10.1C STEP 1: Create .esboe file for each ABL procedure Annotate Source Code Don’t Annotate ProxyGen builds .esboe from r-code OE Architect Annotation Wizard .esboe built on-compile or on-demand Manually Command line utility* to build .esboe STEP 1: Create .esboe file for ABL procedure OE Architect Annotation Wizard .esboe built on-compile or on-demand STEP 2: .esboe file in Sonic project (automatic or import) STEP 3: Drop .esboe onto Sonic Workbench Process Editor STEP 4: Map ABL parameters to message parts * OpenEdge Architect must be installed
Code Annotation Example @openapi.openedge.export(type=“ESB”,ESBOEFilename=“%PROCNAME%”) DEFINE INPUT PARAMETER ItemNumIn AS INTEGER NO-UNDO. DEFINE OUTPUT PARAMETER DATASET FOR dsItemLocations. FIND Sports2000.Item WHERE Sports2000.Item.Itemnum = ItemNumIn. IF AVAILABLE(Item) THEN DO: CREATE ttItem. ASSIGN ttItem.Itemnum = Sports2000.Item.Itemnum ttItem.ItemName = Sports2000.Item.ItemName. FOR EACH Sports2000.Bin WHERE Sports2000.Bin.Itemnum = ItemNumIn:
Supplying Invocation Information to Sonic Annotate Source Code? Yes (Declarative) No (Non-Declarative) Compile Source Code r-Code Run ProxyGen .esboe Add Annotations Compile Source Code .esboe r-Code Add ABL Call to Itinerary in Sonic Workbench
Demonstration: Source Code Annotation
Native Invocation Development Process STEP 1: Create .esboe file for ABL procedure Annotate Source Code Don’t Annotate ProxyGen builds .esboe from r-code OE Architect Annotation Wizard .esboe built on-compile or on-demand Manually Command line utility* to build .esboe STEP 3: Drop .esboe onto Sonic Workbench Process Editor STEP 2: .esboe file in Sonic project (automatic or import) STEP 3: Drop .esboe onto Sonic Workbench Process Editor STEP 4: Map ABL parameters to message parts * OpenEdge Architect must be installed
Sonic Workbench Process Editor: Add ABL Process Step
Demonstration: Sonic Workbench Process Editor
Native Invocation Development Process STEP 1: Create .esboe file for ABL procedure Annotate Source Code Don’t Annotate ProxyGen builds .esboe from r-code OE Architect Annotation Wizard .esboe built on-compile or on-demand Manually Command line utility* to build .esboe STEP 4: Map ABL parameters to message parts Graphical mapping available Use XPath to extract/insert simple types Use message parts for TempTables/DataSets STEP 2: .esboe files in Sonic project (automatic or import) STEP 3: Drop .esboe onto Sonic Workbench Process Editor STEP 4: Map ABL parameters to message parts * OpenEdge Architect must be installed
Message Structure Envelope Header #0 Header #1 Body Message Payload
Mapping Message Parts: Request ABL Flexible mapping capabilities
Mapping Message Parts: ABL Response
Demonstration: Mapping Message Parts
Debugging and Deployment Use scenarios in Sonic Workbench Process Editor to debug the business process Deploy the business process, .esboe file and r-code ABL is automatically executed when the business process runs
Demonstration: Debugging
Native Invocation Methodology Benefits Unified OpenEdge and Sonic development environment Easy to expose ABL code as a service Minimal technical knowledge needed Basic use case is automated Faster development Optimized run-time performance (no SOAP)
Next Steps Get an evaluation copy of OpenEdge 10.1C and Sonic 7.6 Visit www.psdn.com and click on the product tour and evaluation kits link
? Questions
Thank You