commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "*Colin Sharples" <>
Subject Workflow - new steps for core package
Date Wed, 14 Nov 2001 03:22:38 GMT

I have a suggestion for two new steps to go in the core package. These are
basically the opposite of AndStep and OrStep, called guess what NotAndStep
and NotOrStep. These basically do the exact opposite of AndStep and OrStep.
The reason for this is to allow for more natural scripting. 

With just AndStep, I would have to write an activity like this:

  <doSomething id="produceSomeStuff">
  <and step="useFooAndBar">
    <descriptor name="foo"/>
    <descriptor name="bar"/>
  <goto step="next"/>
  <doSomething id="useFooAndBar"/>
  <doSomething id="next"/>

The first step tries to produce some data, which it will store in the
context under the keys "foo" and "bar". The and step then checks to make
sure that both foo and bar were indeed generated. If they are both present,
then control will pass to the useFooAndBar step. If one or both are missing,
control passes to the goto step, which then skips over useFooAndBar to pass
control onto the next step. Writing stuff like this makes me feel like a
BASIC programmer, so I would rather use something more like:

  <doSomething id="produceSomeStuff">
  <notAnd step="next">
    <descriptor name="foo"/>
    <descriptor name="bar"/>
  <doSomething id="useFooAndBar"/>
  <doSomething id="next"/>

In this case, the notAnd step says that if one or both of foo and bar is
missing, control will be passed to the next step. This means that
useFooAndBar will only be executed if both of the objects are in the
context. Just feels a bit more natural.

Anyway, my colleague Preston Sheldon has created the two steps and updated
CoreRuleSet accordingly - files attached.

 <<>>  <<>>  <<>>

Colin Sharples
IBM Global Services New Zealand

View raw message