Package au.edu.qut.yawl.elements.data

Examples of au.edu.qut.yawl.elements.data.YVariable


                        "and it must be _outputCondition.", YVerificationMessage.ERROR_STATUS));
            }
            messages.addAll(nextElement.verify());
        }
        for (Iterator iterator = _localVariables.values().iterator(); iterator.hasNext();) {
            YVariable var = (YVariable) iterator.next();
            messages.addAll(var.verify());
        }
        //check that all elements in the net are on a directed path from 'i' to 'o'.
        messages.addAll(verifyDirectedPath());
        return messages;
    }
View Full Code Here


                visiting.removeAll(visited);
            } while (visiting.size() > 0);
            _clone._localVariables = new HashMap();
            Collection params = _localVariables.values();
            for (Iterator iterator = params.iterator(); iterator.hasNext();) {
                YVariable variable = (YVariable) iterator.next();
                YVariable copyVar = (YVariable) variable.clone();
                _clone.setLocalVariable(copyVar);
            }
            _clone._data = (Document) this._data.clone();
            //do cleanup of class variable _clone before returning.
            Object temp = _clone;
View Full Code Here

        xml.append(super.toXML());
        List variables = new ArrayList(_localVariables.values());

        Order order = new Order() {
            public boolean lessThan(Object a, Object b) {
                YVariable var1 = (YVariable) a;
                YVariable var2 = (YVariable) b;
                String var1Nm = var1.getName() != null ?
                        var1.getName() : var1.getElementName();
                String var2Nm = var2.getName() != null ?
                        var2.getName() : var2.getElementName();

                if (var1Nm != null && var2Nm != null) {
                    return var1Nm.compareTo(var2Nm) < 0;
                } else if (var1Nm == null) {
                    return true;
                } else {
                    return false;
                }
            }
        };
        Object[] sortedVars = Sorter.sort(order, variables.toArray());
        if (null != sortedVars) {
            for (int i = 0; i < sortedVars.length; i++) {
                YVariable variable = (YVariable) sortedVars[i];
                xml.append(variable.toXML());
            }
        }
        xml.append("<processControlElements>");
        xml.append(_inputCondition.toXML());
View Full Code Here

     */
    public void initialise(YPersistenceManager pmgr) throws YPersistenceException {
        super.initialise(pmgr);
        Iterator iter = _localVariables.values().iterator();
        while (iter.hasNext()) {
            YVariable variable = (YVariable) iter.next();
            Element initialValuedXMLDOM = null;
            String varElementName = variable.getName() != null ?
                    variable.getName() :
                    variable.getElementName();
            if (variable.getInitialValue() != null) {
                String initialValue = variable.getInitialValue();

                initialValue =
                        "<" + varElementName + ">" +
                        initialValue +
                        "</" + varElementName + ">";
View Full Code Here

    public void setUp() throws YPersistenceException {
        YSpecification spec = new YSpecification("");
        spec.setBetaVersion(YSpecification._Beta2);
        YNet deadNet = new YNet("aNet", spec);
        YVariable v = new YVariable(null);
        v.setName("stubList");
        v.setUntyped(true);
        v.setInitialValue("<stub/><stub/><stub/>");
        deadNet.setLocalVariable(v);
        YCaseData casedata = new YCaseData();
        deadNet.initializeDataStore(null, casedata);
        deadNet.initialise(null);
        _atomicTask1 = new YAtomicTask("AT1", YAtomicTask._AND, YAtomicTask._AND, deadNet);
View Full Code Here

                }
                //Now we check that the resulting transformation produced data according
                //to the net variable's type.
                if (_net.getSpecification().isSchemaValidating() &&
                        !query.equals(getPreJoiningMIQuery())) {
                    YVariable var = _net.getLocalVariables().containsKey(localVarThatQueryResultGetsAppliedTo) ?
                            (YVariable) _net.getLocalVariables().get(localVarThatQueryResultGetsAppliedTo) :
                            (YVariable) _net.getInputParameters().get(localVarThatQueryResultGetsAppliedTo);
                    Set col = new HashSet();
                    col.add(var);
                    String schemaForVariable = buildSchema(col);
View Full Code Here

                //if betaversion > beta3 then validate the results of the aggregation query
                String uniqueInstanceOutputQuery = _multiInstAttr.getMIFormalOutputQuery();
                String localVarThatQueryResultGetsAppliedTo =
                        (String) _dataMappingsForTaskCompletion.get(uniqueInstanceOutputQuery);

                YVariable var = _net.getLocalVariables().containsKey(
                        localVarThatQueryResultGetsAppliedTo) ?
                        (YVariable) _net.getLocalVariables().get(localVarThatQueryResultGetsAppliedTo) :
                        (YVariable) _net.getInputParameters().get(localVarThatQueryResultGetsAppliedTo);
                Set col = new HashSet();
                col.add(var);
View Full Code Here

    public void setUp() throws YPersistenceException {
        YSpecification spec = new YSpecification("");
        spec.setBetaVersion(YSpecification._Beta2);
        _net = new YNet("aNetName", spec);
        YVariable v = new YVariable(null);
        v.setName("stubList");
        v.setUntyped(true);
        v.setInitialValue("<stub/><stub/><stub/>");
        _net.setLocalVariable(v);
        YCaseData casedata = new YCaseData();
        _net.initializeDataStore(null, casedata);
        _net.initialise(null);
  _condition = new YCondition("c1", "C1", _net);
View Full Code Here

    public void setUp() throws YPersistenceException {
        YSpecification spec = new YSpecification("");
        spec.setBetaVersion(YSpecification._Beta2);
        YNet deadNet = new YNet("aNetName", spec);
        YVariable v = new YVariable(null);
        v.setName("stubList");
        v.setUntyped(true);
        v.setInitialValue("<stub/><stub/><stub/>");
        YCaseData casedata = new YCaseData();
        deadNet.initializeDataStore(null, casedata);
        deadNet.setLocalVariable(v);
        deadNet.initialise(null);
        _aCondition = new YCondition("c1", deadNet);
View Full Code Here

    }

    public void testBadQueries(){
        YSpecification spec = new YSpecification("spec1");
        YNet net = new YNet("a", spec);
        YVariable var = new YVariable(net);
        var.setName("localVar");
        net.setLocalVariable(var);
        YTask task = new YAtomicTask("1", YTask._AND, YTask._AND, net);
        YAWLServiceGateway ysg = new YAWLServiceGateway("b", spec);
        YParameter p = new YParameter(ysg, YParameter._INPUT_PARAM_TYPE);
        p.setName("fred");
View Full Code Here

TOP

Related Classes of au.edu.qut.yawl.elements.data.YVariable

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.