Example code for an external audit store - EnterWorks_Process_Exchange_(EPX) - 10.6

EnterWorks EPX Programmers Reference

Product type
Software
Portfolio
Verify
Product family
EnterWorks
Product
Precisely EnterWorks > EnterWorks Process Exchange (EPX)
Version
10.6
Language
English
Product name
Precisely EnterWorks
Title
EnterWorks EPX Programmers Reference
Topic type
Programming Reference
Reference
First publish date
2007

The FileAuditStore example code is shown below:

public class FileAuditStore implements AuditStore

{

/** default constructor */

public FileAuditStore()

{

}

/**

*method to implement be provides, this will allow custom audit

* mechanism to perform its task of auditing

*

* @param sessionProfile - a handle to the session profile of

* the component calling the external auditing class

* @param auditVO - the audit value object that would otherwise

* be persisted by the product

* @throws BaseException

*/

public void addAuditRecord(SessionProfile sessionProfile,

AuditVO auditVO) throws BaseException

{

try

{

PrintWriter pw =

new PrintWriter(new FileWriter("fileaudit.log",true));

pw.println(auditVO.toXML());

pw.close();

}

catch ( Exception e )

{

AuditManager.error(

"file.audit","addAuditRecord exception",e);

}

}

}

The AuditStore interface is defined as follows:

public interface AuditStore

{

/**

* method to implement be provides, this will allow custom

* audit mechanism to perform its task of auditing

*

* @param sessionProfile - a handle to the session profile

* of the component calling the external auditing class

* @param auditVO - the audit value object that would

* otherwise be persisted by the product

* @throws BaseException

*/

public void addAuditRecord(

SessionProfile sessionProfile,AuditVO auditVO)

throws BaseException;

}