Book Image

Mastering jBPM 5

By : Simone Fiorini, Arun V Gopalakrishnan
Book Image

Mastering jBPM 5

By: Simone Fiorini, Arun V Gopalakrishnan

Overview of this book

If you are a designer or developer who wants to build and operate business process-centric applications, then this book is for you. Knowledge of the basic concepts of application development in Java will be helpful in following the concepts covered in the book, but is not necessary.
Table of Contents (13 chapters)
12
Index

Audit and history logs


Auditing is the ability of the engine to let the user configure the collection and the retrieval of events relative to the runtime process execution. We introduced auditing and BAM in Chapter 4, Operation Management, and now, we are going to see how to leverage the engine services to implement auditing at various levels.

When persistence is enabled, ready-to-use preconfigured AuditService (implemented by JPAAuditLogService) can be borrowed from RuntimeEngine; it returns process, node, and variable runtime audit data (see the class diagram) from the three standard jBPM auditing database tables (ProcessInstanceLog, NodeInstanceLog, and VariableInstanceLog). The audit service stamps each log entry with an OwnerID attribute, which matches the unique identifier of its RuntimeManager.

AuditLogService auditservice=engine.getAuditLogService();
List<ProcessInstanceLog> pizzadeliveryLogs= auditservice.findActiveProcessInstances("pizzadelivery");

This AuditService usage approach...