Complete Example Program - 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
First publish date
2007
Last updated
2023-07-28
Published on
2023-09-20T04:07:07.148709

This example program will create a new audit log entry, and will then perform a retrieval of audit log records according to some criteria. There are no additional program parameters for this example other than those specified in the LoginExample program.

For example:

C:\Enterworks\EPX\examples\api\run.bat AuditExample

-server EPX_somehost -user system -password system

public static void main(String args[]) throws Exception

{

try

{

String serverUID = null;

String user = "system";

String password = "system";

for ( int i=0 ; i < args.length; i++)

{

String arg = args[i];

if (arg.startsWith("-"))

{

if (arg.substring(1).equals("server"))

serverUID = args[++i];

else if (arg.substring(1).equals("user"))

user = args[++i];

else if (arg.substring(1).equals("password"))

password = args[++i];

}

}

// create a new work item purge example and login

AuditExample auditExample;

auditExample = new AuditExample(serverUID,user,password);

auditExample.login();

// create a custom audit log entry

auditExample.createAuditEntry();

// perform a query on existing audit log entries

auditExample.queryAuditLog();

auditExample.logout();

}

catch( Exception e )

{

System.err.println

( "AuditExample.main(exception):" +e );

e.printStackTrace();

}