Class BatchingAuditTrail

  • All Implemented Interfaces:
    AuditTrail, org.copperengine.management.AuditTrailMXBean

    public class BatchingAuditTrail
    extends AbstractAuditTrail
    Fast db based audit trail implementation. It is possible to extend the COPPER audit trail with custom attributes. See JUnitTest BatchingAuditTrailTest.testCustomTable() for an example.
    • Constructor Detail

      • BatchingAuditTrail

        public BatchingAuditTrail()
    • Method Detail

      • asynchLog

        public void asynchLog​(int logLevel,
                              java.util.Date occurrence,
                              java.lang.String conversationId,
                              java.lang.String context,
                              java.lang.String instanceId,
                              java.lang.String correlationId,
                              java.lang.String transactionId,
                              java.lang.String _message,
                              java.lang.String messageType)
        returns immediately after queueing the log message
        Parameters:
        logLevel - the level on that the audit trail event is recorded (might be used for filtering)
        occurrence - timestamp of the audit trail event
        conversationId - conversation id embraces all audit trail events for one business process (might be the same for a whole business transaction over a range of involved systems)
        context - the context of the audit trail event (e.g. a camel route, a workflow task, ...)
        instanceId - workflow id for a single workflow
        correlationId - correlates a request response pair (e.g. workflow calls another workflow, workflow calls a camel route, ...)
        transactionId - Same ID vor several conversations, that belongs to the same transaction. Example: ExecuteOrder (conversation 1), ChangeOrder (conversation 2) and CancelOrder (conversation 3) that all belongs to transaction 77. When transaction 77 can be deleted, all conversations for this transaction can be deleted.
        _message - a message describing the audit trail event
        messageType - type of the message, e.g. XML, used for message rendering in the COPPER monitor
      • asynchLog

        public void asynchLog​(int logLevel,
                              java.util.Date occurrence,
                              java.lang.String conversationId,
                              java.lang.String context,
                              java.lang.String instanceId,
                              java.lang.String correlationId,
                              java.lang.String transactionId,
                              java.lang.String _message,
                              java.lang.String messageType,
                              AuditTrailCallback cb)
        returns immediately after queueing the log message
        Parameters:
        logLevel - the level on that the audit trail event is recorded (might be used for filtering)
        occurrence - timestamp of the audit trail event
        conversationId - conversation id embraces all audit trail events for one business process (might be the same for a whole business transaction over a range of involved systems)
        context - the context of the audit trail event (e.g. a camel route, a workflow task, ...)
        instanceId - workflow id for a single workflow
        correlationId - correlates a request response pair (e.g. workflow calls another workflow, workflow calls a camel route, ...)
        transactionId - Same ID vor several conversations, that belongs to the same transaction. Example: ExecuteOrder (conversation 1), ChangeOrder (conversation 2) and CancelOrder (conversation 3) that all belongs to transaction 77. When transaction 77 can be deleted, all conversations for this transaction can be deleted.
        _message - a message describing the audit trail event
        messageType - type of the message, e.g. XML, used for message rendering in the COPPER monitor
        cb - callback called when logging succeeded or failed.
      • asynchLog

        public void asynchLog​(AuditTrailEvent e)
        returns immediately after queueing the log message
        Parameters:
        e - the AuditTrailEvent to be logged
      • asynchLog

        public void asynchLog​(AuditTrailEvent e,
                              AuditTrailCallback cb)
        returns immediately after queueing the log message
        Parameters:
        e - the AuditTrailEvent to be logged
        cb - callback called when logging succeeded or failed.
      • synchLog

        public void synchLog​(AuditTrailEvent event)
        Description copied from interface: AuditTrail
        writes an event to the audit trail log and returns after the log message is written to the underlying storage.
        Parameters:
        event - the AuditTrailEvent to be logged
      • setBatcher

        public void setBatcher​(Batcher batcher)