Codota Logo
CleanableHistoricBatchReportResult
Code IndexAdd Codota to your IDE (free)

How to use
CleanableHistoricBatchReportResult
in
org.camunda.bpm.engine.history

Best Java code snippets using org.camunda.bpm.engine.history.CleanableHistoricBatchReportResult (Showing top 18 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: camunda/camunda-bpm-platform

public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
 List<CleanableHistoricBatchReportResultDto> dtos = new ArrayList<CleanableHistoricBatchReportResultDto>();
 for (CleanableHistoricBatchReportResult current : reportResult) {
  CleanableHistoricBatchReportResultDto dto = new CleanableHistoricBatchReportResultDto();
  dto.setBatchType(current.getBatchType());
  dto.setHistoryTimeToLive(current.getHistoryTimeToLive());
  dto.setFinishedBatchesCount(current.getFinishedBatchesCount());
  dto.setCleanableBatchesCount(current.getCleanableBatchesCount());
  dtos.add(dto);
 }
 return dtos;
}
origin: camunda/camunda-bpm-platform

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
origin: camunda/camunda-bpm-platform

@Test
public void shouldNotSeeCleanableBatchesInReport() {
 // given
 engineConfiguration
  .setHistoryRemovalTimeStrategy(HISTORY_REMOVAL_TIME_STRATEGY_END)
  .initHistoryRemovalTime();
 engineConfiguration.setBatchOperationHistoryTimeToLive("P5D");
 engineConfiguration.initHistoryCleanup();
 testRule.deploy(PROCESS);
 String processInstanceId = runtimeService.startProcessInstanceByKey(PROCESS_KEY).getId();
 ClockUtil.setCurrentTime(END_DATE);
 Batch batch = runtimeService.deleteProcessInstancesAsync(Collections.singletonList(processInstanceId), "aDeleteReason");
 ClockUtil.setCurrentTime(addDays(END_DATE, 5));
 // when
 CleanableHistoricBatchReportResult report = historyService.createCleanableHistoricBatchReport().singleResult();
 // then
 assertThat(report.getCleanableBatchesCount(), is(0L));
 assertThat(report.getFinishedBatchesCount(), is(0L));
 // cleanup
 managementService.deleteBatch(batch.getId(), true);
}
origin: camunda/camunda-bpm-platform

  .list();
assertEquals(3, reportResultAsc.size());
assertEquals("instance-modification", reportResultAsc.get(0).getBatchType());
assertEquals("instance-migration", reportResultAsc.get(1).getBatchType());
assertEquals("instance-deletion", reportResultAsc.get(2).getBatchType());
  .list();
assertEquals(3, reportResultDesc.size());
assertEquals("instance-deletion", reportResultDesc.get(0).getBatchType());
assertEquals("instance-migration", reportResultDesc.get(1).getBatchType());
assertEquals("instance-modification", reportResultDesc.get(2).getBatchType());
origin: org.camunda.bpm/camunda-engine

@Test
public void shouldNotSeeCleanableBatches() {
 // given
 engineConfiguration
  .setHistoryRemovalTimeStrategy(HISTORY_REMOVAL_TIME_STRATEGY_END)
  .initHistoryRemovalTime();
 engineConfiguration.setBatchOperationHistoryTimeToLive("P5D");
 engineConfiguration.initHistoryCleanup();
 testRule.deploy(PROCESS);
 String processInstanceId = runtimeService.startProcessInstanceByKey(PROCESS_KEY).getId();
 ClockUtil.setCurrentTime(END_DATE);
 Batch batch = runtimeService.deleteProcessInstancesAsync(Collections.singletonList(processInstanceId), "aDeleteReason");
 ClockUtil.setCurrentTime(addDays(END_DATE, 5));
 // when
 CleanableHistoricBatchReportResult report = historyService.createCleanableHistoricBatchReport().singleResult();
 // then
 assertThat(report.getCleanableBatchesCount(), is(0L));
 // cleanup
 managementService.deleteBatch(batch.getId(), true);
}
origin: camunda/camunda-bpm-platform

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
origin: camunda/camunda-bpm-platform

@Test
public void shouldSeeCleanableBatchesInReport() {
 // given
 engineConfiguration
  .setHistoryRemovalTimeStrategy(HISTORY_REMOVAL_TIME_STRATEGY_START)
  .initHistoryRemovalTime();
 engineConfiguration.setBatchOperationHistoryTimeToLive("P5D");
 engineConfiguration.initHistoryCleanup();
 testRule.deploy(PROCESS);
 String processInstanceId = runtimeService.startProcessInstanceByKey(PROCESS_KEY).getId();
 ClockUtil.setCurrentTime(END_DATE);
 Batch batch = runtimeService.deleteProcessInstancesAsync(Collections.singletonList(processInstanceId), "aDeleteReason");
 ClockUtil.setCurrentTime(addDays(END_DATE, 5));
 // when
 CleanableHistoricBatchReportResult report = historyService.createCleanableHistoricBatchReport().singleResult();
 // then
 assertThat(report.getCleanableBatchesCount(), is(1L));
 assertThat(report.getFinishedBatchesCount(), is(0L));
 // cleanup
 managementService.deleteBatch(batch.getId(), true);
}
origin: camunda/camunda-bpm-platform

assertEquals(3, list.size());
for (CleanableHistoricBatchReportResult result : list) {
 if (result.getBatchType().equals("instance-migration")) {
  checkResultNumbers(result, 0, 8, null);
 } else if (result.getBatchType().equals("instance-modification")) {
  checkResultNumbers(result, 1, 1, modOperationsTTL);
 } else if (result.getBatchType().equals("instance-deletion")) {
  checkResultNumbers(result, delOperationsTTL, 18, delOperationsTTL);
origin: org.camunda.bpm/camunda-engine

@Test
public void shouldSeeCleanableBatches() {
 // given
 engineConfiguration
  .setHistoryRemovalTimeStrategy(HISTORY_REMOVAL_TIME_STRATEGY_START)
  .initHistoryRemovalTime();
 engineConfiguration.setBatchOperationHistoryTimeToLive("P5D");
 engineConfiguration.initHistoryCleanup();
 testRule.deploy(PROCESS);
 String processInstanceId = runtimeService.startProcessInstanceByKey(PROCESS_KEY).getId();
 ClockUtil.setCurrentTime(END_DATE);
 Batch batch = runtimeService.deleteProcessInstancesAsync(Collections.singletonList(processInstanceId), "aDeleteReason");
 ClockUtil.setCurrentTime(addDays(END_DATE, 5));
 // when
 CleanableHistoricBatchReportResult report = historyService.createCleanableHistoricBatchReport().singleResult();
 // then
 assertThat(report.getCleanableBatchesCount(), is(1L));
 // cleanup
 managementService.deleteBatch(batch.getId(), true);
}
origin: camunda/camunda-bpm-platform

public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
 List<CleanableHistoricBatchReportResultDto> dtos = new ArrayList<CleanableHistoricBatchReportResultDto>();
 for (CleanableHistoricBatchReportResult current : reportResult) {
  CleanableHistoricBatchReportResultDto dto = new CleanableHistoricBatchReportResultDto();
  dto.setBatchType(current.getBatchType());
  dto.setHistoryTimeToLive(current.getHistoryTimeToLive());
  dto.setFinishedBatchesCount(current.getFinishedBatchesCount());
  dto.setCleanableBatchesCount(current.getCleanableBatchesCount());
  dtos.add(dto);
 }
 return dtos;
}
origin: org.camunda.bpm/camunda-engine

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
origin: camunda/camunda-bpm-platform

assertEquals(3, list.size());
for (CleanableHistoricBatchReportResult result : list) {
 if (result.getBatchType().equals("instance-migration")) {
  checkResultNumbers(result, 4, 8, defaultTTL);
 } else if (result.getBatchType().equals("instance-modification")) {
  checkResultNumbers(result, 0, 1, modOperationsTTL);
 } else if (result.getBatchType().equals("instance-deletion")) {
  checkResultNumbers(result, 11, 18, defaultTTL);
origin: camunda/camunda-bpm-platform

private void setupHistoryReportMock() {
 CleanableHistoricBatchReport report = mock(CleanableHistoricBatchReport.class);
 CleanableHistoricBatchReportResult reportResult = mock(CleanableHistoricBatchReportResult.class);
 when(reportResult.getBatchType()).thenReturn(EXAMPLE_TYPE);
 when(reportResult.getHistoryTimeToLive()).thenReturn(EXAMPLE_TTL);
 when(reportResult.getFinishedBatchesCount()).thenReturn(EXAMPLE_FINISHED_COUNT);
 when(reportResult.getCleanableBatchesCount()).thenReturn(EXAMPLE_CLEANABLE_COUNT);
 CleanableHistoricBatchReportResult anotherReportResult = mock(CleanableHistoricBatchReportResult.class);
 when(anotherReportResult.getBatchType()).thenReturn("batchId2");
 when(anotherReportResult.getHistoryTimeToLive()).thenReturn(null);
 when(anotherReportResult.getFinishedBatchesCount()).thenReturn(13l);
 when(anotherReportResult.getCleanableBatchesCount()).thenReturn(0l);
 List<CleanableHistoricBatchReportResult> mocks = new ArrayList<CleanableHistoricBatchReportResult>();
 mocks.add(reportResult);
 mocks.add(anotherReportResult);
 when(report.list()).thenReturn(mocks);
 when(report.count()).thenReturn((long) mocks.size());
 historicBatchReport = report;
 when(processEngine.getHistoryService().createCleanableHistoricBatchReport()).thenReturn(historicBatchReport);
}
origin: org.camunda.bpm/camunda-engine

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
origin: org.camunda.bpm/camunda-engine

  .list();
assertEquals(3, reportResultAsc.size());
assertEquals("instance-modification", reportResultAsc.get(0).getBatchType());
assertEquals("instance-migration", reportResultAsc.get(1).getBatchType());
assertEquals("instance-deletion", reportResultAsc.get(2).getBatchType());
  .list();
assertEquals(3, reportResultDesc.size());
assertEquals("instance-deletion", reportResultDesc.get(0).getBatchType());
assertEquals("instance-migration", reportResultDesc.get(1).getBatchType());
assertEquals("instance-modification", reportResultDesc.get(2).getBatchType());
origin: org.camunda.bpm/camunda-engine-rest-jaxrs2

public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
 List<CleanableHistoricBatchReportResultDto> dtos = new ArrayList<CleanableHistoricBatchReportResultDto>();
 for (CleanableHistoricBatchReportResult current : reportResult) {
  CleanableHistoricBatchReportResultDto dto = new CleanableHistoricBatchReportResultDto();
  dto.setBatchType(current.getBatchType());
  dto.setHistoryTimeToLive(current.getHistoryTimeToLive());
  dto.setFinishedBatchesCount(current.getFinishedBatchesCount());
  dto.setCleanableBatchesCount(current.getCleanableBatchesCount());
  dtos.add(dto);
 }
 return dtos;
}
origin: org.camunda.bpm/camunda-engine

assertEquals(3, list.size());
for (CleanableHistoricBatchReportResult result : list) {
 if (result.getBatchType().equals("instance-migration")) {
  checkResultNumbers(result, 4, 8, defaultTTL);
 } else if (result.getBatchType().equals("instance-modification")) {
  checkResultNumbers(result, 0, 1, modOperationsTTL);
 } else if (result.getBatchType().equals("instance-deletion")) {
  checkResultNumbers(result, 11, 18, defaultTTL);
origin: org.camunda.bpm/camunda-engine

assertEquals(3, list.size());
for (CleanableHistoricBatchReportResult result : list) {
 if (result.getBatchType().equals("instance-migration")) {
  checkResultNumbers(result, 0, 8, null);
 } else if (result.getBatchType().equals("instance-modification")) {
  checkResultNumbers(result, 1, 1, modOperationsTTL);
 } else if (result.getBatchType().equals("instance-deletion")) {
  checkResultNumbers(result, delOperationsTTL, 18, delOperationsTTL);
org.camunda.bpm.engine.historyCleanableHistoricBatchReportResult

Javadoc

This interface defines the result of Cleanable historic batch report.

Most used methods

  • getBatchType
    Returns the batch type.
  • getCleanableBatchesCount
    Returns the amount of cleanable historic batches.
  • getFinishedBatchesCount
    Returns the amount of finished historic batches.
  • getHistoryTimeToLive
    Returns the history time to live for the selected batch type.

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ImageIO (javax.imageio)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now