Home
 

User login

 
 

Navigation

 
 

Events

« August 2008
SunMonTueWedThuFriSat
12
3456789
10111213141516
17181920212223
24252627282930
31
 

Spot the mistakes - Two things you shouldn’t do with BPEL

By James Pasley

The BPEL shown in this article contains a couple of deliberate mistakes. These are not syntax errors. In fact, this BPEL is syntactically valid and could be executed as part of an overall script. You may even have BPEL in production which is similar to this. The problems with this BPEL are indications that the architecture of the system is incorrect.

<bpws:scope>

	<bpws:faultHandlers>
		<bpws:catchAll>
			<bpws:sequence>
				<!--  Invocation failed, try it a second time -->
				<bpws:invoke partnerLink="PaymentGateway"
					portType="ns2:CardServices" operation="Validate"
					inputVariable="ValidateRequest" outputVariable="ValidateResponse" />
			</bpws:sequence>
		</bpws:catchAll>
	</bpws:faultHandlers>

	<bpws:eventHandlers>
		<bpws:onAlarm for="'PT60S'">
			<bpws:sequence>
				<!--  Call is taking to long - alert an operator -->
				<bpws:invoke partnerLink="AlertService"
					portType="ns2:Messaging" operation="notify"
					inputVariable="notifyRequest" />
			</bpws:sequence>
		</bpws:onAlarm>
	</bpws:eventHandlers>

	<bpws:sequence>

		<bpws:invoke partnerLink="PaymentGateway"
			portType="ns2:CardServices" operation="Validate"
			inputVariable="ValidateRequest" outputVariable="ValidateResponse" />

	</bpws:sequence>

</bpws:scope>

Find the answer here.


Categories: