[jboss-user] [JBoss jBPM] - Re: required variables
kukeltje
do-not-reply at jboss.com
Thu Sep 13 13:39:27 EDT 2007
Olivier is 100% right.... I'm afraid....
in the Taskcontroller code:
initializing variables:
| if (variableAccess.isReadable()) {
| String variableName = variableAccess.getVariableName();
| Object value = contextInstance.getVariable(variableName, token);
| log.debug("creating task instance variable '"+mappedName+"' from process variable '"+variableName+"', value '"+value+"'");
| taskInstance.setVariableLocally(mappedName, value);
| } else {
|
submitting:
if ( (variableAccess.isRequired())
| && (! taskInstance.hasVariableLocally(mappedName))
| ) {
| ..... some error stuff
| }
|
So Olivier is correct, but I personally would be in favour of changing the latter to
if ( (variableAccess.isRequired())
| && (! taskInstance.hasVariableLocally(mappedName)
| && (taskInstance.getVariable(variableAccess.getMappedName()) != null) )
| ) {
| ..... some error stuff
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084116#4084116
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084116
More information about the jboss-user
mailing list