Examples of YSpecification


Examples of au.edu.qut.yawl.elements.YSpecification

    public void testDeadlockingSpecification()
            throws YSchemaBuildingException, YSyntaxException,
            JDOMException, IOException, YStateException, YPersistenceException, YDataStateException {
        URL fileURL = getClass().getResource("DeadlockingSpecification.xml");
        File yawlXMLFile = new File(fileURL.getFile());
        YSpecification specification = null;
        specification = (YSpecification) YMarshal.
                        unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);

        YEngine engine = YEngine.getInstance();
        EngineClearer.clear(engine);
        engine.loadSpecification(specification);
        _idForTopNet = engine.startCase(null, null, specification.getID(), null, null);
        YWorkItemRepository repository = YWorkItemRepository.getInstance();
        YNetRunner runner = repository.getNetRunner(_idForTopNet);
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification

    public static void main(String[] args) throws YSchemaBuildingException, YSyntaxException, JDOMException, IOException, YStateException, YPersistenceException, YDataStateException {
        YEngine _engine = YEngine.getInstance();
        EngineClearer.clear(_engine);
        URL fileURL = TestMarlonsEagerNessExperiment.class.getResource("MarlonsEagerExperiment.xml");
        File yawlXMLFile = new File(fileURL.getFile());
        YSpecification specification = null;
        specification = (YSpecification) YMarshal.
                        unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);
        YEngine engine2 = YEngine.getInstance();
        engine2.loadSpecification(specification);
        _idForTopNet = engine2.startCase(null, null, specification.getID(), null, null);

        _worItemRepository = YWorkItemRepository.getInstance();
    }
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification

    }

    public void testImproperCompletion() throws YSchemaBuildingException, YSyntaxException, JDOMException, IOException, YAuthenticationException, YDataStateException, YStateException, YQueryException, YPersistenceException {
        URL fileURL = getClass().getResource("TestOrJoin.xml");
        File yawlXMLFile = new File(fileURL.getFile());
        YSpecification specification = null;
        specification = (YSpecification) YMarshal.
                            unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);
        _engine = YEngine.getInstance();
        EngineClearer.clear(_engine);
//todo AJH:Obsoltete ????
//        String sessionHandle = _engine.connect("admin", "YAWL");
        _engine.loadSpecification(specification);
        YIdentifier id = _engine.startCase(null, null, specification.getID(), null, null);
        {
            YWorkItem itemA = (YWorkItem)_engine.getAvailableWorkItems().iterator().next();
//            _localWorklist.startOneWorkItemAndSetOthersToFired(
//                    itemA.getCaseID().toString(), itemA.getTaskID());
            _engine.startWorkItem(itemA, "admin");
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification

    public void testImproperCompletion2() throws YSchemaBuildingException, YSyntaxException, JDOMException, IOException, YDataStateException, YStateException, YQueryException, YPersistenceException {
//        _localWorklist = new YLocalWorklist("Donald2", false);
        URL fileURL2 = getClass().getResource("Test55.xml");
        File yawlXMLFile2 = new File(fileURL2.getFile());
        YSpecification specification2 = null;
        specification2 = (YSpecification) YMarshal.
                            unmarshalSpecifications(yawlXMLFile2.getAbsolutePath()).get(0);
        _engine = YEngine.getInstance();
        EngineClearer.clear(_engine);
        _engine.loadSpecification(specification2);
        _engine.startCase(null, null, specification2.getID().toString(), null, null);
        {
//            YWorkItem itemA = (YWorkItem) _workItemRepository.getEnabledWorkItems().iterator().next();
//            _localWorklist.startOneWorkItemAndSetOthersToFired(
//                    itemA.getCaseID().toString(), itemA.getTaskID());
            YWorkItem itemA = (YWorkItem) _engine.getAvailableWorkItems().iterator().next();
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification

    public void setUp() throws YSchemaBuildingException, YSyntaxException, JDOMException, IOException, YStateException, YPersistenceException, YDataStateException {
        URL fileURL = getClass().getResource("ImproperCompletion.xml");
    File yawlXMLFile = new File(fileURL.getFile());
        _workItemRepository = YWorkItemRepository.getInstance();
        YSpecification specification = null;
        specification = (YSpecification) YMarshal.
                        unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);
        _engine = YEngine.getInstance();
        EngineClearer.clear(_engine);
        _engine.loadSpecification(specification);
        _caseId = _engine.startCase(null, null, specification.getID(), null, null);
    }
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification

        {
            try {
                Set specs = _engineManagement.getLoadedSpecifications();
                Iterator iter = specs.iterator();
                while (iter.hasNext()) {
                    YSpecification spec = _engineManagement.getSpecification((String) iter.next());
                    logger.debug("Loading spec " + spec.getID());
                    _loadedSpecificationsTableModel.addRow(spec.getID(), new Object[]{spec.getID(), spec.getRootNet().getID()});

                    // Load up any active cases
                    Set cases = _engineManagement.getCasesForSpecification(spec.getID());
                    logger.debug("Loading " + cases.size() + " active cases for this specification");

                    Iterator iterCases = cases.iterator();
                    while (iterCases.hasNext()) {
                        YIdentifier caseID = (YIdentifier) iterCases.next();
                        addCase(spec.getID(), caseID.get_idString());
                    }
                }
            } catch (YPersistenceException e) {
                logError("Failure to load specifications", e);
                System.exit(99);
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification

        if (YVerificationMessage.containsNoErrors(errorMessages)) {
            for (Iterator iterator = newSpecIDs.iterator(); iterator.hasNext();) {
                Object o = iterator.next();
                String specID = (String) o;

                YSpecification spec = _engineManagement.getSpecification(specID);
                _loadedSpecificationsTableModel.addRow(specID, new Object[]{specID, spec.getRootNet().getID()});
            }
        }
    }
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification

    private void saveXML(int selectedRow) {
        if (selectedRow >= 0) {

            try {
                String specID = (String) _loadedSpecificationsTable.getValueAt(selectedRow, 0);
                YSpecification spec = _engineManagement.getSpecification(specID);
                String specAsXML = YMarshal.marshal(spec);
                int returnVal = _fileChooser.showSaveDialog(this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File toWriteXMLHere = _fileChooser.getSelectedFile();
                    if (toWriteXMLHere.exists()) {
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification


    public void setUp() throws YSchemaBuildingException, YSyntaxException, JDOMException, IOException {
        URL fileURL = getClass().getResource("YAWLOrJoinTestSpecification.xml");
        File yawlXMLFile = new File(fileURL.getFile());
        YSpecification specification = null;
        specification = (YSpecification) YMarshal.
                        unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);
        _net  = specification.getRootNet();
        fileURL = getClass().getResource("YAWLOrJoinTestSpecification2.xml");
        yawlXMLFile = new File(fileURL.getFile());
        specification =(YSpecification) YMarshal.
                    unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);
        _net2  = specification.getRootNet();
        fileURL = getClass().getResource("YAWLOrJoinTestSpecificationWithLoop.xml");
        yawlXMLFile = new File(fileURL.getFile());
        specification =(YSpecification) YMarshal.
                    unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);
        _net3  = specification.getRootNet();
        fileURL = getClass().getResource("YAWLOrJoinTestSpecificationLongLoops.xml");
        yawlXMLFile = new File(fileURL.getFile());
            specification =(YSpecification) YMarshal.
                    unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);
        _net4  = specification.getRootNet();
    }
View Full Code Here

Examples of au.edu.qut.yawl.elements.YSpecification


    public void setUp() throws YSchemaBuildingException, YSyntaxException, JDOMException, IOException, YStateException, YPersistenceException, YDataStateException {
        URL fileURL = getClass().getResource("YAWL_Specification2.xml");
        File yawlXMLFile1 = new File(fileURL.getFile());
        YSpecification specification = null;
        specification = (YSpecification) YMarshal.
                            unmarshalSpecifications(yawlXMLFile1.getAbsolutePath()).get(0);
        YEngine engine2 = YEngine.getInstance();
        EngineClearer.clear(engine2);
        engine2.loadSpecification(specification);
        _id1 = engine2.startCase(null, null, specification.getID(), null, null);
        _netRunner1 = (YNetRunner) engine2._caseIDToNetRunnerMap.get(_id1);
        _d = new Document();
        _d.setRootElement(new Element("data"));
    }
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.