String documentLabel;
// par1=val1&par2=val2... for parameters already set in scheduled activity's configuration
String inputParametersQueryString;
IBIObjectDAO biobjdao;
BIObject biobj;
ExecutionController executionController;
ExecutionProxy executionProxy;
EventsManager eventManager;
logger.debug("IN");
try {
profile = UserProfile.createSchedulerUserProfile();
jobDataMap = jobExecutionContext.getMergedJobDataMap();
biobjdao = DAOFactory.getBIObjectDAO();
String doclabelsConcat = jobDataMap.getString("documentLabels");
String[] docLabels = doclabelsConcat.split(",");
Iterator itr = jobDataMap.keySet().iterator();
while(itr.hasNext()) {
Object key = itr.next();
Object value = jobDataMap.get(key);
logger.debug("jobDataMap parameter [" + key + "] is equal to [" + value + "]");
}
long startSchedule = System.currentTimeMillis();
logger.debug("Scheduled activity contains [" + docLabels.length + "] documnt(s)");
for(int ind = 0; ind < docLabels.length; ind++) {
documentInstanceName = docLabels[ind];
documentLabel = documentInstanceName.substring(0, documentInstanceName.lastIndexOf("__"));
logger.debug("Processing document [" + (ind+1) + "] with label [" + documentLabel + "] ...");
inputParametersQueryString = jobDataMap.getString(documentInstanceName);
logger.debug("Input parameters query string for documet [" + documentLabel + "] is equal to [" + inputParametersQueryString + "]");
// load bidocument
biobj = biobjdao.loadBIObjectByLabel(documentLabel);
// get the save options
String saveOptString = jobDataMap.getString("biobject_id_" + biobj.getId() + "__"+ (ind+1));
SaveInfo saveInfo = SchedulerUtilities.fromSaveInfoString(saveOptString);