[jboss-user] [JBoss jBPM] - Re: How to Handle Process Execution History

brado do-not-reply at jboss.com
Wed Jul 12 23:51:25 EDT 2006


I must really be missing something here. I traced into the jbpmContext.save(processInstance) call, and the call stack eventually arrives at the following method in the org.jbpm.svc.save.CheckUnpersistableVariablesOperation class:


  | public void save(ProcessInstance processInstance, JbpmContext jbpmContext) {
  |     Collection updatedVariableContainers = VariableContainer.getUpdatedVariableContainers(processInstance);
  |     if (updatedVariableContainers!=null) {
  | 
  |       // loop over all updated variable containers
  |       Iterator iter = updatedVariableContainers.iterator();
  |       while (iter.hasNext()) {
  |         VariableContainer variableContainer = (VariableContainer) iter.next();
  |         Map variableInstances = variableContainer.getVariableInstances();
  |         if (variableInstances!=null) {
  | 
  |           // 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");
  |               }
  |             }
  |           }
  |         }
  |       }
  |     }
  |   }
  | 

Tracing through this code, I don't see where or how either log data or the process instance is ever saved to the database. I must be missing it, but where in this code (or in any code) is the actual save made to the database? Again, I'm using jbpm3.1.1. 

Thanks for your help...

Brad

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957615#3957615

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957615



More information about the jboss-user mailing list