Examples of YVerificationMessage


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

            }
            messages.addAll(verifyPostset());
        }
        else*/{
            if (getPresetElements().size() != 0) {
                messages.add(new YVerificationMessage(this, this
                        + " preset must be empty: " + getPresetElements(), YVerificationMessage.ERROR_STATUS));
            }
            messages.addAll(verifyPostsetFlows());
        }
        return messages;
View Full Code Here

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


    protected List verifyPostsetFlows() {
        List messages = new Vector();
        if (this._net == null) {
            messages.add(new YVerificationMessage(this, this + " This must have a net to be valid.", YVerificationMessage.ERROR_STATUS));
        }
        if (_postsetFlows.size() == 0) {
            messages.add(new YVerificationMessage(this, this + " The postset size must be > 0", YVerificationMessage.ERROR_STATUS));
        }
        Collection postsetFlows = _postsetFlows.values();
        for (Iterator iterator = postsetFlows.iterator(); iterator.hasNext();) {
            YFlow flow = (YFlow) iterator.next();
            if (flow.getPriorElement() != this) {
                messages.add(new YVerificationMessage(
                        this, "The XML based imports should never cause this ... any flow that " + this
                        + " contains should have the getPriorElement() point back to " + this +
                        " [END users should never see this message.]", YVerificationMessage.ERROR_STATUS));
            }
            messages.addAll(flow.verify(this));
View Full Code Here

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


    protected List verifyPresetFlows() {
        List messages = new Vector();
        if (_presetFlows.size() == 0) {
            messages.add(new YVerificationMessage(this, this + " The preset size must be > 0", YVerificationMessage.ERROR_STATUS));
        }
        Collection presetFlows = _presetFlows.values();
        for (Iterator iterator = presetFlows.iterator(); iterator.hasNext();) {
            YFlow flow = (YFlow) iterator.next();
            if (flow.getNextElement() != this) {
                messages.add(new YVerificationMessage(this, "The XML Schema would have caught this... But the getNextElement()" +
                        " method must point to the element contianing the flow in its preset." +
                        " [END users should never see this message.]", YVerificationMessage.ERROR_STATUS));
            }
            if (!flow.getPriorElement().getPostsetElements().contains(this)) {
                messages.add(new YVerificationMessage(this, this + " has a preset element " +
                        flow.getPriorElement() + " that does not have " + this + " as a postset element.", YVerificationMessage.ERROR_STATUS));
            }
        }
        return messages;
    }
View Full Code Here

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

            }
            messages.addAll(verifyPreset());
        }
        else*/{
            if (getPostsetElements().size() != 0) {
                messages.add(new YVerificationMessage(this, this
                        + " postset must be empty: " + getPostsetElements(), YVerificationMessage.ERROR_STATUS));
            }
            messages.addAll(verifyPresetFlows());
        }
        return messages;
View Full Code Here

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

        if (newSpecIDs.size() == 0 || errorMessages.size() > 0) {
            StringBuffer errorMessageStr = new StringBuffer();

            Iterator iterator = errorMessages.iterator();
            while (iterator.hasNext()) {
                YVerificationMessage message = (YVerificationMessage) iterator.next();
                errorMessageStr.append(
                        "\r\n" + message.getStatus() +
                        ": " + message.getMessage());
            }
            JOptionPane.showMessageDialog(this,
                    "The workflow you loaded contains: " + errorMessageStr,
                    "Error Loading Workflow",
                    JOptionPane.ERROR_MESSAGE);
View Full Code Here

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

        List messages = new ArrayList();
        YEngine engine = YEngine.getInstance();
        YAWLServiceReference service = engine.getRegisteredYawlService(_yawlServiceID);
        if(service == null){
            messages.add(
                    new YVerificationMessage(
                            this,
                            "YAWL service[" + _yawlServiceID + "] " +
                            (_webServiceGateway != null
                             ? "at WSGateway[" + _webServiceGateway.getID() + "] "
                             : " ") + "is not registered with engine.",
View Full Code Here

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


    public List verify() {
        List messages = new Vector();
        if (_id == null) {
            messages.add(new YVerificationMessage(this, this + " cannot have null id.", YVerificationMessage.ERROR_STATUS));
        }
        for (Iterator iterator = _inputParameters.values().iterator(); iterator.hasNext();) {
            YParameter parameter = (YParameter) iterator.next();
            messages.addAll(parameter.verify());
        }
View Full Code Here

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

    public List verify() {
        List messages = new Vector();
        messages.addAll(super.verify());
        if (_mandatory && _initialValue != null) {
            messages.add(new YVerificationMessage(this,
                    this + "cannot be mandatory and have initial value.",
                    YVerificationMessage.ERROR_STATUS));
        }
        return messages;
    }
View Full Code Here

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

        if (_initialValue != null && _initialValue.indexOf("<") != -1) {
            try {
                SAXBuilder builder = new SAXBuilder();
                builder.build(new StringReader("<bla>" + _initialValue + "</bla>"));
            } catch (Exception e) {
                messages.add(new YVerificationMessage(
                        this,
                        "Problem with InitialValue [" + _initialValue +
                        "] of " + this +
                        " " + e.getMessage(),
                        YVerificationMessage.ERROR_STATUS));
            }
        }
        XMLToolsForYAWL xty = _parentDecomposition.getSpecification().getToolsForYAWL();
        //check schema contains type with typename.
        if (null != _name) {
            boolean isSchemForSchemType =
                    xty.getSchema4SchemaNameSpace().equals(_namespaceURI);
            if (true == _isUntyped) {
                if (null != _dataTypeName) {
                //todo [in future - if we ever disallow untyped elements]
                //todo we may want to catch this and _report it.
                }
            } else if (!xty.isValidType(_dataTypeName, isSchemForSchemType)) {
                messages.add(new YVerificationMessage(
                        this,
                        "The type library (Schema) in specification contains no " +
                        "type definition with name [" + _dataTypeName + "].  " +
                        "Therefore the decomposition " + _parentDecomposition +
                        " cannot create this variable.",
                        YVerificationMessage.ERROR_STATUS));
            }
        } else if (null != _elementName) {
            boolean schemaContainsElement =
                    xty.getPrimarySchemaElementNames().contains(_elementName);
            if (!schemaContainsElement) {
                messages.add(new YVerificationMessage(
                        this,
                        "The type library (Schema) in specification contains no " +
                        "element definition with name [" + _elementName + "].  " +
                        "\n    Therefore the decomposition " + _parentDecomposition +
                        " cannot create this variable.",
                        YVerificationMessage.ERROR_STATUS));
            }
        } else if (null != _name) {
            if (null != _elementName) {
                messages.add(new YVerificationMessage(
                        this,
                        "name xor element name must be set, not both",
                        YVerificationMessage.ERROR_STATUS));
            }
        } else {
            messages.add(new YVerificationMessage(
                    this,
                    "name or element name must be set",
                    YVerificationMessage.ERROR_STATUS));
        }
        //todo check initial value is of data-type
View Full Code Here

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

    public List verify() {
        List result = new ArrayList();
        result.addAll(super.verify());

        if(password == null || password.length() < 4){
            result.add(new YVerificationMessage(
                    this,
                    "Password must be at least 4 chars long.",
                    YVerificationMessage.ERROR_STATUS));
        }
        if(!password2.equals(password)){
            result.add(new YVerificationMessage(
                    this,
                    "Passwords must be the same.",
                    YVerificationMessage.ERROR_STATUS));
        }
        return result;
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.