Package org.jbpm.process.audit.jms

## Class AsyncAuditLogProducer

- java.lang.Object
- - org.jbpm.process.audit.AbstractAuditLogger
  - - org.jbpm.process.audit.jms.AsyncAuditLogProducer

- All Implemented Interfaces:
    `EventListener`, `org.kie.api.event.process.ProcessEventListener`

      public class AsyncAuditLogProducer
      extends AbstractAuditLogger

  Asynchronous log producer that puts audit log events into JMS queue. It expects to have following objects available before it is fully operational:
  - ConnectionFactory - used to create jMS objects required to send a message
  - Queue - JMS destination where messages should be placed
  It sends TextMessages with content of *Log classes (ProcessInstanceLog, NodeInstanceLog, VaraiableInstanceLog) serialized by Xstream. Such serialization allows:
  - use of message selectors to filter which types of events should be processed by different consumer
  - use any consumer to process messages - does not have to be default one
  - use content based routing in more advanced scenarios
  Default receiver is `AsyncAuditLogReceiver` class

- - ### Field Summary

    - ### Fields inherited from class org.jbpm.process.audit.AbstractAuditLogger

      `AFTER_COMPLETE_EVENT_TYPE, AFTER_NODE_ENTER_EVENT_TYPE, AFTER_NODE_LEFT_EVENT_TYPE, AFTER_START_EVENT_TYPE, AFTER_VAR_CHANGE_EVENT_TYPE, BEFORE_COMPLETE_EVENT_TYPE, BEFORE_NODE_ENTER_EVENT_TYPE, BEFORE_NODE_LEFT_EVENT_TYPE, BEFORE_START_EVENT_TYPE, BEFORE_VAR_CHANGE_EVENT_TYPE, builder`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AsyncAuditLogProducer()` |
    `AsyncAuditLogProducer​(org.kie.api.runtime.KieSession session, boolean transacted)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `afterNodeLeft​(org.kie.api.event.process.ProcessNodeLeftEvent event)` |
    `void` | `afterNodeTriggered​(org.kie.api.event.process.ProcessNodeTriggeredEvent event)` |
    `void` | `afterProcessCompleted​(org.kie.api.event.process.ProcessCompletedEvent event)` |
    `void` | `afterProcessStarted​(org.kie.api.event.process.ProcessStartedEvent event)` |
    `void` | `afterVariableChanged​(org.kie.api.event.process.ProcessVariableChangedEvent event)` |
    `void` | `beforeNodeLeft​(org.kie.api.event.process.ProcessNodeLeftEvent event)` |
    `void` | `beforeNodeTriggered​(org.kie.api.event.process.ProcessNodeTriggeredEvent event)` |
    `void` | `beforeProcessCompleted​(org.kie.api.event.process.ProcessCompletedEvent event)` |
    `void` | `beforeProcessStarted​(org.kie.api.event.process.ProcessStartedEvent event)` |
    `void` | `beforeVariableChanged​(org.kie.api.event.process.ProcessVariableChangedEvent event)` |
    `javax.jms.ConnectionFactory` | `getConnectionFactory()` |
    `javax.jms.Queue` | `getQueue()` |
    `boolean` | `isTransacted()` |
    `protected void` | `sendMessage​(Object messageContent, Integer eventType, int priority)` |
    `void` | `setConnectionFactory​(javax.jms.ConnectionFactory connectionFactory)` |
    `void` | `setQueue​(javax.jms.Queue queue)` |
    `void` | `setTransacted​(boolean transacted)` |

    - ### Methods inherited from class org.jbpm.process.audit.AbstractAuditLogger

      `getBuilder, setBuilder`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.kie.api.event.process.ProcessEventListener

      `afterSLAViolated, beforeSLAViolated, onMessage, onSignal`

- - ### Constructor Detail

    - #### AsyncAuditLogProducer

          public AsyncAuditLogProducer()

    - #### AsyncAuditLogProducer

          public AsyncAuditLogProducer​(org.kie.api.runtime.KieSession session,
                                       boolean transacted)

  - ### Method Detail

    - #### getConnectionFactory

          public javax.jms.ConnectionFactory getConnectionFactory()

    - #### setConnectionFactory

          public void setConnectionFactory​(javax.jms.ConnectionFactory connectionFactory)

    - #### getQueue

          public javax.jms.Queue getQueue()

    - #### setQueue

          public void setQueue​(javax.jms.Queue queue)

    - #### isTransacted

          public boolean isTransacted()

    - #### setTransacted

          public void setTransacted​(boolean transacted)

    - #### beforeNodeTriggered

          public void beforeNodeTriggered​(org.kie.api.event.process.ProcessNodeTriggeredEvent event)

    - #### afterNodeLeft

          public void afterNodeLeft​(org.kie.api.event.process.ProcessNodeLeftEvent event)

    - #### afterVariableChanged

          public void afterVariableChanged​(org.kie.api.event.process.ProcessVariableChangedEvent event)

    - #### beforeProcessStarted

          public void beforeProcessStarted​(org.kie.api.event.process.ProcessStartedEvent event)

    - #### afterProcessCompleted

          public void afterProcessCompleted​(org.kie.api.event.process.ProcessCompletedEvent event)

    - #### afterNodeTriggered

          public void afterNodeTriggered​(org.kie.api.event.process.ProcessNodeTriggeredEvent event)

    - #### beforeNodeLeft

          public void beforeNodeLeft​(org.kie.api.event.process.ProcessNodeLeftEvent event)

    - #### beforeVariableChanged

          public void beforeVariableChanged​(org.kie.api.event.process.ProcessVariableChangedEvent event)

    - #### afterProcessStarted

          public void afterProcessStarted​(org.kie.api.event.process.ProcessStartedEvent event)

    - #### beforeProcessCompleted

          public void beforeProcessCompleted​(org.kie.api.event.process.ProcessCompletedEvent event)

    - #### sendMessage

          protected void sendMessage​(Object messageContent,
                                     Integer eventType,
                                     int priority)