Package org.drools.process.core.datatype

Examples of org.drools.process.core.datatype.DataType


            }
            String result = "rule dummy when eval( ";
            VariableScope variableScope = (VariableScope) process.getDefaultContext(VariableScope.VARIABLE_SCOPE);
            if (variableScope != null) {
                for (Variable variable: variableScope.getVariables()) {
                    DataType type = variable.getType();
                    result +=  type.getStringType() + " " + variable.getName() + "; ";
                }
            }
            return result + prefix;
        } else {
            return "rule dummy \n when \n" + prefix;
View Full Code Here


                contextContainer.getDefaultContext(VariableScope.VARIABLE_SCOPE);
      List variables = variableScope.getVariables();
      Variable variable = new Variable();
      variable.setName(id);
      // retrieve type from item definition
      DataType dataType = new ObjectDataType();
      Map<String, ItemDefinition> itemDefinitions = (Map<String, ItemDefinition>)
              ((ProcessBuildData) parser.getData()).getMetaData("ItemDefinitions");
          if (itemDefinitions != null) {
            ItemDefinition itemDefinition = itemDefinitions.get(itemSubjectRef);
            if (itemDefinition != null) {
View Full Code Here

      List variables = variableScope.getVariables();
      Variable variable = new Variable();
      variable.setMetaData("DataObject", "true");
      variable.setName(id);
      // retrieve type from item definition
      DataType dataType = new ObjectDataType();
      Map<String, ItemDefinition> itemDefinitions = (Map<String, ItemDefinition>)
              ((ProcessBuildData) parser.getData()).getMetaData("ItemDefinitions");
          if (itemDefinitions != null) {
            ItemDefinition itemDefinition = itemDefinitions.get(itemSubjectRef);
            if (itemDefinition != null) {
View Full Code Here

        while (subNode != null) {
            String nodeName = subNode.getNodeName();
            if ("inputDataItem".equals(nodeName)) {
              String variableName = ((Element) subNode).getAttribute("id");
              String itemSubjectRef = ((Element) subNode).getAttribute("itemSubjectRef");
              DataType dataType = null;
              Map<String, ItemDefinition> itemDefinitions = (Map<String, ItemDefinition>)
                ((ProcessBuildData) parser.getData()).getMetaData("ItemDefinitions");
            if (itemDefinitions != null) {
              ItemDefinition itemDefinition = itemDefinitions.get(itemSubjectRef);
              if (itemDefinition != null) {
View Full Code Here

    }

    private Set<PortableParameterDefinition> convertWorkItemParameters(Set<ParameterDefinition> parameters) {
        Set<PortableParameterDefinition> pps = new HashSet<PortableParameterDefinition>();
        for ( ParameterDefinition pd : parameters ) {
            DataType pdt = pd.getType();
            PortableParameterDefinition ppd = null;
            if ( pdt instanceof BooleanDataType ) {
                ppd = new PortableBooleanParameterDefinition();
            } else if ( pdt instanceof FloatDataType ) {
                ppd = new PortableFloatParameterDefinition();
View Full Code Here

    }

    private Set<PortableParameterDefinition> convertWorkItemParameters(Set<ParameterDefinition> parameters) {
        Set<PortableParameterDefinition> pps = new HashSet<PortableParameterDefinition>();
        for (ParameterDefinition pd : parameters) {
            DataType pdt = pd.getType();
            PortableParameterDefinition ppd = null;
            if (pdt instanceof BooleanDataType) {
                ppd = new PortableBooleanParameterDefinition();
            } else if (pdt instanceof FloatDataType) {
                ppd = new PortableFloatParameterDefinition();
View Full Code Here

        parser.startElementBuilder( localName,
                                    attrs );
        TypeObject typeable = (TypeObject) parser.getParent();
        final String name = attrs.getValue("name");
        emptyAttributeCheck(localName, "name", name, parser);
        DataType dataType = null;
        try {
            dataType = (DataType) Class.forName(name).newInstance();
            // TODO make this pluggable so datatypes can read in other properties as well
            if (dataType instanceof ObjectDataType) {
                final String className = attrs.getValue("className");
View Full Code Here

          return o1.getName().compareTo(o2.getName());
        }
             
            });
            for (ParameterDefinition paramDefinition: parameterDefinitions) {
              DataType dataType = paramDefinition.getType();
                xmlDump.append("        <parameter name=\"" + paramDefinition.getName() + "\" >" + EOL + "  ");
                XmlWorkflowProcessDumper.visitDataType(dataType, xmlDump);
                Object value = work.getParameter(paramDefinition.getName());
                if (value != null) {
                  xmlDump.append("  ");
View Full Code Here

        parser.startElementBuilder( localName,
                                    attrs );
        TypeObject typeable = (TypeObject) parser.getParent();
        final String name = attrs.getValue("name");
        emptyAttributeCheck(localName, "name", name, parser);
        DataType dataType = null;
        try {
            dataType = (DataType) Class.forName(name).newInstance();
            // TODO make this pluggable so datatypes can read in other properties as well
            if (dataType instanceof ObjectDataType) {
                String className = attrs.getValue("className");
View Full Code Here

          return o1.getName().compareTo(o2.getName());
        }
             
            });
            for (ParameterDefinition paramDefinition: parameterDefinitions) {
              DataType dataType = paramDefinition.getType();
                xmlDump.append("        <parameter name=\"" + paramDefinition.getName() + "\" >" + EOL + "  ");
                XmlWorkflowProcessDumper.visitDataType(dataType, xmlDump);
                Object value = work.getParameter(paramDefinition.getName());
                if (value != null) {
                  xmlDump.append("  ");
View Full Code Here

TOP

Related Classes of org.drools.process.core.datatype.DataType

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.