Showing posts with label BPM. Show all posts
Showing posts with label BPM. Show all posts

Thursday, March 26, 2009

SOA for Business Developer

SOA for Business
•Open Standards
•Structure of a SOA Application – composed largely of services (Integration Services, Business Services, Data-Access Services)
•Web and Binary-Exchange Services – WSDL, SOAP, HTTP
•Presentation Services – Portlet, HTML,
•Runtime Products – security, service allocation, service composition, logging

•Loose Coupling
•Service Registry
•Service Level Agreements

Service Aspects
•Service Implementation - Logic
•Elementary access details – Location, binding, protocol, formatting
•Contract – interface and Quality of Service

Message Exchange Patterns
•One-way pattern – (fire-and-forget)
•Request-response pattern – (in-out)
•Notification pattern – (out-only)
•Solicit-response pattern – (out-in)
•Synchronous and Asynchronous Communication
•Callbacks – (Request and callback)

Quality of Service
•Reliability guarantees- availability, throughput, response time and probability, assured message
•Security mechanisms – Authentication, authorization, confidentiality, integrity, non-repudiation, attack protection
•Service coordination, including transaction control – Orchestration, Choreography
•Runtime update of address, binding, and message content – flow of traffic change, message reformat, send message to destination other than the requester

Process Steps
•Analyzing a Business Process
•Identifying Problems with current Process
•Communicating the Assumptions in Writing
•Isolating Services
•Creating the application

XML Schema
•Data Type – primitive, derived, simple, complex
•Purposes – data exchange, validation rules
•Groups, Sequencing,

SOA Standards
•WSDL
•SOAP
•UDDI










Introduction to BPEL
•BPEL process fulfills a workflow by accessing one service after another (partner service)
•BPEL activity is equivalent to a function call
•Running time can be far longer than other kinds of software
•Mechanisms for fault handling, compensation, correlation
•BPEL abstract process – subset of BPEL executable process (no implementation)

Additional language used by BPEL
•Query Language – XPath
•Expression language – XPath, Java
•doXslTransform
•Can use WSDL as source of data types
•PartnerLinkType (WSDL) – runtime conversation to partner service

BPEL Basics
•Activities– assign,compensate,compensateScope, empty, exit, extensionActivity, invoke, receive, reply, rethrow, throw, validate, wait
• An XML-base language for creating a process
•1. Accept a request for an insurance quote
•2. If the submitted details are appropriate, calculate the quote and include it in the response
•3. Otherwise, say “No” and include a justfication














BPEL - Partner Links
•Give details on the relationship between the BPEL process and each partner service
<partnerlinks>
<partnerlink name="ProcessQuote" partnerlinktype="ProcessQuotePLT" myrole="ProcessQuoteRole">
<partnerlink name="mainframeQuoteMgr" partnerrole="partnerRole" partnerlinktype="PartnerLinkPLT">
</partnerlinks>

BPEL - Variables
•assigns variables, which are memory areas that are each described by a Web Services Description Language (WSDL) message but could have been described by an XML Schema element or type

<variables>
<variable name="quoteRequest" messageType="placeQuoteRequestMsg" />
<variable name="highlightQuote" messageType="placeQuoteResponseMsg" />
<variable name="buildQuoteReq" messageType="buildQuoteRequestMsg" />
<variable name="newHighlightQuote" messageType="buildQuoteResponseMsg" />
</variables>

BPEL - Quote Request
receives a quote request
<receive name="processQuoteRequest" createInstance="yes" operation="placeQuote" partnerLink="ProcessQuote"
portType="ProcessQuote" variable="quoteRequest">
</receive>

BPEL - Copy Data
uses XPath syntax to copy data from the received message to a variable that is used for invoking another service
<assign name="AssignQuoteReq"> <copy>
<from variable="quoteRequest" part="placeQuoteParameters"> <query>/quoteInformation</query> </from>
<to variable="buildQuoteReq" part="buildQuoteParameters"> <query>/customerQuoteInfo</query></to>
</copy> </assign>

BPEL - Other Service
•invokes the other service, which calculates and returns a quote
<invoke name="CalculateQuote" inputVariable="buildQuoteReq" operation="buildQuote" outputVariable="newHighlightQuote" partnerLink="mainframeQuoteMgr" portType="QuoteManagement" />

BPEL - Copy to response
copies the quote details to another variable and in this way formats the response message
<assign name="AssignQuoteRes"> <copy>
<from variable="newHighlightQuote" part="buildQuoteResult"> <query>/quote</query> </from>
<to variable="highlightQuote" part="placeQuoteResult" > <query>/quote</query> </to>
</copy> </assign>



BPEL - Reply
•replies to the invoker, which may have been a Web application or a service

<reply name="processQuoteResponse" operation="placeQuote" partnerLink="ProcessQuote" portType="ProcessQuote" variable="highlightQuote" />

BPEL – General activities
•Run in a preset sequence
•Run in a loop
•Run on condition that a Boolean expression evaluates to true
•Run immediately or wait for some period of time, even years
•Run in response to an event that occurs after the process starts (specifically, in response to an inbound message, a calendar date and clock time, or the passing of time)
•Run in an order that differs for different instances of the same process



BPEL – Processes
•BPEL executable process – a Web service and acts as the hub in a service orchestration
•Software that runs an executable process is called a BPEL engine
•BPEL abstract process – similar to BPEL executable process but includes a subset of the information. It is a description of business logic, it omits implementation details in most cases

BPEL – WSDL
•PartnerLinkType – specifies the roles between the BPEL process and a partner service. (BPEL, WSDL)

•Port Type – WSDL
•Operations – WSDL
•Data types – XSD

BPEL – WSDL-based constructs
•Properties and property aliases benefits
•Use same name to access the same data in differently structured variables
•Name’s position change doesn’t necessarily change the logic in BPEL process
•BPEL correlation set (constants). Help direct an inbound message to the correct instance of BPEL process

BPEL – Process Elements
<process>
<import> </import>
<partnerLinks> </partnerLinks>
<messageExchanges> </messageExchanges>
<variables> </variables>
<correlationSets> </correlationSets>
<faultHandlers> </faultHandlers>
<eventHandlers> </eventHandlers>
<!— The previous two elements include activities, as does the subsequent content of the process element. Activities can be enclosed in scopes, as described later. —>
</process>

BPEL – File Structure
•Import - provides access to a WSDL definition or an XML Schema
•Partner link - is a kind of specialized variable that describes the relationship between the BPEL process and a partner service
•Message exchange - is an idnetifier that is used to avoid an ambiguous case in a complex usiness scenario – specifically, to pair a BPEL activity that receives a message with the activity that issues a reply
•Variable - contains business data (message, process logic)
•Correlation set – listing of properties used to correlate service instances
•Fault handler – a set of activities that run in response to a fault (failure in the process)
•Event handler – a set of activities that run concurrently with other activities, in response either to the passage of time or to receipt of a message

















BPEL – Partner Link
•myRole – enacted by the BPEL process
•Operations are described in port type that is related to the role.
•partnerRole – enacted by the partner service
•Multiple partner links can be based on the same partner link type.

BPEL – Correlation Sets
•Maintain data integrity
•A list of propertirs whose values are expected to remain constant throughout a process or throughout a specific scope
•Reference only in activities that receive or transmit data
•Inbound activity – BPEL engine to direct msg
•Outbound activity – verify property values
•Inboundor outbound – initiates the correlation set

BPEL – Fault Handling
•Purpose – minimize the effect of an error
•Composed of a catch or optional catchAll
•Each fault handler hasselection criteria, which include (optionally) the fault name and the type of data
•BPEL engine selects the fault handler whose selection criteria most closely mirror the fault
•If the fault has a name but no data, BPEL engine selects the fault handler whose selection criteria match exactly
•If no catchAll, BPEL provides default:
<catchAll>
<sequence>
<compensate/>
<rethrow/>
</sequence>
</catchAll>

BPEL – Compensation Handling
•Compensation for a successfully completed scope occurs under the guidance of a compensation handler
•Invocation always comes from a parent scope
•The compensateScope activity invodes the compensation handler of a specific nested scope
•A failure in scope A causes invocation of the compensation handler in scope B:
<scope name="A">
<compensationHandler>
<compensateScope target="B">
</compensationHandler>
<scope name="B">
<compensationHandler>
<!— a basic or structured activity is here —>
</compensationHandler>
</scope>
</scope>

BPEL – Termination Handling
•Set of activities that are issues when a running scope is being forced to terminate
•Default
<terminationHandler >
<compensate/>
</terminationHandler>

BPEL - Concurrency
Synchronized - Activities run concurrently and one activity is forced to wait for another

BPEL Activity – Start
•First activity (other than flow, scope or sequence)
•1. a receive activity
•2. a pick activity that contains only onMessage events

Service Oriented Enterprise (SOA)

Technical Foundation
1. ESB
2. Organizational Commitment to BPM
3. Enterprise Performance Management (EPM)

Three essential layers
1. Enterprise performance layer
2. Business process management layer
3. Service Oriented Architecture infrastructure

EPM - Focuses on specifying the strategic key performance indicators of the service enterprise and typing these to underlying business processes and policies
BPM – Utilize the infrastructure services provided b y service oriented architecture
ESB – Provides a common standards services-based brokering container

BPM
- Bring IT and businesses together and narrow, and sometimes eliminate, the IT-business divide.
- Allow enterprises to separate business processes and business rules to model and to manage them independently of applications

Three layers of service oriented enterprises
- Service Performance (Enterprise Performance Management)
- Service Integration (Business Process Management)
- IT Service Infrastructure (Service Oriented Architecture)
- Process-Oriented Culture (In service oriented enterprises products are processes)

What are strategies?
- Mission: A concise statement of the organization’s reason for existing
- Objectives: Broad statements describing the targeted direction
- Goals: Quantifications of objectives for a designated period of time
- Strategies: Statements of how objectives will be achieved and the major methods to be used
- Tactics: Specific action steps that map out how each strategy will be implemented
- KPIs: Measures of performance that show progress of each tactic in reaching the goals

Three Phases of SOEs
Phase 1: Point-to-point Enterprise Integration Focused (WSDL + SOAP)
Phase 2: Orchestration ESB, BPMS, Public Service Interface, Initial OoS Focus: WS-Security and Reliability, Initial Service Mgmt, Robust UDDI Deployments
Phase 3: Federated ESBs/BPMSs, Performance Mgmt of Service Application, End ot End Service Integration, B2B Process, Dynamic Discovery and Binding, Software as Service

Process Standardization
Notation – UML: OMG; BPMN: OMG
Process Definition / Execution – BPEL: OASIS; XPDL: WfMC; WS-CDL: W3C; ebXML BPSS; RosettaNet RNIF
Process Engine / Interoperability – Wf-XML: WfMC; BPSI: OMG


Business Process Management – Business process activity monitoring and performance capabilities
Business Performance Management- addition include monitoring and analysis of applications (BP, ERP, CRM, ect)

Wednesday, March 25, 2009

WS-BPEL 2.0

•WS-BPEL: XML based programming language to describe high level business processes
•Web Service: using Web Service Description Language (WSDL)

BPEL Servers and Engine
•Create on demand
•BPEL engine: Focus to act as an execution engine which can be programmed using BPEL

BPEL Programming Language
•Programming logic – BPEL
•Data Types – XSD (XML Schema Definition)
•Input/Output (I/O) – WSDL (Web Services Description Language)

http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:print="http://www.eclipse.org/wsws/choreography/2004/engine/Print">

http://schemas.xmlsoap.org/wsdl/" location="../../test_bucket/service_libraries/wsws_EnginePrinterPort.wsdl" namespace="http://www.eclipse.org/wsws/choreography/2004/engine/Print" /> Hello World $hello_world.value

Importing WSDL and XSD files
•The 'import' statement in BPEL is a directive to import a WSDL or XSD file. Importing XSD files allows commonly used datatypes or datatypes required for a particular endpoint (thing that you speak to) to be defined in a file separate to the BPEL file. Importing WSDL files allows endpoint descriptions (definitions of things that you speak to) to be defined in files separate to the BPEL file.

Partner Link
•Partner Links can be thought of as placeholders for things that you actually speak to. A web service is described in full by the WSDL files that specify it but Partner Links allow you to have something like an instance of the web service that you speak to. A partner link basically maps to a WSDL web service 'portType', so one partnerLink (e.g. 'printService' above) maps to a single web service.
•However, partner links don't just describe what you speak to, they also can describe how other web service clients speak to you. In the partner link definition above, a 'partnerRole' attribute defines the web service that this BPEL process will speak to. Alternatively, the partner link could have a 'myRole' attribute which would define a web service that this BPEL process implements.
Variable definition
•Variables are used to contain data in BPEL. A variable can either contain an XSD value or a WSDL message. In the example above, a variable called 'hello_world' is declared as a container for WSDL messages of type 'print:PrintMessage'. Instead of the 'messageType' attribute, the variable could have had a 'type' attribute which would specify some xsd simple or complex type like 'xsd:string' or 'xsd:integer'.
•Variables are used to pass data in and out of web service endpoints.

Variable assignment
•Variables are manipulated in BPEL either through use via web service endpoints or by assignment. The example above shows a literal string value being assigned into the variable 'hello_world'. The variable 'hello_world' in this case is a WSDL message with a part called 'value'. The part called 'value' is an 'xsd:string' type. It can therefore have other 'xsd:string's assigned into it, including literal strings.
•The '$varname' syntax used to reference the variable here is standard XPATH expression syntax. The '.' separator is used to specify the WSDL message part. If the variable or the part were an XSD complex type then a '/' separator could be used to specify the sub-element within the complex type (e.g. '$hello_world.value/subvalue').

Web Service Invocation
•The 'invoke' activity in BPEL invokes a web service endpoint. This is where the BPEL process passes the 'Hello World' data (stored in the 'hello_world' variable) to the 'print' web service. The specified partnerLink tells the BPEL engine the address of the web service you want to invoke here. The 'print' operation specifies what you actually want the web service to do and the 'inputVariable' specifies that the input WSDL message should come from the 'hello_world' variable.
•What the web service actually does and exactly how the web service is implemented is not referenced in BPEL at all - all the implementation and definition information is contained within the defining WSDL file.

Web Service (in Java) - WSDL
http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.eclipse.org/wsws/choreography/2004/engine/Print" xmlns:tns="http://www.eclipse.org/wsws/choreography/2004/engine/Print" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/" xmlns:java="http://schemas.xmlsoap.org/wsdl/java/" >

WSDL Messages
•WSDL messages are used to specify what the containers should be like that hold data when a WSDL operation is invoked. They are essentially lists of parts, each of which is an XSD simple or complex type.
•In the example above the 'PrintMessage' is defined as having a single part 'value', which is of type 'xsd:string'.

WSDL Port Types
•WSDL Port Types represent the definition of the web service itself. They describe the API or interface to the web service. A port type is a list of operations with 'input's and 'output's. Each of the 'input's and 'output's is a WSDL message that must have been previously defined (although it could have been imported from another WSDL file).
•A WSDL port type operation can also have any number of 'fault' elements. Each of these specifies an error message which would be an alternative to the 'output' message.
•Note that the name specified on the port type does not have any namespace prefix. This is because the port type is being defined here and now and it will inherit the target namespace. The 'printMessage' specified in the operation definition however DOES have a namespace prefix. This is because the printMessage has previously been defined and is being referenced. The 'tns:' prefix maps to the same namespace as the target namespace in the previously defined 'printMessage' message.

WSDL Port Type Bindings
•A 'binding' in WSDL specifies how the web service is actually implemented. Everything up until this point has been abstract and has dealt with only how to speak to the web service. The binding specifies what is on the other side that you are speaking to.
•A web service can be bound in many different ways. The most common bindings for a web service are: oas a SOAP/HTTP web service - whereby some implementation would be listening on a specified port and would accept SOAP messages over an HTTP transport. oas a Java web service - whereby some java class is mapped to the port type and is used directly as an implementation.
•In the binding above, a mapping has been created which specifies that the port type operation 'print' should be mapped to a Java method called 'print'. In addition to this, the XSD type 'string' has been mapped to the Java type 'String'.
•Using this mapping information a Java class can be specified later in the WSDL file as the 'address' of a concrete web service implementation. This class can be instantiated and when calls are made to the 'print' operation, they will be proxied to the 'print' method of this class. In the process of proxying the 'print' operation, any XSD strings will also be converted to Java strings as specified in the binding.

WSDL Service
•The WSDL 'service' element specifies a WSDL 'port'. A single port is an instance of a web service, which is implemented via a particular binding and which is available at a given address.
•In the case of our printout port, we are defining a web service which is bound using the previously defined Java binding and which can be found at the address 'org.eclipse...EnginePrinterPort‘.
•Note that the address is binding specific. The Java binding knows to interpret the 'className' attribute as a fully qualified Java class name and understands how to instantiate the class and proxy the WSDL operations to the Java methods specified in the 'binding' element.

Partner Link Types
•Partner Link Types are actually not a WSDL construct, but a BPEL construct. WSDL was around before BPEL and is purely designed towards describing web services. BPEL however requires that a partner link instance be associated with a particular WSDL port type. In this case there is only one end of the partner link which needs to be implemented - the 'printService' role. It is possible to have two roles in a single partner link type, each of which can be implemented by two communicating web services.
•The BPEL partnerLink definition specified a partner link type for the partner link and also either a 'myRole' or a 'partnerRole'. In our previous example the 'partnerRole' was defined as 'printService'. This is because the BPEL process will be speaking TO the 'printService', rather than acting as a 'printService' which other web clients can speak to (in that case the 'myRole' part of the partner link would have been defined).

Java Web Service Implementation
package org.eclipse.wsws.choreography.jengine.internal.extensions.wsdlbinding.wsif.ports; public class EnginePrinterPort { public void print(String s) { System.out.println(s); } }

The Java class specified in the WSDL 'service' element is the Java class that the BPEL engine will expect to find at runtime. We therefore need to create that java class and fill it with any methods that we specified mappings to in the WSDL 'binding' element (e.g. the 'print' method).

Deploying web service
•Once you have your BPEL file using the WSDL web service description you created and you have your compiled Java class that implements the web service you need to put it all together.
•The quickest and easiest way to do this is to use the 'Dependencies' tab in the Choreography launch configuration.
•Set up a launch configuration to run your Hello World BPEL file and then click on the 'Dependencies' tab. In here you can tell the engine which JARs are required for any user-provided java endpoints. Just click 'Add' and then choose the JAR containing your Hello World Java web service implementation. You should see the JAR show up in the table and you should ensure that the JAR is set to 'enabled'.
•Once you've added the dependency, just run the launch configuration. If you're running a distributed engine the engine will automatically pass the dependency JAR around for use on remote engines (engines on other host machines).

Redistributable Java Endpoint Deployment (Deploying as an Eclipse Plugin)
•If you want to write a Java web service implementation or build up a library of useful services that you want to be able to distribute or send to other people then you can expose dependencies via the Eclipse Extension Point mechanism.
•Just extend the extension point 'org.eclipse.wsws.choreography.internal_WSDLPortDependency' and add a reference to your JAR. The 'namespace' attributes specify which namespaces your JAR is required for. If any of the specified namespaces are used your JAR will be passed round the engine in anticipation of use by the BPEL program.

http://www.eclipse.org/wsws/choreography/2004/engine" />

Wednesday, March 18, 2009

SAP BPM

Process Integration Challenges
- System Landscapes – Separate business units with independent IT systems in heterogeneous landscapes
- End-User Integration – Role-based access to actions (tasks) and interaction (collaborative processes)
- Enterprise Application Integration – Interacting business applications within and across enterprise boundaries
- B2B Integration – Interacting organizations, business partners, customers, vendors, and suppliers across the value chain

BPM Components for modeling and implementation
- ARIS Process Modeling – Company value chain; Process design and analysis; SAP Reference processes - Service Infrastructure
– BPM operational services; Solution monitoring; Service level reporting; SAP process content - Process Integration
– Model and execute automated processes across and within applications; SAP and non-SAP process integration content
- SAP Applications – Components; Composites; Engines; Business objects BPM Components

BPM Components
















ARIS House
- Organizational units/Organizational chart
- Data/Technical terms model
- Function/Function tree
- Control/Process
- Output (Product/Service)/Product tree

ARIS Modeling Levels
- Overview models
- Rough models
- Detail models















SAP Solution Manager Functions












SAP Business Workflow













SAP Workflow Architecture













ccBPM Architecture: Relationship Among Objects













- Business Process Engine located in Integration Server executes the integration processes
- Design Time - (Integration Builder)
- Runtime – (Integration Server)


ccBPM Integration in SAP Exchange Infrastructure