Skip to content

tobiasbehr/camunda-bpm-custom-batch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

camunda-bpm-custom-batch

License Apache%202.0 blue

The goal of this camunda extension is to provide an simple way of using the camunda batch functionality. Camunda Batch could be used to split a huge workload into small asynchronous jobs. With this extension, we want to open the camunda batch functionality to everyone.

Get started

The extension will be published on maven central, so if you are using maven, just add the dependency:

<dependency>
  <groupId>org.camunda.bpm.extension.batch.project</groupId>
  <artifactId>camunda-bpm-custom-batch-core</artifactId>
  <version>0.1-SNAPSHOT</version>
</dependency>

First you have to define an own job handler for working on the single batch data:

@Component
public class SimpleCustomBatchJobHandler extends CustomBatchJobHandler<String> {
  @Override
  public void execute(List<String> data, CommandContext commandContext) {
      logger.info("Work on data: {}", data.get(0));
  }

  @Override
  public String getType() {
      return "simple-batch-handler";
  }
}

Next you have to notify the engine about this job handler, e.g. with spring-boot:

@Bean
public ProcessEnginePlugin customBatchHandlerPlugin(SimpleCustomBatchJobHandler simpleCustomBatchJobHandler) {
  return new CustomBatchHandlerPlugin(Collections.singletonList(simpleCustomBatchJobHandler));
}

Finally, the creation of the batch itself:

CustomBatchBuilder.of(listOfStringData)
 .jobHandler(simpleCustomBatchJobHandler)
 .create();

Resources

Roadmap

todo

  • Provide a data collector class

  • Provide a timer job for automatically triggering of batch creation.

done

  • Provide initial version

Maintainer

License

Apache License, Version 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%