<?xml version="1.0" encoding="UTF-8"?>
<diagram author="Yentl Van Tendeloo" name="Logging">
    <description>
        For testing: I/O Statechart for the Modelverse
    </description>

    <inport name="user_inp"/>
    <inport name="inp"/>
    <outport name="outp"/>

    <class name="Logging" default="true">
        <scxml initial="init">
            <state id="init">
                <transition event="input" port="inp" target=".">
                    <parameter name="value"/>
                    <script>
                        print(value)
                    </script>
                </transition>

                <transition after="0.1" target="."/>

                <transition event="terminate" port="inp" target="../finished"/>

                <transition event="raw_inp" port="user_inp" target=".">
                    <parameter name="inp"/>
                    <script>
                        print("Got raw input")
                    </script>
                    <raise event="output" port="outp" scope="output">
                        <parameter expr="inp"/>
                    </raise>
                </transition>
            </state>

            <state id="finished">
                <script>
                    print("FINISHED SC")
                </script>
            </state>
        </scxml>
    </class>
</diagram>
