Hello world!
August 5, 2007 at 2:52 pm | In bpel, code, helloworld | Leave a CommentReusability lies at the core of BPEL and WS(web-services) technologies. Taking that philosophy ahead I use this auto generated post to showcase the first lesson of the bpel kindergarten.
<!-- HelloWorld BPEL Process -->
<process name="HelloWorld"
targetNamespace="http://samples.wspel.wordpress.com/helloworld"
suppressJoinFailure="yes"
xmlns:tns="http://samples.wspel.wordpress.com/helloworld"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
>
<!-- List of services participating in this BPEL process -->
<partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information associated
with the client role are automatically set using WS-Addressing.
-->
<partnerLink name="client"
partnerLinkType="tns:HelloWorld"
myRole="HelloWorldProvider"
partnerRole="HelloWorldRequester"
/>
</partnerLinks>
<!-- List of messages and XML documents used as part of this
BPEL process
-->
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="input"
messageType="tns:HelloWorldRequestMessage"/>
<!-- Reference to the message that will be sent back to the
requestor during callback
-->
<variable name="output"
messageType="tns:HelloWorldResultMessage"/>
</variables>
<!-- Orchestration Logic -->
<sequence>
<!-- Receive input from requestor.
Note: This maps to operation defined in HelloWorld.wsdl
-->
<receive name="receiveInput" partnerLink="client"
portType="tns:HelloWorld"
operation="initiate" variable="input"
createInstance="yes"/>
<!-- Generate content of output message based on the content of the
input message.
-->
<assign>
<copy>
<from expression="concat('Hello ',bpws:getVariableData('input', 'payload','/tns:name'))"/>
<to variable="output" part="payload" query="/result"/>
</copy>
</assign>
<!-- Asynchronous callback to the requester.
Note: the callback location and correlation id is transparently handled
using WS-addressing.
-->
<invoke name="replyOutput"
partnerLink="client"
portType="tns:HelloWorldCallback"
operation="onResult"
inputVariable="output"
/>
</sequence>
</process>
I would rest the obligation of explaining it for a while. More to follow up with valuable code lines tips and tricks.
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.
