commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Jakarta-commons Wiki] Update of "SCXML/BusinessCases" by NestorUrquiza
Date Wed, 30 Aug 2006 19:37:39 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification.

The following page has been changed by NestorUrquiza:

New page:
SCXML can be used for many different projects or tasks. If you need state machine behavior
for your software then this notation should be able to satisfy your needs. I am sure this
page will be extended to show many other business cases where SCXML can be used or is in use.

Here some Business Stories/Uses:

1)Developing a State Oriented Business Protocol.

IBM had BPEL[1] by the time I was looking to solve a problem for my Company when I found commons-scxml
and I realized after been in touch with the creator (Rahul) how well Harel Statecharts could
be to get my task done.

The implementation for a State Oriented Business Protocol is not that hard to be done and
basically I did one using a POJO approach. Using some of the libraries from commons like Digester
I parse my static business rules from an xml file. Then, using scxml notation I created all
the logic in terms of dynamic configurations and execution of specific actions. 

Since the project was intended to offer clients the possibility of sending GET/POST HTTP calls
and receive XML as the response I just needed to create a Bridge to communicate actions comming
to my servlet container to the SCXML Engine. It was easy using reflection to discover which
event I had to trigger. Before passing to the SCXML Engine some preconditions can be chequed
in that Bridge. After the control is given to the SCXML some post conditions can be evaluated
by means of action states. Finally from those action states the SCXML Engine puts the framework
in a given State from which only some events will be allowed.

2)Developing YAWF (Yet Another WEB Framework)

After I developed the above system I came up with an idea that is already explained in my
blog[1], but basically  I am planning to have my clients use just the VIEW part of the MVC
framework I already built using SCXML as Controller.

This is not just a new Framework for Web development. This is a language independent framework
where the separation of concerns is of course the main reason to go for it. However why I
just do not think about using Sprint or moving into Ruby On Rails for my next project? First
I need State Orientation. Second why I have to study a Framework if with simple POJOs that
are around or you can build by yourself you end up having the needed behaviour with the needed

Yes programming is about fun. Project management, Systems Architecture and Business implementation
should be as well right? The truth is business is not defined by software aware people (at
least not most of it), Presentation Logic is commonly confused with look and feel and the
last is only the final result of a plan that a Front End developer just follow. How you manage
to store your data, where and when is not a concern of the business or operations guys. The
list can go on. I have found that with commons-scxml and POJOs you end up having a good State
Oriented Framework that you can adjust just for your purpose having your:

1)MODEL: Back End developers using java or another language if they manage to interact with
a StateChart library like commons-scxml.
2)VIEW: Front End developers using cool AJAX while reading the xml responses from proper calls
they are instructed to make.
3)CONTROLLER: Operation guys/scripters instructed by Business guys about what is the new business
rule, the new constraints. They will use just a scripting language like JEXL or even in the
future ECMA scripts from the <script> tag already proposed by w3c for the SCXML implementation.

About this I posted something related in my blog[1]
after I found a link[2] in one of your recently posts
about some interesting efforts from w3c. Any
comments/critics are welcome of course!,



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

View raw message