Search This Blog

Wednesday, May 26, 2010

Converting Synchrous BPEL process to Asynchronous BPEL process in soa


This article is about how to convert a synchronous BPEL process to an asynchronous one.

Whenever we create new bpel process three files are created by default viz.

  • [processName].bpel
  • [processName].wsdl
  • bpel.xml

But the difference between the Synchronous and Asynchronous process remains in the .bpel and .wsdl 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.

For explaining how to convert the synchronous process to asynchronous one I have created a BPEL process SynchBP. I’ll be converting SynchBP which is a Synchronous BPEL process to an asynchronous one. As earlier said the difference is only in .bpel and .wsdl file so we'll concentrate only on these two files.

For ease of understanding I have used colours in the text so as to highlight what to change and what to add.

So, first start with SynchBP.bpel file.

There are three places where we have to make changes viz. partnerlink, receive, and reply element.

Partnerlink:

This is how the partnerlink element is of a SynchBP:

Add another attribute partnerRole="SynchBPRequester" to this element. The partnerlink will look like this:

partnerRole="SynchBPRequester"/>

Receive Element:

Below is the receive element of SynchBP

operation="process" variable="inputVariable"

createInstance="yes"/>

Change the value of attribute operation from process to initiate. The partnerlink will look like this:

operation="initiate" variable="inputVariable" createInstance="yes"/>

Reply element:

Below is the reply element of SynchBP

<reply name="replyOutput" partnerLink="client" portType="client:SynchBP" operation="process" variable="outputVariable"/>

Do the following changes to make it for asynchronous process:

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

<invoke name="callbackClient" partnerLink="client" portType="client:SynchBPCallback" operation="onResult" inputVariable="outputVariable"/>

Here we are done with SynchBP.bpel, now we need to edit SynchBP.wsdl.

There are very few changes to be made in the .wsdl file.

The elements that need to be changed are portType and partnerLinkType.

portType:

This is how a portType is defined in a synchronous process:

"process">

Create another portType element with name SynchronousProcessCallback and operation as onResult. Now delete the output element from both portTypes and in the SynchronousProcessCallback portType, change the attribute value from client:SynchBPRequestMessage to client:SynchBPResponseMessage. (Help: Copy & paste the already defined portType and do as below)

"initiate">

……Remove this

"onResult">

……. Remove this

<input message="client:SynchBPResponseMessage"/>

partnerLinkType:

This is how partnerlink information is provided in a wsdl of a synchronous process:

Inside partnerLinkType create one more role element and give it a name as SynchronousProcessRequester. Now inside the role element for portType element change the value of name attribute to client:SynchronousProcessCallback.

Here we are done with .wsdl file and the SynchBP process is now an asynchronous BPEL Process.

Monday, May 3, 2010

Usefull RUN commands!!!




Accessibility Controls - access.cpl
Add Hardware Wizard - hdwwiz.cpl
Add/Remove Programs - appwiz.cpl
Administrative Tools - control admintools
Automatic Updates - wuaucpl.cpl
Bluetooth Transfer Wizard - fsquirt
Calculator - calc
Certificate Manager - certmgr.msc
Character Map - charmap
Check Disk Utility - chkdsk
Clipboard Viewer - clipbrd
Command Prompt - cmd
Component Services - dcomcnfg
Computer Management - compmgmt.msc
Date and Time Properties - timedate.cpl
DDE Shares - ddeshare
Device Manager - devmgmt.msc
Direct X Control Panel (If Installed)* - directx.cpl
Direct X Troubleshooter - dxdiag
Disk Cleanup Utility - cleanmgr
Disk Defragment - dfrg.msc
Disk Management - diskmgmt.msc
Disk Partition Manager - diskpart
Display Properties - control desktop
Display Properties - desk.cpl
Display Properties (w/Appearance Tab Preselected) - control color
Dr. Watson System Troubleshooting Utility - drwtsn32
Driver Verifier Utility - verifier
Event Viewer - eventvwr.msc
File Signature Verification Tool - sigverif
Findfast - findfast.cpl
Folders Properties - control folders
Fonts - control fonts
Fonts Folder - fonts
Free Cell Card Game - freecell
Game Controllers - joy.cpl
Group Policy Editor (XP Prof) - gpedit.msc
Hearts Card Game - mshearts
Iexpress Wizard - iexpress
Indexing Service - ciadv.msc
Internet Properties - inetcpl.cpl
IP Configuration (Display Connection Configuration) - ipconfig /all
IP Configuration (Display DNS Cache Contents) - ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) - ipconfig /flushdns
IP Configuration (Release All Connections) - ipconfig /release
IP Configuration (Renew All Connections) - ipconfig /renew
IP Configuration (Refreshes DHCP & Re - Registers DNS) – ipcon

IP Configuration (Display DHCP Class ID) - ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) - ipconfig /setclassid
Java Control Panel (If Installed) - jpicpl32.cpl
Java Control Panel (If Installed) - javaws
Keyboard Properties - control keyboard
Local Security Settings - secpol.msc
Local Users and Groups - lusrmgr.msc
Logs You Out Of Windows - logoff
Microsoft Chat - winchat
Minesweeper Game - winmine
Mouse Properties - control mouse
Mouse Properties - main.cpl
Network Connections - control netconnections
Network Connections - ncpa.cpl
Network Setup Wizard - netsetup.cpl
Notepad - notepad
Nview Desktop Manager (If Installed) - nvtuicpl.cpl
Object Packager - packager
ODBC Data Source Administrator - odbccp32.cpl
On Screen Keyboard - osk
Opens AC3 Filter (If Installed) - ac3filter.cpl
Password Properties - password.cpl
Performance Monitor - perfmon.msc
Performance Monitor - perfmon
Phone and Modem Options - telephon.cpl
Power Configuration - powercfg.cpl
Printers and Faxes - control printers
Printers Folder - printers
Private Character Editor - eudcedit
Quicktime (If Installed) - QuickTime.cpl
Regional Settings - intl.cpl
Registry Editor - regedit
Registry Editor - regedit32
Remote Desktop - mstsc
Removable Storage - ntmsmgr.msc
Removable Storage Operator Requests - ntmsoprq.msc
Resultant Set of Policy (XP Prof) - rsop.msc
Scanners and Cameras - sticpl.cpl
Scheduled Tasks - control schedtasks
Security Center - wscui.cpl
Services - services.msc
Shared Folders - fsmgmt.msc
Shuts Down Windows - shutdown
Sounds and Audio - mmsys.cpl
Spider Solitare Card Game - spider
SQL Client Configuration - cliconfg
System Configuration Editor - sysedit
System Configuration Utility - msconfig
System File Checker Utility (Scan Immediately) - sfc /scannow
System File Checker Utility (Scan Once At Next Boot) - sfc /scanonce
System File Checker Utility (Scan On Every Boot) - sfc /scanboot
System File Checker Utility (Return to Default Setting) - sfc /revert
System

System File Checker Utility (Purge File Cache) - sfc /purgecache
System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x
System Properties - sysdm.cpl
Task Manager - taskmgr
Telnet Client - telnet
User Account Management - nusrmgr.cpl
Utility Manager - utilman
Windows Firewall - firewall.cpl
Windows Magnifier - magnify
Windows Management Infrastructure - wmimgmt.msc
Windows System Security Tool - syskey
Windows Update Launches - wupdmgr
Windows XP Tour Wizard - tourstart
Wordpad - write