Class IndexingAsyncHistoryJobProducer

java.lang.Object
com.flowable.indexing.job.IndexingAsyncHistoryJobProducer
All Implemented Interfaces:
IndexingHistoryJobProducer

public class IndexingAsyncHistoryJobProducer extends Object implements IndexingHistoryJobProducer
Implements the IndexingHistoryJobProducer to create a new HistoryJobEntity which is a copy of the one that is normally created. The reason for this is that otherwise the storing of the historical data will be done together with sending it to Elasticsearch. Both can fail independently or the relational db job handling might halfway decide the historical data is not yet applicable and roll back. To avoid this mixing, a copy of the original HistoryJobEntity is created with a specific HistoryJobHandler for Elasticsearch. This is a simple copy and no extra processing (json wise and such) is done.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected boolean
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndexingAsyncHistoryJobProducer(boolean gzippingEnabled, boolean jsonGroupingEnabled, int jsonGroupingThreshold)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addJsonToJob(org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, org.flowable.job.service.impl.persistence.entity.HistoryJobEntity jobEntity, com.fasterxml.jackson.databind.JsonNode rootObjectNode, boolean applyCompression)
     
    protected byte[]
    compress(byte[] bytes)
     
    protected org.flowable.job.service.impl.persistence.entity.HistoryJobEntity
    createJob(AsyncIndexingHistorySession asyncHistorySession, org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, String jobType)
     
    protected List<org.flowable.job.service.impl.persistence.entity.HistoryJobEntity>
    createJobsWithHistoricalData(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes)
     
    protected String
     
    List<org.flowable.job.service.impl.persistence.entity.HistoryJobEntity>
    historyDataGenerated(org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes, org.flowable.common.engine.impl.cfg.TransactionContext transactionContext)
     
    protected void
    scheduleJobs(org.flowable.common.engine.impl.cfg.TransactionContext transactionContext, org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, List<org.flowable.job.service.impl.persistence.entity.HistoryJobEntity> historyJobEntities)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • gzippingEnabled

      protected boolean gzippingEnabled
    • jsonGroupingEnabled

      protected boolean jsonGroupingEnabled
    • jsonGroupingThreshold

      protected int jsonGroupingThreshold
  • Constructor Details

    • IndexingAsyncHistoryJobProducer

      public IndexingAsyncHistoryJobProducer(boolean gzippingEnabled, boolean jsonGroupingEnabled, int jsonGroupingThreshold)
  • Method Details

    • historyDataGenerated

      public List<org.flowable.job.service.impl.persistence.entity.HistoryJobEntity> historyDataGenerated(org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes, org.flowable.common.engine.impl.cfg.TransactionContext transactionContext)
      Specified by:
      historyDataGenerated in interface IndexingHistoryJobProducer
    • createJobsWithHistoricalData

      protected List<org.flowable.job.service.impl.persistence.entity.HistoryJobEntity> createJobsWithHistoricalData(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes)
    • createJob

      protected org.flowable.job.service.impl.persistence.entity.HistoryJobEntity createJob(AsyncIndexingHistorySession asyncHistorySession, org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, String jobType)
    • scheduleJobs

      protected void scheduleJobs(org.flowable.common.engine.impl.cfg.TransactionContext transactionContext, org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, List<org.flowable.job.service.impl.persistence.entity.HistoryJobEntity> historyJobEntities)
    • addJsonToJob

      protected void addJsonToJob(org.flowable.job.service.JobServiceConfiguration jobServiceConfiguration, org.flowable.job.service.impl.persistence.entity.HistoryJobEntity jobEntity, com.fasterxml.jackson.databind.JsonNode rootObjectNode, boolean applyCompression)
    • compress

      protected byte[] compress(byte[] bytes)
    • getJobType

      protected String getJobType()