Package au.edu.qut.yawl.elements

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


            case YTask._XOR:
                {
                    for (Iterator iterator = iterableHalfBakedSet.iterator(); iterator.hasNext();) {
                        YMarking halfBakedmarking = (YMarking) iterator.next();
                        for (Iterator postsetIter = postset.iterator(); postsetIter.hasNext();) {
                            YCondition condition = (YCondition) postsetIter.next();
                            YMarking aFinalMarking = new YMarking(halfBakedmarking.getLocations());
                            aFinalMarking._locations.add(condition);
                            finishedSet.addMarking(aFinalMarking);
                        }
                    }
View Full Code Here


                    if (!nonOrJoinEnabled(task)) {
                        return null;
                    } else {
                        YMarking returnedMarking = new YMarking(_locations);
                        for (Iterator iterator = preset.iterator(); iterator.hasNext();) {
                            YCondition condition = (YCondition) iterator.next();
                            returnedMarking._locations.remove(condition);
                        }
                        markingSet.addMarking(returnedMarking);
                    }
                    break;
                }
            case YTask._OR:
                {
                    throw new RuntimeException("This method should never be called on an OR-Join");
                }
            case YTask._XOR:
                {
                    if (!nonOrJoinEnabled(task)) {
                        return null;
                    }
                    for (Iterator iterator = preset.iterator(); iterator.hasNext();) {
                        YCondition condition = (YCondition) iterator.next();
                        if (_locations.contains(condition)) {
                            YMarking returnedMarking = new YMarking(_locations);
                            returnedMarking._locations.remove(condition);
                            markingSet.addMarking(returnedMarking);
                        }
View Full Code Here

                    throw new RuntimeException("This method should never be called on an OR-Join");
                }
            case YTask._XOR:
                {
                    for (Iterator iterator = preset.iterator(); iterator.hasNext();) {
                        YCondition condition = (YCondition) iterator.next();
                        if (_locations.contains(condition)) {
                            return true;
                        }
                    }
                    return false;
View Full Code Here

    public boolean isBiggerEnablingMarkingThan(YMarking marking, YTask orJoin) {
        Set preset = orJoin.getPresetElements();
        Set thisMarkingsOccupiedPresetElements = new HashSet();
        Set otherMarkingsOccupiedPresetElements = new HashSet();
        for (Iterator presetIter = preset.iterator(); presetIter.hasNext();) {
            YCondition condition = (YCondition) presetIter.next();
            if (this._locations.contains(condition)) {
                thisMarkingsOccupiedPresetElements.add(condition);
            }
            if (marking._locations.contains(condition)) {
                otherMarkingsOccupiedPresetElements.add(condition);
View Full Code Here

                    return false;
                }
            } else {//must be an orJoin
                Set orJoinPreset = task.getPresetElements();
                for (Iterator pjPresetIter = orJoinPreset.iterator(); pjPresetIter.hasNext();) {
                    YCondition condition = (YCondition) pjPresetIter.next();
                    //if we find an orJoin that contains an identifier then the marking
                    //is definitely not deadlocked
                    if (_locations.contains(condition) && task != orJoin) {
                        return false;
                    }
View Full Code Here

        assertTrue(_netRunner1.isAlive());
        assertTrue(_netRunner1.getEnabledTasks().size() == 0);
        assertTrue(_netRunner1.getBusyTasks().size() == 1);
        _netRunner1.startWorkItemInTask(null, (YIdentifier) children.get(0), "a-top");
        assertTrue(_netRunner1.completeWorkItemInTask(null, null, (YIdentifier) children.get(0), "a-top",_d));
        YCondition anonC = ((YCondition) _netRunner1.getNetElement(
                "c{a-top_b-top}"));
        assertTrue(anonC.contains(_id1));
        assertTrue(_id1.getLocations().contains(anonC));
        assertTrue(((YTask) _netRunner1._net.getNetElement("b-top")).t_enabled(null));
        assertTrue(_netRunner1.isAlive());
        assertTrue("" + _id1.getLocations(), _netRunner1.getEnabledTasks().size() == 1);
        YAtomicTask btop = (YAtomicTask) _netRunner1.getNetElement("b-top");
View Full Code Here

TOP

Related Classes of au.edu.qut.yawl.elements.YCondition

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.