Example Code - 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

This example will query for the first 10 records in the last 24 hours that were related to EPX client sessions.

public void queryAuditLog()

throws com.enterworks.shared.exception.SecurityException

{

System.out.println( getMessage("audit.query") );

AuditExtendedVO queryVO = new AuditExtendedVO();

// this indicates we want to audit log entryies for

// session objects

queryVO.setObjectTypeCode(SessionVO.ENTITY_NAME,false);

// specify a date range of the last 24 hours

Date startDate = new Date(System.currentTimeMillis()

-86400000L);

Date endDate = new Date();

// retrieve the list of audit log entries for the

// criteria specified

int maxRecords = 10;

Collection auditRecords =

auditFacade_.getAuditEntryList(

this.getSessionProfile(),queryVO,

startDate,endDate,0, maxRecords);

// iterate through the audit log entries and print them out

Iterator auditIter = auditRecords.iterator();

while ( auditIter.hasNext() )

{

AuditExtendedVO auditVO =

(AuditExtendedVO)auditIter.next();

String vargs[] = {

auditVO.getAuditDatetime().toLocaleString() ,

auditVO.getAuditText() };

System.out.println(

getMessage("audit.query.detail",vargs));

}

}