}
}
}
// instantiates a new Execution controller for the current execution
ExecutionInstance instance = createExecutionInstance(id, role, profile, request, modality);
// put execution instance in session
contextManager.set(ExecutionInstance.class.getName(), instance);
instance.refreshParametersValues(request, true);
instance.setParameterValues(userProvidedParametersStr, true);
// refresh obj variable because createExecutionInstance load the BIObject in a different way
obj = instance.getBIObject();
// if a snapshot is required, executes it
if (snapshot != null) {
executeSnapshot(snapshot, response);
return;
}
// TODO cancellare quando anche la check list � nella finestra di lookup
Map paramsDescriptionMap = new HashMap();
List biparams = obj.getBiObjectParameters();
Iterator iterParams = biparams.iterator();
while (iterParams.hasNext()) {
BIObjectParameter biparam = (BIObjectParameter) iterParams.next();
String nameUrl = biparam.getParameterUrlName();
paramsDescriptionMap.put(nameUrl, "");
}
contextManager.set("PARAMS_DESCRIPTION_MAP", paramsDescriptionMap);
// finds if it is requested to ignore subobjects/snapshots/viewpoints if present
String ignoreSubNodesStr = (String) request.getAttribute(SpagoBIConstants.IGNORE_SUBOBJECTS_VIEWPOINTS_SNAPSHOTS);
boolean ignoreSubNodes = false;
if (ignoreSubNodesStr != null && ignoreSubNodesStr.trim().equalsIgnoreCase("true")) {
ignoreSubNodes = true;
}
// finds if it is not important that all parameters have a value
String runAnyway = (String) request.getAttribute(SpagoBIConstants.RUN_ANYWAY);
boolean runAnywayB = false;
if (runAnyway != null && runAnyway.trim().equalsIgnoreCase("true")) {
runAnywayB = true;
}
// check parameters values
List errors = instance.getParametersErrors();
// (if the object can be directly executed (because it hasn't any parameter to be
// filled by the user) and if the object has no subobject / snapshots / viewpoints saved
// or the request esplicitely asks to ignore subnodes) or (a valid subobject
// is specified by request) then execute it directly without pass through parameters page
if (((instance.isDirectExecution()||runAnywayB) && ((subObjects.size() == 0
&& snapshots.size() == 0 && viewpoints.size() == 0) || ignoreSubNodes))
|| subObj != null) {
logger.debug("Document can be directly executed");
// add errors into error handler if any