commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "storck" <>
Subject AW: Workflow - new steps for core package
Date Wed, 14 Nov 2001 09:04:46 GMT
Where Do I find documentation for worklow ???

-----Urspr√ľngliche Nachricht-----
Von: *Colin Sharples []
Gesendet: Mittwoch, 14. November 2001 04:23
An: Jakarta Commons Developers List (E-mail)
Betreff: Workflow - new steps for core package


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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message