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:
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:
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.
<<CoreRuleSet.java>> <<NotAndStep.java>> <<NotOrStep.java>>
IBM Global Services New Zealand