Examples of VariableScopeInstance


Examples of org.jbpm.process.instance.context.variable.VariableScopeInstance

   * @param variables
   */
  public void setProcessInstanceVariables(String processInstanceId, Map<String, Object> variables) {
    ProcessInstance processInstance = ksession.getProcessInstance(new Long(processInstanceId));
    if (processInstance != null) {
      VariableScopeInstance variableScope = (VariableScopeInstance)
        ((org.jbpm.process.instance.ProcessInstance) processInstance)
          .getContextInstance(VariableScope.VARIABLE_SCOPE);
      if (variableScope == null) {
        throw new IllegalArgumentException(
          "Could not find variable scope for process instance " + processInstanceId);
      }
      for (Map.Entry<String, Object> entry: variables.entrySet()) {
        variableScope.setVariable(entry.getKey(), entry.getValue());
      }
    } else {
      throw new IllegalArgumentException("Could not find process instance " + processInstanceId);
    }
  }
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.