Examples of Send


Examples of org.apache.commons.scxml.model.Send

        List ten_done = ten.getTransitionsList("ten.done");
        assertEquals(1, ten_done.size());
        Transition ten2twenty = (Transition) ten_done.get(0);
        List actions = ten2twenty.getActions();
        assertEquals(1, actions.size());
        Send send = (Send) actions.get(0);
        assertEquals("send1", send.getSendid());
        /* Serialize
        scxmlAsString = serialize(scxml);
        assertNotNull(scxmlAsString);
        String expectedFoo2Serialization =
            "<foo xmlns=\"http://my.test.namespace\" id=\"foo2\">"
View Full Code Here

Examples of org.apache.commons.scxml.model.Send

        List ten_done = ten.getTransitionsList("ten.done");
        assertEquals(1, ten_done.size());
        Transition ten2twenty = (Transition) ten_done.get(0);
        List actions = ten2twenty.getActions();
        assertEquals(1, actions.size());
        Send send = (Send) actions.get(0);
        assertEquals("send1", send.getSendid());
        /* Serialize
        scxmlAsString = serialize(scxml);
        assertNotNull(scxmlAsString);
        String expectedFoo2Serialization =
            "<foo xmlns=\"http://my.test.namespace\" id=\"foo2\">"
View Full Code Here

Examples of org.apache.commons.scxml.model.Send

       
        assertEquals(assertValue, SCXMLSerializer.serialize(scxml));
    }
   
    public void testSerializeSend() {
        Send send = new Send();
        send.setSendid("1");
        send.setTarget("newTarget");
        send.setTargettype("newTargetType");
        send.setNamelist("names");
        send.setDelay("4 secs");
        send.setEvent("turnoff");
        send.setHints("guess");
       
        String assertValue = " <send sendid=\"1\" " +
                "target=\"newTarget\" " +
                "targetType=\"newTargetType\" " +
                "namelist=\"names\" " +
View Full Code Here

Examples of org.apache.commons.scxml2.model.Send

            // [...] the executable content inside <finalize> MUST NOT raise events or invoke external actions.
            // In particular, the <send> and <raise> elements MUST NOT occur.
            reportIgnoredElement(reader, configuration, ELEM_FINALIZE, XMLNS_SCXML, ELEM_SEND);
        }

        Send send = new Send();
        send.setDelay(readAV(reader, ATTR_DELAY));
        send.setEvent(readAV(reader, ATTR_EVENT));
        send.setHints(readAV(reader, ATTR_HINTS));
        send.setNamelist(readAV(reader, ATTR_NAMELIST));
        send.setSendid(readAV(reader, ATTR_SENDID));
        send.setTarget(readAV(reader, ATTR_TARGET));
        send.setType(readAV(reader, ATTR_TYPE));
        readNamespaces(configuration, send);

        Node body = readNode(reader, configuration, XMLNS_SCXML, ELEM_SEND, new String [] {});
        NodeList childNodes = body.getChildNodes();
        List<Node> externalNodes = send.getExternalNodes();
        for (int i = 0; i < childNodes.getLength(); i++) {
            externalNodes.add(childNodes.item(i));
        }

        send.setParent(executable);
        if (parent != null) {
            parent.addAction(send);
        } else {
            executable.addAction(send);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.