commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "amina mimouni" <amina.mimo...@gmail.com>
Subject state machine creation
Date Mon, 30 Jun 2008 09:46:59 GMT
hello,

1-i'am newbie in scxml, i would like to have programme example of state
machine creation in Java language (with scxml librairies)
2-the whole of scxml meta model in ecore ou genmodel if it is possible

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();

        //---------------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****/

import org.apache.commons.scxml.model.*;

public class transitiontarget extends TransitionTarget
{
    private static final long serialVersionUID = 1L;

    public transitiontarget (){
        super();
    }

}


thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message