Package org.apache.commons.scxml.env

Examples of org.apache.commons.scxml.env.SimpleErrorHandler


    public void invoke(final String source, final Map params)
    throws InvokerException {
        SCXML scxml = null;
        try {
            scxml = SCXMLDigester.digest(source,
                new SimpleErrorHandler(), null);
        } catch (ModelException me) {
            throw new InvokerException(me.getMessage(), me.getCause());
        } catch (IOException ioe) {
            throw new InvokerException(ioe.getMessage(), ioe.getCause());
        } catch (SAXException se) {
View Full Code Here


        SCXML scxml = null;
        ShaleDialogELEvaluator evaluator = new ShaleDialogELEvaluator();
        evaluator.setFacesContext(context);
        try {
            scxml = SCXMLDigester.digest(scxmlDocument,
                new SimpleErrorHandler(), new SessionContext(context),
                  evaluator);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
View Full Code Here

     * Test the SCXML documents, usage of <invoke>
     */
    public void testInvoke01Sample() {
        try {
            SCXML scxml = SCXMLDigester.digest(invoke01,
                new SimpleErrorHandler());
            exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
                new SimpleErrorReporter());
            assertNotNull(exec);
            exec.setRootContext(new JexlContext());
            exec.setStateMachine(scxml);
View Full Code Here

        assertTrue(exec.getCurrentStatus().isFinal());
    }

    public void testBadSrcInclude() {
        try {
            scxml = SCXMLParser.parse(src04, new SimpleErrorHandler());
            fail("Document with bad <state> src attribute shouldn't be parsed!");
        } catch (SAXException me) {
            assertTrue("Unexpected error message for bad <state> 'src' URI",
                me.getMessage() != null && me.getMessage().indexOf("Source attribute in <state src=") != -1);
        } catch (Exception e) {
View Full Code Here

        }
    }

    public void testBadSrcFragmentInclude() {
        try {
            scxml = SCXMLParser.parse(src05, new SimpleErrorHandler());
            fail("Document with bad <state> src attribute shouldn't be parsed!");
        } catch (SAXException me) {
            assertTrue("Unexpected error message for bad <state> 'src' URI fragment",
                me.getMessage() != null && me.getMessage().indexOf("URI Fragment in <state src=") != -1);
        } catch (Exception e) {
View Full Code Here

     * Test the SCXML documents, usage of &lt;invoke&gt;
     */
    public void testInvoke01Sample() {
        try {
            SCXML scxml = SCXMLDigester.digest(invoke01,
                new SimpleErrorHandler());
            exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
                new SimpleErrorReporter());
            assertNotNull(exec);
            exec.setRootContext(new JexlContext());
            exec.setStateMachine(scxml);
View Full Code Here

    public void invoke(final String source, final Map params)
    throws InvokerException {
        SCXML scxml = null;
        try {
            scxml = SCXMLDigester.digest(source,
                new SimpleErrorHandler(), null);
        } catch (ModelException me) {
            throw new InvokerException(me.getMessage(), me.getCause());
        } catch (IOException ioe) {
            throw new InvokerException(ioe.getMessage(), ioe.getCause());
        } catch (SAXException se) {
View Full Code Here

    public void invoke(final String source, final Map params)
    throws InvokerException {
        SCXML scxml = null;
        try {
            scxml = SCXMLParser.parse(new URL(source),
                new SimpleErrorHandler());
        } catch (ModelException me) {
            throw new InvokerException(me.getMessage(), me.getCause());
        } catch (IOException ioe) {
            throw new InvokerException(ioe.getMessage(), ioe.getCause());
        } catch (SAXException se) {
View Full Code Here

     * Test the SCXML documents, usage of &lt;invoke&gt;
     */
    public void testInvoke01Sample() {
        try {
            SCXML scxml = SCXMLParser.parse(invoke01,
                new SimpleErrorHandler());
            exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
                new SimpleErrorReporter());
            assertNotNull(exec);
            exec.setRootContext(new JexlContext());
            exec.setStateMachine(scxml);
View Full Code Here

    }

    public void testInvoke02Sample() {
        try {
            SCXML scxml = SCXMLParser.parse(invoke02,
                new SimpleErrorHandler());
            exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
                new SimpleErrorReporter());
            assertNotNull(exec);
            exec.setRootContext(new JexlContext());
            exec.setStateMachine(scxml);
View Full Code Here

TOP

Related Classes of org.apache.commons.scxml.env.SimpleErrorHandler

Copyright © 2018 www.massapicom. 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.