commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: Managing content in an SCXML file
Date Tue, 03 Nov 2009 23:10:11 GMT


a markup implies SGML..i assume this might be described as XSD or XML Schema Definition?
Can you describe the events this state-machine model would support?
can you describe the content each event would carry and or generate?
Can you describe what would be contained in the header for each Event?
Can you describe what the body would look like for each event?

You might be able to implement a simple listener that listens on fixed host/port and when
message is received (EOT is achieved after receiving header and body)
you can hand the body of the message to device

can you confine the size of the message? 
if not you might want to implement a packet model to buffer the packets to a known structure
(as in some sort of linked-list) 
until body EOT is achieved 

sounds like a fun project!
Bon Chance
Martin Gainty 
Note de déni et de confidentialité
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.

> From:
> To:
> Subject: Managing content in an SCXML file
> Date: Tue, 3 Nov 2009 23:23:01 +0100
> Dear Rahul and others,
> I want to do a quite simple thing : having a state machine on a server
> controlling user interface of mobile clients. 
> The state machine would have a lot of states and complex stream, and for
> some specific states it will embedded a simple markup language content (e.g.
> an html subset) that will be delivered to the mobile client which when it
> receives it, interpret and display it.
> For example the server state machine would have "connect" state that will be
> triggered when the mobile is establishing a connection, and would react by
> giving to the mobile client the content to be displayed. An simple example
> would be :
> <state id="connect">
> 	<content>
> 		<title> Welcome ! </title>
> 		<button> text="Click here to continue" action ="send_OK"
> </button>
> 		<button> text="Quit" action ="send_Quit" </button>
> </content>
> 	<transition event="send_OK" target="next_state"/>
> 	<transition event="send_Quit" target="final_state"/>
> </state>
> In that case the content in <content> tags will be retrieved by the Java
> code on void connect() method, and sent to the device. Server will listen to
> device and when receiving a message like send_OK, trigger this to the state
> machine.
> To summarize I want to emulate a tiny web server hosting some tiny pages
> with a state machine.
> I've gone through all the documentation of Commons Scxml, and didn't find an
> easy way to do this. The possible ways I see are to use a data model, but
> using <assign> tags for setting my content seems to be quite heavy to write
> and don't know how to assign an XML tree to a data model node, and other
> possibility would be to use maybe custom actions, but how to describe in a
> simple way my XML like-content ?
> Do you have a suggestion to do this in an easy and readable way ?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Windows 7: Unclutter your desktop.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message