Examples of YParameter


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

                Element paramElem = (Element) paramElementsList.get(i);
                if ("formalInputParam".equals(paramElem.getName())) {
                    paramsForTaskNCase.setFormalInputParam(paramElem.getText());
                    continue;
                }
                YParameter param = new YParameter(null, paramElem.getName());
                YDecompositionParser.parseParameter(
                        paramElem,
                        param,
                        null,
                        false);
                if (param.isInput()) {
                    paramsForTaskNCase.setInputParam(param);
                } else {
                    paramsForTaskNCase.setOutputParam(param);
                }
                String paramOrdering = paramElem.getChildText("ordering");
                int order = Integer.parseInt(paramOrdering);
                param.setOrdering(order);
            }
        } catch (JDOMException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
View Full Code Here

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

                    Element inputParams = specElement.getChild("params");
                    if (inputParams != null) {
                        List paramElements = inputParams.getChildren();
                        for (int j = 0; j < paramElements.size(); j++) {
                            Element paramElem = (Element) paramElements.get(j);
                            YParameter param = new YParameter(null, YParameter._INPUT_PARAM_TYPE);
                            YDecompositionParser.parseParameter(
                                    paramElem,
                                    param,
                                    null,
                                    false);//todo check correctness
View Full Code Here

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

        Element rootElement = new Element(rootElemntName);
        outputDoc.setRootElement(rootElement);

        Collections.sort(outputParams); //make sure its sorted
        for (Iterator iterator = outputParams.iterator(); iterator.hasNext();) {
            YParameter parameter = (YParameter) iterator.next();
            String varElementName =
                    parameter.getName() != null ?
                    parameter.getName() : parameter.getElementName();

            Element child = internalDecompDoc.getRootElement().getChild(varElementName);
            if (null != child) {
                Element clone = (Element) child.clone();
                outputDoc.getRootElement().addContent(clone);
View Full Code Here

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

            PrintWriter outputWriter = response.getWriter();
            StringBuffer output = new StringBuffer();

            output.append("<params>");
            for (int i = 0; i < params.length; i++) {
                YParameter param = params[i];
                output.append(param.toXML());
            }
            output.append("</params>");

            outputWriter.write(output.toString());
            outputWriter.flush();
View Full Code Here

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

            }
            Iterator inputParams = spec.getRootNet().getInputParameters().values().iterator();
            if (inputParams.hasNext()) {
                specs.append("<params>");
                while (inputParams.hasNext()) {
                    YParameter inputParam = (YParameter) inputParams.next();
                    specs.append(inputParam.toSummaryXML());
                }
                specs.append("</params>");
            }
            specs.append("<rootNetID>").
                    append(spec.getRootNet().getID()).
View Full Code Here

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

            webServiceGateway.setYawlService(yawlService);
        }
        List enablementParamElems = decompositionElem.getChildren("enablementParam", _yawlNS);
        for (int i = 0; i < enablementParamElems.size(); i++) {
            Element enablementParamElem = (Element) enablementParamElems.get(i);
            YParameter parameter = new YParameter(_decomposition, YParameter._ENABLEMENT_PARAM_TYPE);
            parameter.setOrdering(i);
            parseParameter(enablementParamElem, parameter, _yawlNS, isBeta2Version());
            webServiceGateway.setEnablementParameter(parameter);
        }
    }
View Full Code Here

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


    public String toString() {
        StringBuffer result = new StringBuffer();
        for (Iterator iterator = _inputParams.values().iterator(); iterator.hasNext();) {
            YParameter parameter = (YParameter) iterator.next();
            result.append(parameter.toSummaryXML());
        }
        for (Iterator iterator = _outputParams.values().iterator(); iterator.hasNext();) {
            YParameter parameter = (YParameter) iterator.next();
            result.append(parameter.toSummaryXML());
        }
        return result.toString();
    }
View Full Code Here

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

        }
    }
   
    public YParameter[] describeRequiredParams() {
        YParameter[] params = new YParameter[1];
        YParameter param;

        param = new YParameter(null, YParameter._INPUT_PARAM_TYPE);
        param.setDataTypeAndName(XSD_STRINGTYPE,"time", XSD_NAMESPACE);
        param.setDocumentation("Amount of Time the TimeService will wait before returning");
        params[0] = param;

        return params;
    }
View Full Code Here

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

        List inputParams = specData.getInputParams();

        List instructions = Collections.synchronizedList(new ArrayList());

        for (int i = 0; i < inputParams.size(); i++) {
            YParameter inputParam = (YParameter) inputParams.get(i);

            if (null != inputParam.getElementName()) {

                String elementName = inputParam.getElementName();
                ElementReuseInstruction instruction = new ElementReuseInstruction(elementName);
                instructions.add(instruction);
            }
            else if (null != inputParam.getDataTypeName()) {

                String elementName = inputParam.getName();
                String typeName = inputParam.getDataTypeName();
                boolean isPrimitiveType = "http://www.w3.org/2001/XMLSchema".equals(inputParam.getDataTypeNameSpace());
                ElementCreationInstruction instruction = new ElementCreationInstruction(
                        elementName,
                        typeName,
                        isPrimitiveType);
                instructions.add(instruction);
            }
           
            //if (inputParam.getElementName() != null) { // work item input param
            //    input.append(inputParam.getElementName()).append(",");
            //}
            else if (inputParam.isUntyped()) {
//               due to a bug, YAWL converts untyped parameters into creation parameters
                //UntypedElementInstruction instruction = new UntypedElementInstruction();
                //instructions.add(instruction);

                String elementName = inputParam.getName();
                //String typeName = inputParam.getDataTypeName();
                String typeName = "boolean";
                boolean isPrimitiveType = "http://www.w3.org/2001/XMLSchema".equals(inputParam.getDataTypeNameSpace());
                ElementCreationInstruction instruction = new ElementCreationInstruction(
                        elementName,
                        typeName,
                        isPrimitiveType);
                instructions.add(instruction);
View Full Code Here

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

            // this can be the instance file, and if identical elements are found in
            // the schema during instance creation, the creation of new elements in
            // the instance will be ignored.

            for (int i = 0; i < inputParams.size(); i++) {
                YParameter inputParam = (YParameter) inputParams.get(i);

                if (null != inputParam.getElementName()) {

                    String elementName = inputParam.getElementName();
                    ElementReuseInstruction instruction = new ElementReuseInstruction(elementName);
                    instructions.add(instruction);
                } else if (null != inputParam.getDataTypeName()) {

                    String elementName = inputParam.getName();
                    String typeName = inputParam.getDataTypeName();
                    boolean isPrimitiveType = "http://www.w3.org/2001/XMLSchema".equals(inputParam.getDataTypeNameSpace());
                    ElementCreationInstruction instruction = new ElementCreationInstruction(
                            elementName, typeName, isPrimitiveType);
                    instructions.add(instruction);
                }
                // currently we convert untyped parameters into creation parameters, due to a bug in YAWL
                else if (inputParam.isUntyped()) {
                    //UntypedElementInstruction instruction = new UntypedElementInstruction();
                    //instructions.add(instruction);

                    String elementName = inputParam.getName();
                    //String typeName = inputParam.getDataTypeName();
                    String typeName = "boolean";
                    boolean isPrimitiveType = "http://www.w3.org/2001/XMLSchema".equals(inputParam.getDataTypeNameSpace());
                    ElementCreationInstruction instruction = new ElementCreationInstruction(
                            elementName, typeName, isPrimitiveType);
                    instructions.add(instruction);
                }
            }
           
            //for each output param build an instruction
            List outputParams = paramsSignature.getOutputParams();

            for (int i = 0; i < outputParams.size(); i++) {

                YParameter outputParam = (YParameter) outputParams.get(i);

                if (null != outputParam.getElementName()) {

                    String elementName = outputParam.getElementName();
                    ElementReuseInstruction instruction = new ElementReuseInstruction(elementName);

                    // if an instruction with the same name already exists in the instruction list
                    // remove it and add the instruction for this parameter

                    if (instructions.contains(instruction) == true) {

                        // Matching element REUSE instruction found.
                        Instruction tempInstruction;
                        int position = instructions.indexOf(instruction);
                        tempInstruction = (Instruction) instructions.get(position);
                        if (tempInstruction.getElementName().compareTo(instruction.getElementName()) == 0) {
                            instructions.remove(position);
                        }
                    }
                    else {
                      logger.debug("No matching element REUSE instruction found: " + elementName);
                    }

                    instructions.add(instruction);
                } else if (null != outputParam.getDataTypeName()) {

                    String elementName = outputParam.getName();
                    String typeName = outputParam.getDataTypeName();
                    boolean isPrimitiveType = "http://www.w3.org/2001/XMLSchema".equals(outputParam.getDataTypeNameSpace());
                    ElementCreationInstruction instruction = new ElementCreationInstruction(
                            elementName, typeName, isPrimitiveType);

                    // if an instruction with the same name already exists in the instruction list
                    // remove it and add the instruction for this parameter
                    Instruction[] ins = (Instruction[]) instructions.toArray(new Instruction[instructions.size()]);

                    boolean match = false;
                    for (int j = 0; j < ins.length; j++) {
                        if (ins[j].getElementName().compareTo(elementName) == 0) {
                            match = true;
                            ins[j] = instruction; // replace old instruction with this one
                        }
                    }

                    if (match == true) {
                        // convert updated array back to the instructions arraylist
                        instructions.clear();
                        for (int j = 0; j < ins.length; j++) {
                            instructions.add(ins[j]);
                        }
                    }
                    else {
                        instructions.add(instruction);
                    }
                }
               
                // currently we convert untyped parameters into creation parameters, due to a bug in YAWL
                else if (outputParam.isUntyped()) {
                    //UntypedElementInstruction instruction = new UntypedElementInstruction();
                    //instructions.add(instruction);

                    String elementName = outputParam.getName();
                    //String typeName = outputParam.getDataTypeName();
                    String typeName = "boolean";
                    //boolean isPrimitiveType = "http://www.w3.org/2001/XMLSchema".equals(outputParam.getDataTypeNameSpace());
                    boolean isPrimitiveType = true;
                    ElementCreationInstruction instruction = new ElementCreationInstruction(
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.