As the name suggests a Synchronous and Asynchronous BPEL(Business Process Execution Language) process can be defined based on their operational behavior.
If Triggering point of a BPEL process waits until a response returns from the same, then it can be recognized as Synchronous in behavior and if it continues with next set of operation then the process is asynchronous.
Now we can trill down bit for its architectural differences. Each and every BPEL process irrespective of Sync or Async can be exposed as an external Web Service which can be defined by Web Service Description Language (WSDL).
Two Port Type:Asynchronous BPEL process is having two Port Types and each of them supports single operation. According to the figure SampleAsyncBpel process WSDL is having onePortTypenamed "SampleAsyncBpel" which supports operation "process". Operation Process is having one input message named "SampleAsyncBpelRequestMessage".
Another PortType is "SampleAsyncBpelCallback" supports operation processResponse which is having input message named "SampleAsyncBpelResponseMessage".
Two Partner Link Role:SampleAsyncBpel partnerLinkType binds the provider and requester roles into an asynchronous conversation. Each role corresponds to a single port type.
Provider role uses "SampleAsyncBpel" port type where as Requester role uses "SampleAsyncBpelCallback" port type.
Now how these matter in BPEL Process:
Partner Link in BPEL process accepts both provider and requester role.The name is given in BPEL itself but the type is referring from WSDL file. Provider role from WSDL is mapped to myRole attribute and requester role from WSDL is mapped to partnerRole attribute.
<partnerLivk name="sampleasyncbpel_client" partnerLinkType="client:SampleAsyncBpel"myRole="SampleAsyncBpelProvider" partnerRole="SampleAsyncBpelRequester"/>Receive activity is gateway for every BPEL process and uses portType corresponds to provider role. <receive name=receive_input partnerLink="sampleAsyncBpel_client"portType="client:sampleAsyncBpel" [uses provider role in wsdl] operation="process"variable="inoutVariable" createInstance="yes"/> callback activity only occurs in asynchronous BPEL process
<invoke name="callbackClient"
partnerLink="sampleasyncbpel_client"
portType="client:SampleAsyncBpelCallback"
operation="processResponse"
inputVariable="outputVariable"/> How it differs from a Synchronous BPEL processSingle PortType and partnerLinkType instead of two.In asynchronous BPEL process two portTypes are defined and each portType corresponds to a single operation but in synchronous BPEL process we can see Single portType is defined with single operation.
According to above picture SampleSyncBpel supports single operation named "Process" and it is having one request message and one response message.
<wsdl:portType
name="SampleSyncBpel">
<wsdl:operation name="process">
<wsdl:input message="client:SampleSyncBpelRequestMessage" />
<wsdl:output message="client:SampleSyncBpelResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
Synchronous BPEL process WSDL is having single partnerLinkType instead of two. And it supports only Provider role [no requester role as Asynchronous] which uses portType defined above.
<partnerLink
name="samplesyncbpel_client"
partnerLinkType="client:SampleSyncBpel"
myRole="SampleSyncBpelProvider"/>
synchronous BPEL process has one reply activity instead of callback.<reply name="replyOutput"
partnerLink="samplesyncbpel_client"
portType="client:SampleSyncBpel"
operation="process"
variable="outputVariable"/>
If Triggering point of a BPEL process waits until a response returns from the same, then it can be recognized as Synchronous in behavior and if it continues with next set of operation then the process is asynchronous.
Now we can trill down bit for its architectural differences. Each and every BPEL process irrespective of Sync or Async can be exposed as an external Web Service which can be defined by Web Service Description Language (WSDL).
Two Port Type:Asynchronous BPEL process is having two Port Types and each of them supports single operation. According to the figure SampleAsyncBpel process WSDL is having onePortTypenamed "SampleAsyncBpel" which supports operation "process". Operation Process is having one input message named "SampleAsyncBpelRequestMessage".
Another PortType is "SampleAsyncBpelCallback" supports operation processResponse which is having input message named "SampleAsyncBpelResponseMessage".
Two Partner Link Role:SampleAsyncBpel partnerLinkType binds the provider and requester roles into an asynchronous conversation. Each role corresponds to a single port type.
Provider role uses "SampleAsyncBpel" port type where as Requester role uses "SampleAsyncBpelCallback" port type.
Now how these matter in BPEL Process:
Partner Link in BPEL process accepts both provider and requester role.The name is given in BPEL itself but the type is referring from WSDL file. Provider role from WSDL is mapped to myRole attribute and requester role from WSDL is mapped to partnerRole attribute.
<partnerLivk
<invoke name="callbackClient"
portType="client:SampleAsyncBpelCallback"
operation="processResponse"
inputVariable="outputVariable"/>
According to above picture SampleSyncBpel supports single operation named "Process" and it is having one request message and one response message.
<wsdl:portType
name="SampleSyncBpel">
<wsdl:operation name="process">
<wsdl:input message="client:SampleSyncBpelRequestMessage" />
<wsdl:output message="client:SampleSyncBpelResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
Synchronous BPEL process WSDL is having single partnerLinkType instead of two. And it supports only Provider role [no requester role as Asynchronous] which uses portType defined above.
<partnerLink
name="samplesyncbpel_client"
partnerLinkType="client:SampleSyncBpel"
myRole="SampleSyncBpelProvider"/>
synchronous BPEL process has one reply activity instead of callback.<reply name="replyOutput"
partnerLink="samplesyncbpel_client"
portType="client:SampleSyncBpel"
operation="process"
variable="outputVariable"/>
No comments:
Post a Comment