Package au.edu.qut.yawl.worklist.model

Examples of au.edu.qut.yawl.worklist.model.YParametersSchema


            }
            if (_paramsDefinitions.getParamsForTask(item.getTaskID()) == null) {
                YTask task = _engineClient.getTaskDefinition(item.getSpecificationID(), item.getTaskID());
                String paramsAsXML = task.getInformation();
                TaskInformation taskInfo = Marshaller.unmarshalTaskInformation(paramsAsXML);
                YParametersSchema paramsForTask = taskInfo.getParamSchema();
                _paramsDefinitions.setParamsForTask(item.getTaskID(), paramsForTask);
            }
        }
    }
View Full Code Here


        return this._myActiveTasks;
    }


    public String getOutputSkeletonXML(String caseID, String taskID) {
        YParametersSchema params = _paramsDefinitions.getParamsForTask(taskID);
        YWorkItem item = _engineClient.getWorkItem(caseID + ":" + taskID);
        String specID = item.getSpecificationID();
        YTask task = _engineClient.getTaskDefinition(specID, item.getTaskID());
        return Marshaller.getOutputParamsInXML(
                params,
View Full Code Here

    }



    public YParameter getMIUniqueParam(String taskID) {
        YParametersSchema p = _paramsDefinitions.getParamsForTask(taskID);
        if (p == null) {
            return null;
        }
        return p.getFormalInputParam();
    }
View Full Code Here

        // set instance data
        InstanceBuilder ib = new InstanceBuilder(schema, taskInfo.getDecompositionID(), item.getDataListString());
        parameters.put("instance", ib.getInstance());
       
        // set input params (if any exist)
        YParametersSchema paramsSignature = taskInfo.getParamSchema();
        parameters.put("inputparams", getInputOnlyParams(paramsSignature.getInputParams(), paramsSignature.getOutputParams()));
        parameters.put("root", taskInfo.getDecompositionID());
        parameters.put("task", URLEncoder.encode(taskInfo.getTaskID(), "UTF-8"));
        parameters.put("workItemID", item.getID());
        parameters.put("JSESSIONID", jsessionid);
       
View Full Code Here

            //next get specification data which will contain the input schema library
            //that we are going to use to build the schema that we want for this task.
            SpecificationData specData = worklistController.getSpecificationData(specID, _sessionHandle);

            //now we get the parameters signature for the task
            YParametersSchema paramsSignature = taskInfo.getParamSchema();

            //now for each input param build an instruction
            List inputParams = paramsSignature.getInputParams();
            List instructions = Collections.synchronizedList(new ArrayList());

            // this is an XML string containing the instance data for the current task
            // 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);
View Full Code Here

TOP

Related Classes of au.edu.qut.yawl.worklist.model.YParametersSchema

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.