Monday, 19 March 2012

WS-BPEL 2.0 versus BPEL 1.0


The following list summarizes the major changes the Committee incorporated in WS-BPEL 2.0.

Data Access
·         Variables can be declared using XML schema complex types
·         XPath expressions are simplified by using the ‘$’ notation for variable access, for example, $myMsgVar.part1/po:poLine[@lineNo=3]
·         Access to WSDL messages has been simplified by mapping directly mapping WSDL message parts to XML schema element/type variables
·         Several clarifications have been added to the description of the <assign> activity’s <copy> semantics
·         The keepSrcElementName option has been added to <copy> in order to support XSD substitution groups or choices
·         The ignoreMissingFromData has been added to automatically some of <copy> operation, when the from data is missing.
·         An extension operation has been added to the <assign> activity
·         A standardized XSLT 1.0 function has been added to XPath expressions
·         The ability to validate XML data has been added, both as an option of the <assign> activity and as a new <validate> activity
·         Variable initialization as part the of variable declaration has been added

Scope Model
·         New scope snapshot semantics have been defined
·         Fault handling during compensation has been clarified
·         The interaction between scope isolation and control links have been clarified
·         Enrichment of fault catching model
·         A <rethrow> activity has been added to fault handlers
·         The <terminationHandler> has been added to scopes
·         The exitOnStandardFault option has been added to processes and scopes

Message Operations
·         The join option has been added to correlation sets in order to allow multiple participants to rendezvous at the same process with a deterministic order
·         Partner link can now be declared local to a scope
·         The initializePartnerRole option has been added to specify whether an endpoint reference must be bound to a partner link during deployment
·         The messageExchange construct has been added to pair up concurrent <receive> and <reply> activities

New Activities
·         Added serial and parallel <forEach> with optional completion condition
·         Added <repeatUntil>
·         Added new extension activity
·         Changed <switch> to <if>-<elseif>-<else>
·         Changed <terminate> to <exit>
·         Differentiate different cases of <compensate> by renaming them to <compensate> and <compensateScope>

Miscellaneous Changes
·         Added repeatEvery alarm feature to event handlers
·         Clarified resources resolution (e.g. variable, partner link) for event handlers
·         Added formal <documentation> support
·         Added extension namespace declarations in order to specify what extension must be understood
·         Add <import> support to import WSDL and XSD formally

Abstract Processes
·         Clarified Abstract Process usage patterns
·         Introduced Abstract Profiles to address different needs in Abstract Processes, and two profiles “Observable Behavior” and “Process Template” listed in the specification

Difference between ASYNC , SYNC & One way BPEL


The difference between the Synchronous and Asynchronous process remains in the .bpel , .wsdl and composite.xml files only.
If we open the .bpel and .wsdl file of both the processes we do not find much difference in the two therefore it's very easy to convert an asynchronous process to synchronous one and vice-versa.

Composite.xml

SYNC: In service part  only interface.wsdl & binding.ws will be there
ASYNC: in service part interface.wsdl & binding.ws and one more callback binding.ws is there .
One Way:  In service part  only interface.wsdl & binding.ws will be there(Same as Sync)


In .BPEL FILE
SYNC: In Partner Link name, partnerLinkType, MyRole will be  there .
ASYNC: In partner Link name ,partnerLinkType,MyRole,Partner Role also will be there.
One WayIn Partner Link name, partnerLinkType, MyRole will be  there .(Same as Sync) 

.WSDL File
SYNC: In portType  Input & Output both are there , in partnerLinkType only one role is there i.e Provider Role.
ASYNC: In portType only Input will there,in PartnerLinkType two roles will be there  ProviderRole n Requester Role.
One Way: In portType  Input & Output both are there , in partnerLinkType only one role is there i.e Requester Role no provider.

Also change the activity in the BPEL from Reply to Invoke at the end.


Converting Sync to Async

As mentioned above  the difference between the Synchronous and Asynchronous process remains in the .bpel and .wsdl files only.

If it is a Sync process it will be having only Myrole because only provider will be there but in Async partner role will be there along with Myrole bcz it will be having provider n requester as well.


.bpel changes

1.Add ParnerRole
2.In Receive change the operation name
3.In Reply change the reply name to call Back,port type call back,operation

Change the name attribute value from replyOutput to callbackClient.
Change the value of attribute portType from client:SyncProcess to client:SyncProcessCallback (or simply [processName]Callback ).
Change operation=”process” to operation=”onResult”.
Change the name of last attribute i.e. variable to inputvariable.


.wsdl chnages

1.port types 2 should be there

<portType name="SyncProcess">
<operation name="initiate">
<input message="client:SyncProcessRequestMessage" />
</operation>
</portType>

<portType name="SyncProcessCallback">
<operation name="onResult">
<input message="client:SyncProcessResponseMessage"/>
</operation>
</portType>

partnerLinkType:

<plnk:partnerLinkType name="SyncProcess">
  <plnk:role name="SyncProcessProvider">
   <plnk:portType name="client:SyncProcess"/>
  </plnk:role>
  <plnk:role name="SyncProcessRequester">
   <plnk:portType name="client:SyncProcessCallback"/>
  </plnk:role>
</plnk:partnerLinkType>



composite.xml changes

Add one more call back binding.ws as

<callback>
      <binding.ws port="http://xmlns.oracle.com/xxx/xxx/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1Callback_pt)"/>
    </callback>


In Brief:-

In .Bpel

1.Add partner role
2.Receive changes
3.Reply changes

.wsdl file

1.porttypes change
2.partnerlink type changes

Composite.xml changes

1.add one extra binding.ws thats it.

WOW.Done. Your Bpel Process is now Async...


Async to Sync conversion  you can do it now :-)

Thanks for reading....

Friday, 9 March 2012

How to setup MetaData Store (MDS) for Weblogic 11g in Jdeveloper




SOA Suite 11g has a provision for sharing SOA artifacts through MDS – Meta Data Store. This facilitates greater re-use of SOA artifacts such as XML Schemas, EBMs, WSDLs, Fault Policies, Rule repositories and Service Data Objects (SDOs) among others. MDS can be file-based or database-based. Here are the steps to create and use Databased and file-based MDS in JDeveloper.
MDS is created under <jdeveloper-home>/integration/seed directory. Default folder “soa” is used to store common system soa artifacts. All custom artifacts are supposed to be stored under a folder called “apps”, since this folder already exists in server.
Create directory structure under apps folder. In my case, I’ve created folder structure ../apps/cosdeaia/ApplicationConnectorServiceLibrary to store XML schema files. This ideally should match your schema structure.
1. First you go to your local 11g Jdeveloper installation folder. In my case it is C:\JDEV_HOME11.1.1.3\jdeveloper\integration\ folder (if you have already applied third party plugin patch provided by oracle then you will see seed folder by default with all previous configuration done). If not create a seed folder under integration folder.
2. Now create folder with name apps under seed (remember to create folder with name apps else you might face issue this oracle documents say i didn’t try out).
3. Under apps you can create your folder structure to place all your XSD, WSDL files.
4. We can create a SOA_MDS connection in Jdeveloper as below .
New à Connections à SOA-MDS Connection





5. The SOA-MDS connection can be created in two ways. One is File Based MDS and other is Data Based MDS.

6. In Create SOA_MDS Connection window, select File Based MDS as Connection. Type for file based MDS connection, we will point to the local folder in our system ,where all the WSDL and XSD files are placed as shown below.





7. Click OK. Now the File Based MDS connection is created.
8. Lets see how to create DB based MDS connection. In Create SOA_MDS Connection window, select DB Based MDS as Connection Type for file based MDS connection.  



9. For DB Based MDS connection, we should have created all the schema for the weblogic in the database by running the Repository Creation Utility (RCU) wizard. After RCU execution, the DEV_MDS schema will get created in the database. We need to use the DEV_MDS schema connection and soa-infra as MDS Partition while creating the DB Based MDS connection as shown in the above screen shot.

10. Click OK. Now the DB Based MDS connection is created.

 11. So when we use the wsdl and xsd files in the project, they will be referred from the local system. But when we deploy the application into Weblogic server, the wsdl and xsd file references will be missing. To avoid this we need to use an Ant script and import all the WSDL and XSD files into Weblogic server.


12. You use common sca tool (common-sca-tools.xml) to do it and use Ant target nameimportCommonServiceArtifactsIntoMds from class files provided by oracle (MDSImportTask).
13. So whenever we made modifications or additions to the WSDL or XSD files, we need to update the Weblogic server. While update, by using an Ant script first delete all the files from Weblogic server and execute re-import Ant script the latest files into Weblogic server.
14. After Import into Weblogic server, you can use the wsdl and xsd files in your project by referring to the Weblogic server through SOA-MDS (Data Based MDS) connection type.But never Copy these files into your project while referring from Weblogic server. By copying this creates a mess in run time. For example while working you do some modifications in the local WSDL and XSD files and you will forgot to update these changes in to Weblogic server.
15. Whenever we refer the WSDL or XSD files from SOA-MDS (Data Based MDS) connection type, the location URL looks like oramds:/apps/cosdeaia/… (In my case the cosdeaia folder contains all my files…)
16. The new connection appears under the “Resource Pallette” window on right side of the Jdeveloper as shown below





Now you have created the MDS connection in JDeveloper. You can use in  your SOA Composites.

Tuesday, 6 March 2012

Service Oriented Architecture Concepts



XML,XSD,Xpath,Xslt
W/S, WSDL,SOAP        

Intro to SCA - Architecture
   . Logical
   . Physical
Intro to MDS (Mata Data Store)
Intro to Dehyderation Store


BPEL (Business Process Execution Language)
  *  Language Structure
        .  Partnerlinks
        .  Process
        .  scope, compensation block
        .  variables
        .  Sequence
        .  Activities
  
   *   SCA with Simple BPEL with request reply activities
   *   SCA with BPEL and reference
   *   Using assign activity
   *   Expressions
   *   Swithch/Case
   *   Looping
  
   *   Difference b/w Sync and Async BPEL

   *   Fault Handling
          .  Fault types
          .  BPEL System faults
          .  Creating and raising custom fault
          .  Creating fault in WSDL
          .  Catch all and catch specific fault
          .  Fault policy
               .  Human intervention action
               .  Retry action
               .  and introduction to Java actionand other remaining actions
          .  Fault binding
               .  Composite and component level
          .  Fault handling in Sync BPEL
          .  Fault handling in Async BPEL
          .  Industry Best practices


    *   Correlation
    *   Dynamic Partner link
    *   Parallel processing
    *   Working with preference properties
    *   Transaction Management
        .  Introduction 2-phase commit.
           XA (Global Transaction)
        .  Transactions in Sync BPEL / invokes
        .  Transactions in Async BPEL / invokes
        .  Transaction controlling properties
        .  Check point
        .  Roll back fault
        .  Industry best practices

    *   Compensation
        . Why compensation
        . How to compensate
        . Compensation block of scope
        . Compensating scope
        . Industry best practices

    *   Pick activity
        .  Pick
        .  On message
        .  On timer (SLA implementation)
        .  wait activity

    *   Working with email notifications
        . congifuguring email server
        . working with email notification activity

    *   Introduction to Adapters (JCA architecture)
    *   DB Adapter
        .  Introduction to DB adater
        .  Configuring Data source
        .  What is multi data source
        .  Configuring DBAdapter connection factory
        .  Performing CRUD (Create Read Update and Delete) on table
        .  Calling stored procedure
        .  Introduction to Wrapper packages
        .  Polling
             .  Delete and logical delete strategy
             .  Debatching
             .  fine tuning polling configuration
                  . Transaction management
                  . Tuning polling interval
        .  DB Adapter best practices
        .  Execute plain SQL statement
    *   Oracle Apps Adapter
        . Introduction to Apps adapter
        . Configuring Apps Adapter - CF
        . Introduction to Business events
        . Using business events
        . Introduction to XML Gateway
    *   JMS Adapter
        .  Introduction to JMS
        .  Configuring JMS Adapter
              .  Configuring persistent store
              .  Configuring JMS server
              .  Configure JMS Module
              .  Configure JMS Q CF
              .  Configure JmS Q
              .  Configure JMS topic
              .  Configuring JMSAdapter CF
        .  Introduction to JMS operations
        .  Publishing a message to JMS Q
        .  Consuming a message from JMS Q
        .  Introduction to Opaque Schema
    *   Introduction to AQ and MQ
    *   File Adapter
        . Introduction to file adapter
        . Native Schema
             . CSV (Comma seperated value)
             . Fixed length
             . Introduction to cobol copy book
        . Physical Directory & Logical directory
        . Writing to a file
        . Dynamic file name
        . Reading from a file
        . De batching
    *  Introduction to FTP

    *  Human Workflow
       . Introduction to HW
       . Configuring users and groups
       . Introduction to worklist app
       . Create simple Human approval task
       . Generate ADF screens for Human task
       . Deploying ADF application (Human Task)
       . Working with HT (Approve/reject and etc.,)

    *  Signal Concept in BPEL
       .  Understanding Master & worker BPEL processes
       .  Sending signal from Master BPEL
       .  Receiving signal in worker BPEL
       .  Sending signal from worker BPEL
       .  Receiving signal in master BPEL
       .  Best practices

    *  Mediator
       . Introduction to mediator
       . Working with routing rule
       . Working with filter condition

    *  Business Rules
       .  Introduction to business rules
       .  Working with Facts
       .  Working with Rules and rule sets
       .  Introduction to decission table
       .  BPEL to invoke BR
       .  Working with BR run time (SOA composer)
  
    *  EDN (Event Driven Network Model)
       .  Introduction to EDN
       .  Defining events
       .  Rasing event from Mediator
       .  Rasing event from BPEL
       .  Receiving event from BPEL
       .  Receiving event from Mediator

   *   Sensors
       .  Introduction to sensors
       .  Sensors at composite level
       .  Creating BPEL activity sensor
       .  Creating BPEL variable sensor
       .  Creating BPEL JMS sensor action
       .  Introduction to other sensor actions
       .  Industry best practices

   *   BAM (Business Activity Monitoring)
       .  Introduction to BAM
       .  Configuring BAM Adapter
       .  Using BAM console
           . Using Architect console to create BAM              
             objects
           . Using report console to create BAM               
             report
           . Using active viewer console to view              
             BAM Report
           . Using BAM adapter in BPEL to populate              
             BAM objects
           . Introduction / configure BAM message              
             source
           . Industry best practices

   * SOA Reference Architecture

   * Introduction to B2B

   * Intro to Web logic administration

   * Possible ways of deploying SCA

   * Introduction to customization of SCA      
     deployment (deployment migration)

UserWarning: MDS-91002: MDS Application runtime MBean for "soa-infra" is not available. "deleteMetadata" operation failure


You are trying to clean up the MDS using below steps:
  1. Execute SOA_HOME/common/bin/wlst.sh
  2. Connect to admin server by running connect()
  3. Enter the domain config by running domainConfig()
  4. Delete Metadata by running deleteMetadata('soa-infra', 'soa_server1','/apps/AIAMetaData/**')


You encounter below error:


UserWarning: MDS-91002: MDS Application runtime MBean for "soa-infra" is not available. "deleteMetadata" operation failure


The SOA Managed Server is up and so s the SOAINFRA. What could be the possible reason?


The reason for the above error is the name of the managed server used. In case your admin renamed the default managed server on which SOA is deployed (the default name is soa_server1) you would get the above stated error.


So in case you get the above error, check with your admin the name of the SOA managed server. So in case your SOA managed server name is SOA_MS_1, the MDS purge command would be as follows:


deleteMetadata('soa-infra', 'soa_ms_1','/apps/AIAMetaData/**')