Examples of YVerificationMessage


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

        Set outputQueriesAtTask = getQueriesForTaskCompletion();
        for (Iterator iterator = outputQueriesAtDecomposition.iterator();
             iterator.hasNext();) {
            String query = (String) iterator.next();
            if (!outputQueriesAtTask.contains(query)) {
                messages.add(new YVerificationMessage(this,
                        this + " there exists an output" +
                        " query(" + query + ") in " + _decompositionPrototype +
                        " that is" + " not mapped to by this Task.",
                        YVerificationMessage.ERROR_STATUS));
            }
        }
        for (Iterator iterator = outputQueriesAtTask.iterator();
             iterator.hasNext();) {
            String query = (String) iterator.next();
            if (!outputQueriesAtDecomposition.contains(query)) {
                messages.add(new YVerificationMessage(this,
                        this + " there exists an output" +
                        " query(" + query + ") in this Task that has no " +
                        "corresponding mapping at its decomposition(" +
                        _decompositionPrototype + ").",
                        YVerificationMessage.ERROR_STATUS));
View Full Code Here

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

            String query = (String) _dataMappingsForTaskStarting.get(paramName);
            messages.addAll(checkXQuery(query, paramName));

            if (!inputParamNamesAtTask.contains(paramName)) {
                messages.add(new YVerificationMessage(this,
                        "The task (id= " + this.getID() + ")" +
                        " needs to be connected with the input parameter (" +
                        paramName + ")" + " of decomposition (" +
                        _decompositionPrototype + ").",
                        YVerificationMessage.ERROR_STATUS));
View Full Code Here

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

    public List verify() {
        List messages = new Vector();
        messages.addAll(super.verify());
        if (_decompositionPrototype == null) {
            messages.add(new YVerificationMessage(this, this + " composite task must contain a net.", YVerificationMessage.ERROR_STATUS));
        }
        if (!(_decompositionPrototype instanceof YNet)) {
            messages.add(new YVerificationMessage(this, this + " composite task may not decompose to other than a net.", YVerificationMessage.ERROR_STATUS));
        }
        return messages;
    }
View Full Code Here

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

            messages.addAll(checkDecompositionUsage());
            messages.addAll(checkForInfiniteLoops());
            messages.addAll(checkForEmptyExecutionPaths());
        } else {
            messages.add(
                    new YVerificationMessage(this,
                            "Specifications must have a root net.",
                            YVerificationMessage.ERROR_STATUS)
            );
        }
        messages.addAll(checkDataTypesValidity());
View Full Code Here

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

        BufferedReader bReader = new BufferedReader(new StringReader(errors));
        String result;
        try {
            while ((result = bReader.readLine()) != null) {
                if (result.length() > 0) {
                    msgs.add(new YVerificationMessage(
                            this,
                            "DataType problem: " + result,
                            YVerificationMessage.ERROR_STATUS));
                }
            }
View Full Code Here

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

        List messages = new Vector();
        messages.addAll(super.verify());
        if (_decompositionPrototype == null) {
            if (_multiInstAttr != null && (_multiInstAttr.getMaxInstances() > 1 ||
                    _multiInstAttr.getThreshold() > 1)) {
                messages.add(new YVerificationMessage(this, this + " cannot have multiInstances and a "
                        + " blank work description.", YVerificationMessage.ERROR_STATUS));
            }
        } else if (!(_decompositionPrototype instanceof YAWLServiceGateway)) {
            messages.add(new YVerificationMessage(this, this + " task may not decompose to " +
                    "other than a WebServiceGateway.", YVerificationMessage.ERROR_STATUS));
            messages.addAll(checkEnablementParameterMappings());
        }
        return messages;
    }
View Full Code Here

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

            Set enablementParamNamesAtTask = _dataMappingsForTaskEnablement.keySet();
            //check that task input var maps to decomp input var
            for (Iterator iterator = enablementParamNamesAtGateway.iterator(); iterator.hasNext();) {
                String paramName = (String) iterator.next();
                if (!enablementParamNamesAtTask.contains(paramName)) {
                    messages.add(new YVerificationMessage(this,
                            "The task (id= " + this.getID() + ")" +
                            " needs to be connected with the enablement parameter (" +
                            paramName + ")" + " of decomposition (" +
                            _decompositionPrototype + ").",
                            YVerificationMessage.ERROR_STATUS));
                }
            }
            for (Iterator iterator = enablementParamNamesAtTask.iterator(); iterator.hasNext();) {
                String paramNameAtTask = (String) iterator.next();

                String query = (String) _dataMappingsForTaskEnablement.get(paramNameAtTask);
                messages.addAll(checkXQuery(query, paramNameAtTask));
                if (!enablementParamNamesAtGateway.contains(paramNameAtTask)) {
                    messages.add(new YVerificationMessage(this,
                            "The task (id= " + this.getID() + ") " +
                            "cannot connect with enablement parameter (" +
                            paramNameAtTask + ") because it doesn't exist" +
                            " at its decomposition(" + _decompositionPrototype + ").",
                            YVerificationMessage.ERROR_STATUS));
View Full Code Here

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

    public List verify(YExternalNetElement caller) {
        List messages = new Vector();
        if (_priorElement == null || _nextElement == null) {
            if (_priorElement == null) {
                messages.add(new YVerificationMessage(caller, caller + " [error] null prior element", YVerificationMessage.ERROR_STATUS));
            }
            if (_nextElement == null) {
                messages.add(new YVerificationMessage(caller, caller + " [error] null next element", YVerificationMessage.ERROR_STATUS));
            }
        } else if (_priorElement._net != _nextElement._net) {
            messages.add(new YVerificationMessage(caller, caller
                    + " any flow from any Element (" + _priorElement +
                    ") to any Element (" + _nextElement + ") " +
                    "must occur with the bounds of the same net.", YVerificationMessage.ERROR_STATUS));
        }
        if (_priorElement instanceof YTask) {
            YTask priorElement = (YTask) _priorElement;
            int priorElementSplitType = priorElement.getSplitType();
            if (priorElementSplitType == YTask._AND) {
                if (_xpathPredicate != null) {
                    messages.add(new YVerificationMessage(caller, caller
                            + " any flow from any AND-split (" + _priorElement
                            + ") may not have an xpath predicate.", YVerificationMessage.ERROR_STATUS));
                }
                if (_isDefaultFlow) {
                    messages.add(new YVerificationMessage(caller, caller
                            + " any flow from any AND-split (" + _priorElement
                            + ") may not have a default flow.", YVerificationMessage.ERROR_STATUS));
                }
            }
            //AND-split or OR-split
            if (priorElementSplitType != YTask._XOR) {
                if (_evalOrdering != null) {
                    messages.add(new YVerificationMessage(caller, caller
                            + " any flow from any non XOR-split (" + _priorElement
                            + ") may not have an eval ordering.", YVerificationMessage.ERROR_STATUS));
                }
            }
            //OR-split or XOR-split
            if (priorElementSplitType != YTask._AND) {
                //both must have at least one
                if (_xpathPredicate == null && !_isDefaultFlow) {
                    messages.add(new YVerificationMessage(caller, caller
                            + " any flow from any XOR/OR-split (" + _priorElement
                            + ") must have either a predicate or be a default flow.", YVerificationMessage.ERROR_STATUS));
                }
                //check XOR-split
                if (priorElementSplitType == YTask._XOR) {
                    //has predicate XOR isDefault
                    if (_xpathPredicate != null && _isDefaultFlow) {
                        messages.add(new YVerificationMessage(caller, caller
                                + " any flow from any XOR-split (" + _priorElement
                                + ") must have either a predicate or " +
                                "be a default flow (cannot be both).", YVerificationMessage.ERROR_STATUS));
                    }
                    //has predicate implies has ordering
                    if (_xpathPredicate != null && _evalOrdering == null) {
                        messages.add(new YVerificationMessage(caller, caller
                                + " any flow from any XOR-split (" + _priorElement
                                + ") that has a predicate, must have an eval ordering.", YVerificationMessage.ERROR_STATUS));
                    }
                }
                //check OR-split
                else {
                    //must have predicates
                    if (_xpathPredicate == null) {
                        messages.add(new YVerificationMessage(caller, caller
                                + " any flow from any OR-split (" + _priorElement
                                + ") must have a predicate.", YVerificationMessage.ERROR_STATUS));
                    }
                    //must not have ordering
                    else if (_evalOrdering != null) {
                        messages.add(new YVerificationMessage(caller, caller
                                + " any flow from any OR-split (" + _priorElement
                                + ") must not have an ordering.", YVerificationMessage.ERROR_STATUS));
                    }
                }
            }
        } else {
            if (_xpathPredicate != null) {
                messages.add(new YVerificationMessage(caller, caller
                        + " [error] any flow from any condition (" + _priorElement
                        + ") may not contain a predicate.", YVerificationMessage.ERROR_STATUS));
            }
            if (_evalOrdering != null) {
                messages.add(new YVerificationMessage(caller, caller
                        + " [error] any flow from any condition (" + _priorElement
                        + ") may not contain an eval ordering.", YVerificationMessage.ERROR_STATUS));
            }
            if (_isDefaultFlow) {
                messages.add(new YVerificationMessage(caller, caller
                        + " [error] any flow from any condition (" + _priorElement
                        + ") may not be a default flow.", YVerificationMessage.ERROR_STATUS));
            }
            if (_nextElement instanceof YCondition) {
                messages.add(new YVerificationMessage(caller, caller
                        + " [error] any flow from any condition (" + _priorElement
                        + ") to any other YConditionInterface (" + _nextElement + ") is not allowed.", YVerificationMessage.ERROR_STATUS));
            }
        }
        if (_priorElement instanceof YOutputCondition) {
            messages.add(new YVerificationMessage(caller, caller
                    + " [error] any flow from an OutputCondition (" + _priorElement
                    + ") is not allowed.", YVerificationMessage.ERROR_STATUS));
        }
        if (_nextElement instanceof YInputCondition) {
            messages.add(new YVerificationMessage(caller, caller
                    + " [error] any flow into an InputCondition (" + _nextElement
                    + ") is not allowed.", YVerificationMessage.ERROR_STATUS));
        }
        return messages;
    }
View Full Code Here

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

        }
        if (errorMessages.size() > 0) {
            StringBuffer errorMsg = new StringBuffer();
            errorMsg.append(OPEN_FAILURE);
            for (int i = 0; i < errorMessages.size(); i++) {
                YVerificationMessage message = (YVerificationMessage) errorMessages.get(i);
                errorMsg.append("<error>");
                Object src = message.getSource();
                if (src instanceof YTask) {
                    YDecomposition decomp = ((YTask) src).getDecompositionPrototype();
                    if (decomp != null) {
                        errorMsg.append("<src>").
                                append(decomp.getName() != null ?
                                        decomp.getName() : decomp.getID()).
                                append("</src>");
                    }
                }
                errorMsg.append("<message>").
                        append(message.getMessage()).
                        append("</message></error>");
            }
            errorMsg.append(CLOSE_FAILURE);
            return errorMsg.toString();
        } else {
View Full Code Here

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

        Collection yawlServices = _yawlServices.values();
        for (Iterator iterator = yawlServices.iterator(); iterator.hasNext();) {
            YAWLServiceReference yawlService = (YAWLServiceReference) iterator.next();
            List verificationResult = yawlService.verify();
            for (int i = 0; i < verificationResult.size(); i++) {
                YVerificationMessage message = (YVerificationMessage) verificationResult.get(i);
                message.setSource(this);
            }
            messages.addAll(verificationResult);
        }
        return messages;
    }
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.