commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ouyang, Landon - ES/RDR -Gil" <>
Subject [SCXML] XML engine decoupled from code
Date Tue, 29 Apr 2008 17:43:06 GMT

A conceptual issue has arisen after creating a working application that
uses the Commons SCXML engine.

Based on what we want out of the engine, it is essentially important
that the code implementation (Java) is decoupled/independent of the
underlying engine (XML file).

To illustrate the problems I encountered, here is an example: there is a
state called CheckRotation that can detect whether there is or isn't a
rotation. We need the ability for a developer to be able to place this
state anywhere in the state machine (possibly multiple times) and direct
the state machine based on one of the two outcomes without having to
write any Java code; he should only have to edit the XML file. For
example, one path could be A -> CheckRotation -> C or D and another
could be E -> CheckRotation -> F or G.

We can modify the Java code so the CheckRotation method could fire
different events to direct the path.

if(PrevState == A)
else if(PrevState == E)

But this solution adds complexity and defeats the whole purpose of using
the engine in the first place! The CheckRotation state would need
multiple conditional transitions defined (instead of two) in the XML
file and the Java code would be interlinked with the XML engine! Is
there a more proper solution to this issue?

Landon Ouyang
Member Technical Staff
ITT Electronics Systems, Radar Systems - Gilfillan
7821 Orion Ave,
Van Nuys, CA 91406
(818) 901-2982

This e-mail and any files transmitted with it may be proprietary and are intended solely for
the use of the individual or entity to whom they are addressed. If you have received this
e-mail in error please notify the sender. Please note that any views or opinions presented
in this e-mail are solely those of the author and do not necessarily represent those of ITT
Corporation. The recipient should check this e-mail and any attachments for the presence of
viruses. ITT accepts no liability for any damage caused by any virus transmitted by this e-mail.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message