Koz Speaks

What Am I Missing?

My recent trip to Microsoft reintroduced me to a few goings on in “The Enterprise”, which is thankfully something of a dim memory for me. The one thing which always seemed like garbage to me is BPEL (and any other XML workflow tool). However there are a bunch of smart people who clearly think that there’s some merit to it. I’m fairly opinionated, it goes with the territory but I figure I should ask “what is it I’m missing”?

For the readers who have yet to learn about BPEL, check out this oracle tutorial.

One of the constructs BPEL gives you is the ability to specify conditionals:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<switch>
  <case condition="bpws:getVariableData('FlightResponseAA','confirmationData','/confirmationData/Price') &lt;= bpws:getVariableData('FlightResponseDA','confirmationData','/confirmationData/Price')">
<!-- Select American Airlines -->
    <assign>
      <copy>
        <from variable="FlightResponseAA"/>
        <to variable="TravelResponse"/>
      </copy>
    </assign>
  </case>
  <otherwise>
<!-- Select Delta Airlines -->
    <assign>
      <copy>
        <from variable="FlightResponseDA"/>
        <to variable="TravelResponse"/>
      </copy>
    </assign>
  </otherwise>
</switch>

Of course we already have that:

1
2
3
4
5
if FlightResponseAA.confirmationData.Price <= FlightResponseDA.confirmationData.Price
  TravelResponse = FlightResponseAA
else
  TravelResponse = FlightResponseDA
end

It also lets you invoke processes:

1
2
3
4
5
6
7
8
9
10
11
12
<flow>
  <sequence>
<!-- Async invoke of the AA Web service and wait for the callback-->
    <invoke partnerLink="AmericanAirlines" portType="aln:FlightAvailabilityPT" operation="FlightAvailability" inputVariable="FlightDetails"/>
    <receive partnerLink="AmericanAirlines" portType="aln:FlightCallbackPT" operation="FlightTicketCallback" variable="FlightResponseAA"/>
  </sequence>
  <sequence>
<!-- Async invoke of the DA Web service and wait for the callback-->
    <invoke partnerLink="DeltaAirlines" portType="aln:FlightAvailabilityPT" operation="FlightAvailability" inputVariable="FlightDetails"/>
    <receive partnerLink="DeltaAirlines" portType="aln:FlightCallbackPT" operation="FlightTicketCallback" variable="FlightResponseDA"/>
  </sequence>
</flow>

But we already have that too:

1
2
FlightResponseAA = AmericanAirLines.FlightAvailability()
FlightResponseDA = DeltaAirlines.FlightAvailability()

So it seems to me that BPEL and other workflow tools simply take standard programming language constructs, wrap them up in XML and call it something other than programming. All that engineering effort could have been thrown into interesting research to advance the state of our industry, instead we get this mess…

So, what have I missed? Are workflow systems some kind of amazing solution to a really hard problem, or solution in search of a problem?