Package org.uscxml.tests.datamodel

Source Code of org.uscxml.tests.datamodel.TestJavaScriptDataModel

package org.uscxml.tests.datamodel;

import org.uscxml.Factory;
import org.uscxml.Interpreter;
import org.uscxml.InterpreterException;
import org.uscxml.datamodel.ecmascript.ECMAScriptDataModel;

public class TestJavaScriptDataModel {

  public static void main(String[] args) throws InterpreterException {
    // load JNI library from build directory
    System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib");

    // register java datamodel at factory
    ECMAScriptDataModel datamodel = new ECMAScriptDataModel();
    Factory.getInstance().registerDataModel(datamodel);

    // instantiate interpreter with document from file
    Interpreter interpreter = Interpreter
        .fromURI("/Users/sradomski/Documents/TK/Code/uscxml/test/uscxml/java/test-ecmascript-datamodel.scxml");

    // wait until interpreter has finished
    while (true)
      interpreter.interpret();
  }

}
TOP

Related Classes of org.uscxml.tests.datamodel.TestJavaScriptDataModel

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.