// wait some time because of asynchronous processing
Thread.sleep(5000);
// get first activity started automatically
WfActivity a = actByName (process, "A21");
// check audit event(s) of first activity
Collection activityEvents = a.history();
//displayAuditEvents(activityEvents);
checkAuditEventsForActivity21(activityEvents);
// get second activity not started automatically
a = actByName (process, "A22");
// check audit event(s) of second activity
activityEvents = a.history();
//displayAuditEvents(activityEvents);
checkAuditEventsForActivityA22(activityEvents);
// check audit event(s) of process
Collection processEvents = process.history();