Examples of YVerificationMessage


Examples of au.edu.qut.yawl.util.YVerificationMessage

                visited.add(((YNet) decomposition).getInputCondition());

                Set visiting = getEmptyPostsetAtThisLevel(visited);
                while (visiting.size() > 0) {
                    if (visiting.contains(((YNet) decomposition).getOutputCondition())) {
                        messages.add(new YVerificationMessage(
                                decomposition,
                                "The net (" + decomposition +
                                ") may complete without any generated work.  " +
                                "Check the empty tasks linking from i to o.",
                                YVerificationMessage.WARNING_STATUS));
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

            visited.add(q);

            Set visiting = getEmptyTasksPostset(visited);
            while (visiting.size() > 0) {
                if (visiting.contains(q)) {
                    messages.add(new YVerificationMessage(
                            q,
                            "The element (" + q + ") plays a part in an inifinite " +
                            "loop/recursion in which no work items may be created.",
                            generateWarnings ?
                            YVerificationMessage.WARNING_STATUS :
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

        Set decompositionsNotBeingUsed = specifiedDecompositons;
        if (decompositionsNotBeingUsed.size() > 0) {
            for (Iterator iterator = decompositionsNotBeingUsed.iterator(); iterator.hasNext();) {
                YDecomposition decomp = (YDecomposition) iterator.next();
                messages.add(new YVerificationMessage(decomp, "The decompositon(" + decomp.getID() +
                        ") is not being used in this specification.", YVerificationMessage.WARNING_STATUS));
            }
        }
        return messages;
    }
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

     */
    public List verify() {
        List messages = new Vector();
        messages.addAll(super.verify());
        if (this._inputCondition == null) {
            messages.add(new YVerificationMessage(this, this + " must contain input condition.",
                    YVerificationMessage.ERROR_STATUS));
        }
        if (this._outputCondition == null) {
            messages.add(new YVerificationMessage(this, this + " must contain output condition.",
                    YVerificationMessage.ERROR_STATUS));
        }
        Iterator netEls = this._netElements.values().iterator();
        while (netEls.hasNext()) {
            YExternalNetElement nextElement = (YExternalNetElement) netEls.next();
            if (nextElement instanceof YInputCondition && !_inputCondition.equals(nextElement)) {
                messages.add(new YVerificationMessage(this, "Only one inputCondition allowed, " +
                        "and it must be _inputCondition.", YVerificationMessage.ERROR_STATUS));
            }
            if (nextElement instanceof YOutputCondition && !_outputCondition.equals(nextElement)) {
                messages.add(new YVerificationMessage(this, "Only one outputCondition allowed, " +
                        "and it must be _outputCondition.", YVerificationMessage.ERROR_STATUS));
            }
            messages.addAll(nextElement.verify());
        }
        for (Iterator iterator = _localVariables.values().iterator(); iterator.hasNext();) {
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

        if (visitedFw.size() != numElements) {
            Set elementsNotInPath = new HashSet(allElements);
            elementsNotInPath.removeAll(visitedFw);
            Iterator elementsNotInPathIt = elementsNotInPath.iterator();
            while (elementsNotInPathIt.hasNext()) {
                messages.add(new YVerificationMessage(this, elementsNotInPathIt.next() +
                        " is not on a forward directed path from i to o.", YVerificationMessage.ERROR_STATUS));
            }
        }
        if (visitedBk.size() != numElements) {
            Set elementsNotInPath = new HashSet(allElements);
            elementsNotInPath.removeAll(visitedBk);
            Iterator elementsNotInPathIt = elementsNotInPath.iterator();
            while (elementsNotInPathIt.hasNext()) {
                messages.add(new YVerificationMessage(this, elementsNotInPathIt.next() +
                        " is not on a backward directed path from i to o.", YVerificationMessage.ERROR_STATUS));
            }
        }
        return messages;
    }
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage


    public List verify() {
        List messages = new Vector();
        if (_minInstances != null && _minInstances.intValue() < 1) {
            messages.add(new YVerificationMessage(_myTask, _myTask
                    + " _minInstances < 1", YVerificationMessage.ERROR_STATUS));
        }
        if (_minInstances != null && _maxInstances != null &&
                _minInstances.intValue() > _maxInstances.intValue()) {
            messages.add(new YVerificationMessage(_myTask, _myTask
                    + "._minInstances > _maxInstances", YVerificationMessage.ERROR_STATUS));
        }
        if (_maxInstances != null && _maxInstances.intValue() < 1) {
            messages.add(new YVerificationMessage(_myTask, _myTask
                    + "._maxInstances < 1", YVerificationMessage.ERROR_STATUS));
        }
/*        if(_threshold != null && _minInstances != null && _threshold.intValue() < _minInstances.intValue()){
            messages.add(new YVerificationMessage(_myTask, _myTask
                    + "._threshold < _minInstances"));
        }*/
        if (_threshold != null && _threshold.intValue() < 1) {
            messages.add(new YVerificationMessage(_myTask, _myTask
                    + "._threshold < 1", YVerificationMessage.ERROR_STATUS));
        }
        if (!(_creationMode.equalsIgnoreCase("static") || _creationMode.equalsIgnoreCase("dynamic"))) {
            messages.add(new YVerificationMessage(_myTask, _myTask
                    + "._creationMode does not equal 'static' or 'dynamic'", YVerificationMessage.ERROR_STATUS));
        }
        return messages;
    }
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

    protected List checkXQuery(String xQuery, String param) {
        List messages = new ArrayList();

        if (null == xQuery || xQuery.length() == 0) {
            messages.add(new YVerificationMessage(this, this +
                    "(id= " + this.getID() + ") the XQuery for param [" +
                    param + "] cannot be equal to null" +
                    " or the empty string.",
                    YVerificationMessage.ERROR_STATUS));
        } else {
            Configuration configuration = new Configuration();
            StaticQueryContext staticQueryContext = new StaticQueryContext();
            QueryProcessor qp = new QueryProcessor(configuration, staticQueryContext);
            try {
                qp.compileQuery(xQuery);
            } catch (XPathException e) {
                messages.add(new YVerificationMessage(this, this +
                        "(id= " + this.getID() + ") the XQuery could not be successfully" +
                        " parsed. [" + e.getMessage() + "]",
                        YVerificationMessage.ERROR_STATUS));
            }
        }
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

        List messages = new Vector();
        messages.addAll(super.verify());
        if (_splitType != _AND
                && _splitType != _OR
                && _splitType != _XOR) {
            messages.add(new YVerificationMessage(this, this + " Incorrect value for split type",
                    YVerificationMessage.ERROR_STATUS));
        }
        if (_joinType != _AND
                && _joinType != _OR
                && _joinType != _XOR) {
            messages.add(new YVerificationMessage(this, this + " Incorrect value for join type",
                    YVerificationMessage.ERROR_STATUS));
        }
        if (_splitType != _AND &&
                (_splitType == _OR || _splitType == _XOR)) {
            int defaultCount = 0;
            List postsetFlows = new ArrayList(getPostsetFlows());
            Collections.sort(postsetFlows);
            long lastOrdering = Long.MIN_VALUE;
            for (Iterator iterator = postsetFlows.iterator(); iterator.hasNext();) {
                YFlow flow = (YFlow) iterator.next();
                if (flow.getEvalOrdering() != null) {
                    int thisOrdering = flow.getEvalOrdering().intValue();
                    if (thisOrdering == lastOrdering) {
                        messages.add(new YVerificationMessage(this,
                                this + " no two elements may posess the same " +
                                "ordering (" + flow + ") for the same task.",
                                YVerificationMessage.ERROR_STATUS));
                    }
                    lastOrdering = thisOrdering;
                }
                if (flow.isDefaultFlow()) {
                    defaultCount++;
                }
            }
            if (defaultCount != 1) {
                messages.add(new YVerificationMessage(this, this + " the postset of any OR/XOR " +
                        "split must have one default flow. (not " + defaultCount + ")",
                        YVerificationMessage.ERROR_STATUS));
            }
        }
        if (_multiInstAttr != null) {
            messages.addAll(_multiInstAttr.verify());
        }
        Iterator removeSetIt = _removeSet.iterator();
        while (removeSetIt.hasNext()) {
            YExternalNetElement element = (YExternalNetElement) removeSetIt.next();
            if (element == null) {
                messages.add(new YVerificationMessage(this,
                        this + " refers to a non existant element in its remove set.",
                        YVerificationMessage.ERROR_STATUS));
            } else if (!element._net.equals(_net)) {
                messages.add(new YVerificationMessage(this,
                        this + " and " + element + " must be contained in the same net."
                        + " (container " + _net + " & " + element._net + ")",
                        YVerificationMessage.ERROR_STATUS));
            }
        }
        if (_decompositionPrototype != null) {
            messages.addAll(checkParameterMappings());
        } else {
            if (_dataMappingsForTaskStarting.size() > 0) {
                messages.add(new YVerificationMessage(
                        this, "Syntax error for " + this + " to have startingMappings and no decomposition.",
                        YVerificationMessage.ERROR_STATUS));
            }
            if (_dataMappingsForTaskCompletion.size() > 0) {
                messages.add(new YVerificationMessage(
                        this,
                        "Syntax error for " + this + " to have completionMappings and no decomposition.",
                        YVerificationMessage.ERROR_STATUS));
            }
        }
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

        Set outPutVarsAssignedTo = getLocalVariablesForTaskCompletion();
        for (Iterator iterator = outPutVarsAssignedTo.iterator(); iterator.hasNext();) {
            String localVarName = (String) iterator.next();
            if (_net.getLocalVariables().get(localVarName) == null &&
                    _net.getInputParameters().get(localVarName) == null) {
                messages.add(new YVerificationMessage(this,
                        "The task (id= " + getID() + ") claims to assign its " +
                        "output to a net variable named (" + localVarName + ").  " +
                        "However the containing net does not have " +
                        "such a variable.",
                        YVerificationMessage.ERROR_STATUS));
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

        //is the same as one the regular variable mappings
        int numOfUniqueParamsMappedTo = new HashSet(
                _dataMappingsForTaskStarting.values()).size();
        int numParams = _dataMappingsForTaskStarting.size();
        if (numOfUniqueParamsMappedTo != numParams) {
            messages.add(new YVerificationMessage(this,
                    "A input parameter is used twice.  The task (id=" + getID() + ") " +
                    "uses the same parameter through its multi-instance input " +
                    "and its regular input.",
                    YVerificationMessage.ERROR_STATUS));
        }
        //check that the MI data output extract process does not map to a net variable that is
        //already mapped to by the said task.
        //The only case where the schema misses this is where the muilti-instance output
        //is applied to the same net variable as one of regular outputs.
        int numOfUniqueNetVarsMappedTo = new HashSet(_dataMappingsForTaskCompletion.values()).size();
        numParams = _dataMappingsForTaskCompletion.size();
        if (numOfUniqueNetVarsMappedTo != numParams) {
            messages.add(new YVerificationMessage(this,
                    "A output parameter is used twice.  The task (id=" + getID() + ") " +
                    "uses the same parameter through its multi-instance output " +
                    "and its regular output.",
                    YVerificationMessage.ERROR_STATUS));
        }
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.