Package org.jbpm.process.core.context.variable

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


        ((InternalProcessRuntime) kruntime.getProcessRuntime()).getProcessInstanceManager()
        .addProcessInstance( processInstance );

        // set variable default values
        // TODO: should be part of processInstanceImpl?
        VariableScope variableScope = (VariableScope) ((ContextContainer) process).getDefaultContext( VariableScope.VARIABLE_SCOPE );
        VariableScopeInstance variableScopeInstance = (VariableScopeInstance) processInstance.getContextInstance( VariableScope.VARIABLE_SCOPE );
        // set input parameters
        if ( parameters != null ) {
            if ( variableScope != null ) {
                for ( Map.Entry<String, Object> entry : parameters.entrySet() ) {
View Full Code Here


    private static final long serialVersionUID = 510l;
   
    public RuleFlowProcess() {
        setType(RULEFLOW_TYPE);
        // TODO create contexts on request ?
        VariableScope variableScope = new VariableScope();
        addContext(variableScope);
        setDefaultContext(variableScope);
        SwimlaneContext swimLaneContext = new SwimlaneContext();
        addContext(swimLaneContext);
        setDefaultContext(swimLaneContext);
View Full Code Here

        if ("code".equals(type)) {
            if (prefix.startsWith("return ")) {
                prefix = prefix.substring(7);
            }
            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;
View Full Code Here

    private IPropertyDescriptor[] descriptors;

    public CompositeContextNodeWrapper() {
        setNode(new CompositeContextNode());
        getCompositeNode().setName("CompositeNode");
        VariableScope variableScope = new VariableScope();
        getCompositeContextNode().addContext(variableScope);
        getCompositeContextNode().setDefaultContext(variableScope);
    }
View Full Code Here

          "        results = new HashMap<String, Object>();\n" +
          "        // add results here\n";
        }
        for (Map.Entry<String, String> entry: taskNode.getOutMappings().entrySet()) {
          String type = null;
          VariableScope variableScope = (VariableScope) taskNode.resolveContext(VariableScope.VARIABLE_SCOPE, entry.getValue());
          if (variableScope != null) {
            type = variableScope.findVariable(entry.getValue()).getType().getStringType();
          }
          testCode +=
            "        // results.put(\"" + entry.getKey() + "\", value);" + (type == null ? "" : " // type " + type) + "\n";
        }
        testCode +=
View Full Code Here

                  task = new TaskDef(taskName);
                  tasks.put(taskName, task);
                }
                for (Map.Entry<String, String> entry: node.getInMappings().entrySet()) {
                  if (task.getInputParams().get(entry.getKey()) == null) {
                    VariableScope variableScope = (VariableScope) node.resolveContext(VariableScope.VARIABLE_SCOPE, entry.getValue());
                        if (variableScope != null) {
                          task.getInputParams().put(entry.getKey(), variableScope.findVariable(entry.getValue()).getType().getStringType());
                        }
                  }
                }
                for (Map.Entry<String, String> entry: node.getOutMappings().entrySet()) {
                  if (task.getOutputParams().get(entry.getKey()) == null) {
                    VariableScope variableScope = (VariableScope) node.resolveContext(VariableScope.VARIABLE_SCOPE, entry.getValue());
                        if (variableScope != null && !"outcome".equals(entry.getKey())) {
                          task.getOutputParams().put(entry.getKey(), variableScope.findVariable(entry.getValue()).getType().getStringType());
                        }
                  }
                }
              }
                WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
View Full Code Here

        if ("code".equals(type)) {
            if (prefix.startsWith("return ")) {
                prefix = prefix.substring(7);
            }
            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;
View Full Code Here

    private static final long serialVersionUID = 510l;
   
    public DynamicNodeWrapper() {
        setNode(new DynamicNode());
        getDynamicNode().setName("Dynamic");
        VariableScope variableScope = new VariableScope();
        getDynamicNode().addContext(variableScope);
        getDynamicNode().setDefaultContext(variableScope);
    }
View Full Code Here

    private IPropertyDescriptor[] descriptors;

    public CompositeContextNodeWrapper() {
        setNode(new CompositeContextNode());
        getCompositeNode().setName("CompositeNode");
        VariableScope variableScope = new VariableScope();
        getCompositeContextNode().addContext(variableScope);
        getCompositeContextNode().setDefaultContext(variableScope);
    }
View Full Code Here

        if ("code".equals(type)) {
            if (prefix.startsWith("return ")) {
                prefix = prefix.substring(7);
            }
            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;
View Full Code Here

TOP

Related Classes of org.jbpm.process.core.context.variable.VariableScope

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.