Package org.enhydra.shark.xpdl.elements

Examples of org.enhydra.shark.xpdl.elements.DataTypes


            ActualParameter ap = (ActualParameter)aps.get(i);
            String fpMode = fp.getMode();
            if(fpMode.equals("IN") && !checkExpression)
                continue;
            DataType fpdt = fp.getDataType();
            DataTypes fpdtt = fpdt.getDataTypes();
            XMLElement fpType = fpdtt.getChoosen();
            Map idToDFOrFP = XMLUtil.getWorkflowProcess(aps).getAllVariables();
            String apWRD = ap.toValue();
            XMLCollectionElement ce = (XMLCollectionElement)idToDFOrFP.get(apWRD);
            if(ce == null)
            {
                if(!fpMode.equals("IN"))
                {
                    XMLValidationError verr = new XMLValidationError("ERROR", "LOGIC", "ERROR_NON_EXISTING_VARIABLE_REFERENCE", apWRD, ap);
                    existingErrors.add(verr);
                    continue;
                }
                boolean evaluateToString = false;
                if(fpType instanceof BasicType)
                {
                    String fpAT = ((BasicType)fpType).getType();
                    if(fpAT.equals("STRING"))
                        evaluateToString = true;
                }
                if(XMLUtil.canBeExpression(apWRD, XMLUtil.getWorkflowProcess(ap).getAllVariables(), evaluateToString) || apWRD.equals("null"))
                    continue;
                if(fpType instanceof BasicType)
                {
                    String fpAT = ((BasicType)fpType).getType();
                    if(fpAT.equals("INTEGER"))
                    {
                        try
                        {
                            new Integer(apWRD);
                            continue;
                        }
                        catch(Exception ex) { }
                        if(apWRD.toLowerCase().indexOf("short") >= 0 || apWRD.toLowerCase().indexOf("integer") >= 0 || apWRD.toLowerCase().indexOf("long") >= 0)
                            continue;
                    } else
                    if(fpAT.equals("FLOAT"))
                    {
                        try
                        {
                            new Double(apWRD);
                            continue;
                        }
                        catch(Exception ex) { }
                        if(apWRD.toLowerCase().indexOf("short") >= 0 || apWRD.toLowerCase().indexOf("integer") >= 0 || apWRD.toLowerCase().indexOf("long") >= 0 || apWRD.toLowerCase().indexOf("float") >= 0 || apWRD.toLowerCase().indexOf("double") >= 0)
                            continue;
                    } else
                    if(fpAT.equals("BOOLEAN") && (apWRD.equals("false") || apWRD.equals("true") || apWRD.toLowerCase().indexOf("boolean") >= 0))
                        continue;
                }
                XMLValidationError verr = new XMLValidationError("WARNING", "LOGIC", "WARNING_ACTUAL_PARAMETER_EXPRESSION_POSSIBLY_INVALID", apWRD, ap);
                existingErrors.add(verr);
                continue;
            }
            XMLElement apType = null;
            DataType apdt = (DataType)ce.get("DataType");
            DataTypes apdtt = apdt.getDataTypes();
            apType = apdtt.getChoosen();
            boolean invalidType = false;
            if(fpType.getClass().equals(apType.getClass()))
            {
                if(fpType instanceof BasicType)
                {
View Full Code Here

TOP

Related Classes of org.enhydra.shark.xpdl.elements.DataTypes

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.