Can we recover the failed Bursting cases?

This is valid requirement. When we burst thousands of reports and some of them fail at document generation stage or delivery stage. We should be able to re-run the process for failed cases only.

This functionality is available in latest Bursting Engine but it was not documented. Since it was not documented it is not officially supported. Those who want to give a try, here are the steps.

Make sure you define the key attribute at Document level in bursting control file. The key should be unique for each document.

bc.jpg

Run the Bursting process in normal mode. After Bursting process complete, getRecoveryKeys() method of BurstingProcessorEngine returns the Vector which hold keys for all failed documents. Serialize this vector to file system as XML or simple text file. You need to write your own code for writing and reading these keys from file system.

try
{
//Logger.setLevel(Logger.STATEMENT);
BurstingProcessorEngine bp = new BurstingProcessorEngine();
bp.setTempDirectory("c:\\burst\\temp");
bp.setXMLAPI("c:\\burst\\InvoiceBurstingControlFile.xml");
dp.setData("c:\\burst\\InvoceData.xml");
Properties prop= new Properties();
prop.put("user-variable:EMAIL","xxxxxxx@xxxx.com");
dp.setConfig(prop);
dp.process();
Vector recoveryKeys = dp.getRecoveryKeys();
//Save these recovery keys to file system, we need to reconstruct the vector during recovery process//
dp.deletTemporaryOutputFiles();
} catch (Exception e)
{
Logger.log(e);
}

During recovery process, reinitialize the Vector from the earlier file, which hold all the failed keys. Set these keys to BurstingProcessEngine and run it in recovery mode. This will only process the failed cases.

try
{
//Logger.setLevel(Logger.STATEMENT);
BurstingProcessorEngine bp = new BurstingProcessorEngine();
bp.setTempDirectory("c:\\burst\\temp");
bp.setXMLAPI("c:\\burst\\InvoiceBurstingControlFile.xml");
dp.setData("c:\\burst\\InvoceData.xml");
Properties prop= new Properties();
prop.put("user-variable:EMAIL","xxxxxxx@xxxx.com");
dp.setConfig(prop);
Vector recoveryKeys=null;
//initialize Vector with recovery keys extracted during main process//
dp.setRecoveryKeys(recoveryKeys);

dp.process();
dp.deletTemporaryOutputFiles();
} catch (Exception e)
{
Logger.log(e);
}

Please try and let me know your experience.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

bocadmin_ww

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today