Examples of VariableScope


Examples of org.jbpm.process.core.context.variable.VariableScope

public class CompositeNodeHandler extends AbstractNodeHandler {

    protected Node createNode() {
        CompositeContextNode result = new CompositeContextNode();
        VariableScope variableScope = new VariableScope();
        result.addContext(variableScope);
        result.setDefaultContext(variableScope);
        return result;
    }
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

      for (String eventType: compositeNode.getActionTypes()) {
          writeActions(eventType, compositeNode.getActions(eventType), xmlDump);
        }
        writeTimers(compositeNode.getTimers(), xmlDump);
        if (compositeNode instanceof CompositeContextNode) {
          VariableScope variableScope = (VariableScope)
        ((CompositeContextNode) compositeNode).getDefaultContext(VariableScope.VARIABLE_SCOPE);
          if (variableScope != null) {
            List<Variable> variables = variableScope.getVariables();
            XmlWorkflowProcessDumper.visitVariables(variables, xmlDump);
          }
          ExceptionScope exceptionScope = (ExceptionScope)
        ((CompositeContextNode) compositeNode).getDefaultContext(ExceptionScope.EXCEPTION_SCOPE);
        if (exceptionScope != null) {
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

        nodeType = "transaction";
      }
    writeNode(nodeType, compositeNode, xmlDump, metaDataType);
    xmlDump.append(" >" + EOL);
        // variables
    VariableScope variableScope = (VariableScope)
            compositeNode.getDefaultContext(VariableScope.VARIABLE_SCOPE);
    if (variableScope != null && !variableScope.getVariables().isEmpty()) {
            xmlDump.append("    <!-- variables -->" + EOL);
            for (Variable variable: variableScope.getVariables()) {
                xmlDump.append("    <property id=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(variable.getName()) + "\" ");
                if (variable.getType() != null) {
                    xmlDump.append("itemSubjectRef=\"" + XmlBPMNProcessDumper.getUniqueNodeId(compositeNode) + "-" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(variable.getName()) + "Item\"" );
                }
                // TODO: value
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

            if (contextResolver != null) {
                for (String variableName: variableNames) {
                    if analysis.getMvelVariables().keySet().contains( variableName ) ||  variableName.equals( "kcontext" ) || variableName.equals( "context" ) ) {
                        continue;
                    }                   
                    VariableScope variableScope = (VariableScope) contextResolver.resolveContext(VariableScope.VARIABLE_SCOPE, variableName);
                    if (variableScope == null) {
                        context.getErrors().add(
                            new DescrBuildError(
                                context.getParentDescr(),
                                descr,
                                null,
                                "Could not find variable '" + variableName + "' for action '" + descr.getText() + "'" ) );                   
                    } else {
                        variables.put(variableName,
                                      context.getDialect().getTypeResolver().resolveType(variableScope.findVariable(variableName).getType().getStringType()));
                    }
                }
            }

            MVELCompilationUnit unit = dialect.getMVELCompilationUnit( text,
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

            final ContextResolver contextResolver) {
      Map map = createVariableContext(className, text, context, globals);
      List<String> variables = new ArrayList<String>();
      final List variableTypes = new ArrayList(globals.length);
        for (String variableName: unboundIdentifiers) {
          VariableScope variableScope = (VariableScope) contextResolver.resolveContext(VariableScope.VARIABLE_SCOPE, variableName);
          if (variableScope != null) {
            variables.add(variableName);
            variableTypes.add(variableScope.findVariable(variableName).getType().getStringType());
          }
        }

        map.put("variables",
                variables);
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

            if (contextResolver != null) {
              for (String variableName: variableNames) {
                  if ( analysis.getMvelVariables().keySet().contains( variableName ) ||  variableName.equals( "kcontext" ) || variableName.equals( "context" ) ) {
                      continue;
                  }
                VariableScope variableScope = (VariableScope) contextResolver.resolveContext(VariableScope.VARIABLE_SCOPE, variableName);
                if (variableScope == null) {
                  context.getErrors().add(
                  new DescrBuildError(
                  context.getParentDescr(),
                              actionDescr,
                              null,
                              "Could not find variable '" + variableName + "' for action '" + actionDescr.getText() + "'" ) );               
                } else {
                  variables.put(variableName,
                                context.getDialect().getTypeResolver().resolveType(variableScope.findVariable(variableName).getType().getStringType()));
                }
              }
            }

            MVELCompilationUnit unit = dialect.getMVELCompilationUnit( text,
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

                                    attrs );
        ContextContainer contextContainer = (ContextContainer) parser.getParent();
        final String name = attrs.getValue("name");
        emptyAttributeCheck(localName, "name", name, parser);
       
        VariableScope variableScope = (VariableScope)
            contextContainer.getDefaultContext(VariableScope.VARIABLE_SCOPE);
        Variable variable = new Variable();
        if (variableScope != null) {
            variable.setName(name);
            List<Variable> variables = variableScope.getVariables();
            if (variables == null) {
                variables = new ArrayList<Variable>();
                variableScope.setVariables(variables);
            }
            variables.add(variable);
        } else {
            throw new SAXParseException(
                "Could not find default variable scope.", parser.getLocator());
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

    protected void visitHeader(WorkflowProcess process, StringBuilder xmlDump, boolean includeMeta) {
        xmlDump.append("  <header>" + EOL);
        visitImports(((org.jbpm.process.core.Process) process).getImports(), xmlDump);
        visitGlobals(((org.jbpm.process.core.Process) process).getGlobals(), xmlDump);
        visitFunctionImports(((org.jbpm.process.core.Process) process).getFunctionImports(), xmlDump);
        VariableScope variableScope = (VariableScope)
          ((org.jbpm.process.core.Process) process).getDefaultContext(VariableScope.VARIABLE_SCOPE);
        if (variableScope != null) {
            visitVariables(variableScope.getVariables(), xmlDump);
        }
        SwimlaneContext swimlaneContext = (SwimlaneContext)
          ((org.jbpm.process.core.Process) process).getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE);
        if (swimlaneContext != null) {
            visitSwimlanes(swimlaneContext.getSwimlanes(), xmlDump);
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

    final String itemSubjectRef = attrs.getValue("itemSubjectRef");

    Object parent = parser.getParent();
    if (parent instanceof ContextContainer) {
        ContextContainer contextContainer = (ContextContainer) parent;
        VariableScope variableScope = (VariableScope)
                contextContainer.getDefaultContext(VariableScope.VARIABLE_SCOPE);
      List variables = variableScope.getVariables();
      Variable variable = new Variable();
      variable.setMetaData("DataObject", "true");
      variable.setName(id);
      // retrieve type from item definition
      DataType dataType = new ObjectDataType();
View Full Code Here

Examples of org.jbpm.process.core.context.variable.VariableScope

public class SubProcessHandler extends AbstractNodeHandler {
   
    protected Node createNode(Attributes attrs) {
      CompositeContextNode result = new CompositeContextNode();
        VariableScope variableScope = new VariableScope();
        result.addContext(variableScope);
        result.setDefaultContext(variableScope);
        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.