Designing ServiceOriented Applications with CA Plex r6'1
Description:
Create the Input Variable Group DataContract class. ... convenient way for BPM tools to integrate applications into Business Processes ... – PowerPoint PPT presentation
Title: Designing ServiceOriented Applications with CA Plex r6'1
1 Designing Service-Oriented Applications with CA Plex r6.1 Session Code ROB2 2 Agenda
Introducing Plex Services
Why Service Connectors?
Service Connector Modeling
Implementing Service Connectors using WCF
Windows Communication Foundation Defined
Basic WCF Service Connector Implementation
WCF Specific Service Connector Modeling
Runtime
WCF/Plex Runtime Architecture
Plex Runtime Configuration
N-tier Implementation
Error Handling
Client Coding
An Introduction to Business Process Modeling (BPM)
Best Practices
Plex Application Development and Service Modeling
Troubleshooting
Summary
Q A
3 Why Service Connectors?
Before SOA
Monolithic Applications
Ridged Business Processes
Functional Duplication
Proprietary Communications
Maintenance Complexity
Tight-coupling between application, services and platforms
4 Why Service Connectors?
After SOA
Modularized Applications
Flexible Business Processes
Functional Reuse
Standardized Communication
Maintenance Simplification
Loose-coupling between application, services and platforms
5 Why Service Connectors?
To expose Plex applications via reusable service interfaces that can be incorporated into business processes using industry standard distributed technologies.
6 Service Connector Modeling
Services
Have explicit boundaries
Are autonomous
Share schema and contract
Component-modeling, evolved
7 Service Connector Modeling
Reuse the existing Plex Object-model
8 Service Connector Modeling
New Service Connector Specific Triples
PKG type SYS/ServiceConnector
CDL service PKG
Think of a Service Connector as The part of a Code Library you want to expose as a service
Service Connectors created via Code Library Deployment Wizard Plug-ins
First plug-in implemented WCF Service Generator
9 Windows Communication Foundation Defined .NET Remoting ASMX Interop with other platforms Extensibility Location transparency Attribute- Based Programming Message- Oriented Programming WS- Protocol Support Enterprise Services System.Messaging WSE 10 Windows Communication Foundation Defined
A unified platform and programming model for building distributed systems, with a focus on
Interoperability
Can work with most existing .NET distributed technologies
Good support for WS- protocols for cross-platform iiop
Service-orientation
Explicit boundaries
Autonomous services
Share only schema and contract
11 Windows Communication Foundation Defined
Endpoint consists of three parts
Address Where is the service located
Contract What does the service offer?
Binding How do we communicate with the service?
Combined they form the Service Contract
12 Basic WCF Service Connector Implementation 13 Basic WCF Service Connector Implementation
Only one specific triple needed
FNC language SYS/C
All other options defined during generation
14 Basic WCF Service Connector Implementation
What do you end up with?
Optional service host support files
15 WCF Specific Service Connector Modeling
Interface modeling for the Where and How of the endpoint (What is tied to Function)
MTOM (Message Transport Optimization Mechanism) 16 WCF Specific Service Connector Modeling
Use a new triple to set the hosting type
PKG service host type SYS
17 Runtime Architecture 18 Runtime Configuration
Use any .config file that contains Plex .NET configuration sections
Edit directly from the WCF Services Plug-in
Dont Forget to Save!
19 N-tier Support
Which Server?
Configure via Plex .config file
20 Error Handling
If an exception occurs in the Plex .NET Runtime
Exception specifics should not be passed back to clients Exception Shielding
Any exceptions should be passed back to the client via a known interface Fault Contract
The service should be left in a known state after the exception has occurred
21 Error Handling Part 1In the Service Layer
Plex implements a custom Fault Contract called PlexRuntimeException
Message Error message from the Plex .NET Runtime (String)
CallStatus Did the call work? (Boolean)
ReturnedStatus Any programmatic Returning status set before the error occurred (String)
Wrap all operation calls in a try/catch block to monitor for this error (more on this later)
22 Error Handling Part 2In the Plex .NET Runtime
WCF Services use standard Plex .NET Logging
FlatText logs created in standard log folder
23 Client Coding
Clients use a proxy to access running WCF Service Client Stub
Create stubs for .NET client applications using
Service Model Metadata Utility Tool (Svcutil.exe)
Visual Studio 2008 Add Service Reference
24 Client Coding
Create the client stub instance
// Create an instance of the WCF Service via the client stub.
OrderClient myOrderClient new OrderClient()
You might have to specify the endpoint you want to use
// Create an instance of the WCF Service via the client stub.
OrderClient myOrderClient new OrderClient("OrderWebEndpoint")
25 Client Coding
Set Input Parameters
// Create the Variable DataContracts classes contained within the
// Input Variable Group.
HeaderBlockFetch_Input._Control control new HeaderBlockFetch_Input._Control()
HeaderBlockFetch_Input._Position position new HeaderBlockFetch_Input._Position()
// Set up the input parameters for the call.
control.Position "Y" // This is a FLD type SYS/Character
position.ORDERNUMBER 1 // This is a FLD type SYS/Numeric
// Create the Input Variable Group DataContract class.
HeaderBlockFetch_Input input new HeaderBlockFetch_Input()
// Assign the Variables to the Input Variable Group.
input.Control control
input.Position position
26 Client Coding
Call the operation (using try/catch block)
try
// Call the operation on the service stub.
HeaderBlockFetch_Output output
myOrderClient.GetOrderHeaders(input)
catch (FaultExceptionltPlexRuntimeExceptiongt ex)
// Use PlexRuntimeException to report the error.
Console.WriteLine(ex.Detail.Message)
27 Client Coding
Deal with output
Bind to controls
// Bind FetchedData output variable to a DataGridView DataSource
dgvOrders.DataSource output.FetchedData
Process in code
// Use a .NET iterator to read the FetchedData MOV
foreach (HeaderBlockFetch_Output._FetchedData FetchedData in output.FetchedData)
// Output each name in the FetchedData instance.
Console.WriteLine(FetchedData.CUSTOMERNAME)
28 Client Coding
Dispose of your client (optional)
// Call the dispose operation on the service stub.
myOrderClient.Dispose()
Removes Plex runtime connections for
Databases
Remote servers
Threads
You should see the following in the VS2008 Output window
Removing Plex .NET Runtime 17654054
29 Demos
Both based on Plex r6.10 Training
Demo 1
Basic WCF Service Implementation
N-Tier Platform Support
Error Handling
Demo 2
A more practical example
More on coding techniques
30 An Introduction to Business Process Modeling
Time to focus on the Business Process Layer
31 An Introduction to BPMWhat and Why?
BPM represents Processes within an Enterprise
Generally involve human and automated steps
Potentially long-running (esp. with Humans in the mix!)
Could involve multiple applications
Benefits
Diagramming makes them easy to understand
Theyre adaptable
Better able to deal with long running Processes
A Workflow is one way of modeling a BPM Process
32 An Introduction to BPMWhy Workflows?
Workflows can be Long-running and Stateful
Provide transparency into a Business Process
Can increase productivity because they match the process being modeled
Can adapt to changing business needs without recoding
33 An Introduction to BPMDefinition of a Workflow
A set of Activities organized into a Business Process that organize people and software
An Activity is a unit of execution within the workflow
Encapsulated functionality
Designed for reuse
Calling a Service Operation is one example
Can be user defined
Two primary types of Workflow
Sequential
State-Machine
34 An Introduction to BPMWindows Workflow Foundation
Microsofts Workflow solution
Part of .NET Framework 3.0
Will underpin all of Microsofts future offerings that involve workflows
Consists of
A Base Activity Library
A Runtime Engine
Runtime Services
Visual Design Tools
35 Demo
Based on Plex r6.10 Training (Lab 3)
36 Best Practices Plex Application Development
Dont add too many service operations
4-5 per service is normal
Create composite units of functionality
Reduces service complexity
Avoids chatty interfaces
Simplify input/output parameter interfaces
These relate to the input, dual and output parameters in your function
Use human-readable field implementation names
Dont imbed server functionality in your clients!
Avoid the need to send configuration data from your client applications that use your services.
37 Best Practices Troubleshooting
Always start with a running Plex client-server application!
Adding Package triples to your application is A Good Thing.
Use your Plex runtime .NET log files when WCF Services dont work.
Review your AssemblyList and UDLFileName properties
9 times out of 10 thats where the problem lies.
38 Summary
Service Connectors are an Abstract representation of a service
Use them to formally define interfaces between Plex and other applications
WCF is only the first implementation
others will follow!
WCF Supports C, Java, RPG400 and RPGIV Plex Functions
Services are the most convenient way for BPM tools to integrate applications into Business Processes
PowerShow.com is a leading presentation sharing website. It has millions of presentations already uploaded and available with 1,000s more being uploaded by its users every day. Whatever your area of interest, here you’ll be able to find and view presentations you’ll love and possibly download. And, best of all, it is completely free and easy to use.
You might even have a presentation you’d like to share with others. If so, just upload it to PowerShow.com. We’ll convert it to an HTML5 slideshow that includes all the media types you’ve already added: audio, video, music, pictures, animations and transition effects. Then you can share it with your target audience as well as PowerShow.com’s millions of monthly visitors. And, again, it’s all free.
About the Developers
PowerShow.com is brought to you by CrystalGraphics, the award-winning developer and market-leading publisher of rich-media enhancement products for presentations. Our product offerings include millions of PowerPoint templates, diagrams, animated 3D characters and more.