[jboss-user] [JBoss jBPM] - Re: required variables

dleerob do-not-reply at jboss.com
Thu Sep 13 14:38:26 EDT 2007


Well incase this will help anyone else, my quick fix will probably be running the following code before calling the taskInstance.end() method:

Map variables = taskInstance.getVariablesLocally();
  | 		if (variables != null) {
  | 			for (Iterator it = variables.keySet().iterator();it.hasNext();) {
  | 				String variableName = (String)it.next();
  | 				if (variables.get(variableName) == null) {
  | 					startTaskInstance.deleteVariable(variableName);
  | 				}
  | 			}
  | 		}
All local variables with a null value will be deleted, and if any of those variables are set to "required", the IllegalArgumentException will be thrown when the taskInstance.end() method is called, and therefore validation will work.

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

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



More information about the jboss-user mailing list