Package org.jbpm.context.exe

Examples of org.jbpm.context.exe.VariableInstance


      Map<String, VariableInstance> variableInstances = variableContainer.getVariableInstances();
      if (variableInstances == null) continue;

      // loop over all variable instances in the container
      for (Map.Entry<String, VariableInstance> entry : variableInstances.entrySet()) {
        VariableInstance variableInstance = entry.getValue();
        if (!(variableInstance instanceof UnpersistableInstance)) continue;

        // the variable is unpersistable... booom!
        String name = entry.getKey();
        Object value = variableInstance.getValue();
        if (value != null) {
          throw new JbpmException("variable '"
              + name
              + "' in "
              + variableContainer
View Full Code Here


          // loop over all variable instances in the container
          Iterator varInstancesIter = variableInstances.entrySet().iterator();
          while (varInstancesIter.hasNext()) {
            Map.Entry entry = (Map.Entry) varInstancesIter.next();
            String name = (String) entry.getKey();
            VariableInstance variableInstance = (VariableInstance) entry.getValue();

            // if the variable is of the unpersistable type...  booom!
            if (variableInstance instanceof UnpersistableInstance) {
              Object value = variableInstance.getValue();
              if (value!=null) {
                throw new JbpmException("variable '"+name+"' in '"+variableContainer+"' contains '"+value+"': type '"+value.getClass().getName()+"' is unpersistable according to the jbpm.varmapping.xml configuration");
              } else {
                throw new JbpmException("variable '"+name+"' in '"+variableContainer+"' was created with a non persistable value");
              }
View Full Code Here

      // the default behaviour is that all task-local variables are flushed to the process
      if (variableInstances!=null) {
        ContextInstance contextInstance = token.getProcessInstance().getContextInstance();
        Iterator iter = variableInstances.values().iterator();
        while(iter.hasNext()) {
          VariableInstance variableInstance = (VariableInstance) iter.next();
          log.debug("flushing variable '"+variableInstance.getName()+"' from task '"+name+"' to process variables");
          // This might be optimized, but this was the simplest way to make a clone of the variable instance.
          contextInstance.setVariable(variableInstance.getName(), variableInstance.getValue(), token);
        }
      }
    }
  }
View Full Code Here

      // the default behaviour is that all task-local variables are flushed to the process
      if (variableInstances!=null) {
        ContextInstance contextInstance = token.getProcessInstance().getContextInstance();
        Iterator iter = variableInstances.values().iterator();
        while(iter.hasNext()) {
          VariableInstance variableInstance = (VariableInstance) iter.next();
          log.debug("flushing variable '"+variableInstance.getName()+"' from task '"+name+"' to process variables");
          // This might be optimized, but this was the simplest way to make a clone of the variable instance.
          contextInstance.setVariable(variableInstance.getName(), variableInstance.getValue(), token);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.context.exe.VariableInstance

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.