Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
themeEclipse
titleexportVoucher methodEXAMPLEExportBean
collapsetrue
public class EXAMPLEExportBean extends CRMExportBean {   

...
 	public void export(String processRunLogID) throws Exception {
        
		CallList.LogTextFile(getCRMSession(), "Example Export start processing (" + processRunLogID + ")", "exportExample","");

		CRMDOProcessRunLog processRun = (CRMDOProcessRunLog)processRunLogBean.load(processRunLogID);
    
        processRun.setStatus(ProcessRunLogStatus.IN_PROGRESS);
    	processRun.setStartDate(getCurrentDate());
    	processRunLogBean.save(processRun);
        
        Boolean processComplete = new Boolean(false);
    
        try
        {
			exportInExcelFormat(processRun);
               
            processComplete = new Boolean(true);
            
        }
        catch (Exception e)
        {
			CallList.LogTextFile(getCRMSession(), "Error on processing export (" + processRunLogID + ")" + ExceptionUtil.getStackTrace(e), "exportExample","");

            processRun.setStatus(ProcessRunLogStatus.FAILED);
            processRunLogBean.save(processRun);
        }
        
        if (processComplete)   
        {
            processRun.setStatus(ProcessRunLogStatus.COMPLETED);
            processRun.setEndDate(getCurrentDate());
            processRunLogBean.save(processRun);
        }

		CallList.LogTextFile(getCRMSession(), "Example Export end processing (" + processRunLogID + ")", "exportExample","");
    }
	
...
}

...