commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
Subject Re: [SCXML] state machine creation
Date Mon, 30 Jun 2008 18:36:31 GMT
Please use the [SCXML] prefix to email subjects (this is a shared
list). I've added it here.

On 6/30/08, amina mimouni <amina.mimouni@gmail.com> wrote:
> hello,
>
>  1-i'am newbie in scxml,
<snip/>

Reading the following pointers is a decent starting point to get a
feel of the usage patterns when using the library:

  http://commons.apache.org/scxml/guide.html

  http://commons.apache.org/scxml/usecases.html

  http://commons.apache.org/scxml/faq.html

  http://commons.apache.org/scxml/0.8/apidocs/index.html


> i would like to have programme example of state
>  machine creation in Java language (with scxml librairies)
<snap/>

For users beginning with the library, using the IO package
(SCXMLParser class etc.) to read SCXML documents (and define state
machines) is generally recommended. It is possible to create state
machines programmatically, but we don't have any ready examples I can
point to.


>  2-the whole of scxml meta model in ecore ou genmodel if it is possible
>
<snip/>

Commons SCXML does not define an Ecore model.


>  this is my example but the fireEvents doesn't work , i don't what i did
>  wrong
>
>         scxmlSM.addChild(init);
>         scxmlSM.addChild(trans);
>         scxmlSM.addChild(sms);
>         scxmlSM.addChild(fin);
>         System.out.println();
>
<snap/>

Could you describe it via an SCXML document instead?


>         //---------------AbstrastStateMachine----------------------------//
>
>         SCXML scxml = new SCXML();
>
>         statemachine sm = new statemachine(scxmlSM);
>         sm.fireEvent("translatorwithsms.start");
>
>     }
>
>     public void translator() {
>
>         System.out.println("i'am translating");
>     }
>
>     public void sendsms() {
>         System.out.println("sending sms");
>     }
>
>  }
>
>  /***related class****/
>
<snip/>

Sorry, I did not understand what this class below is doing in the
context of the rest of your example.

-Rahul


>  import org.apache.commons.scxml.model.*;
>
>  public class transitiontarget extends TransitionTarget
>  {
>     private static final long serialVersionUID = 1L;
>
>     public transitiontarget (){
>         super();
>     }
>
>  }
>
>
>  thanks
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message