try {
evar._engine.configure(_pid, evar._extVarId, evar._config);
} catch (ExternalVariableModuleException eve) {
__log.error("External variable subsystem configuration error.", eve);
throw new BpelEngineException("External variable subsystem configuration error.",eve);
}
if (_externalVariables.containsKey(var.extVariableId)) {
__log.warn("Duplicate external variable configuration for \"" + var.extVariableId + "\" will be ignored!");
}
_externalVariables.put(var.extVariableId, evar);
}
// Walk down the process definition looking for any external variables.
// TODO move this to deployment
// for (OBase child : oprocess.getChildren()) {
// if (!(child instanceof OScope))
// continue;
// OScope oscope = (OScope) child;
// for (OScope.Variable var : oscope.variables.values()) {
// if (var.extVar == null)
// continue;
//
// EVar evar = _externalVariables.get(var.extVar.externalVariableId);
// if (evar == null) {
// __log.error("The \"" + oscope.name + "\" scope declared an unknown external variable \""
// + var.extVar.externalVariableId + "\"; check the deployment descriptor.");
// fatal = true;
// continue;
// }
// }
// }
if (fatal) {
String errmsg = "Error initializing external variables. See log for details.";
__log.error(errmsg);
throw new BpelEngineException(errmsg);
}
}