Skip to content

Instantly share code, notes, and snippets.

View pschalk's full-sized avatar

Patrick Schalk pschalk

View GitHub Profile
@pschalk
pschalk / SimpleSpringBootApplication.java
Last active May 12, 2021 13:26
Creation of a Camunda custom batch
@SpringBootApplication
@EnableProcessApplication
public class SimpleSpringBootApplication {
private static final Logger logger = LoggerFactory.getLogger(SimpleSpringBootApplication.class);
public static void main(final String... args) {
SpringApplication.run(SimpleSpringBootApplication.class, args);
}
@pschalk
pschalk / AppConfiguration.java
Last active May 12, 2021 13:26
Register a batch job handler
@Bean
public ProcessEnginePlugin customBatchHandlerPlugin(PrintStringBatchJobHandler printStringBatchJobHandler) {
return CustomBatchHandlerPlugin.of(printStringBatchJobHandler);
}
public class PrintStringBatchJobHandler extends CustomBatchJobHandler<String> {
private static final Logger logger = LoggerFactory.getLogger(PrintStringBatchJobHandler.class.getSimpleName());
public static final String TYPE = "simple-batch-handler";
@Override
public void execute(final List<String> data, final CommandContext commandContext) {
data.forEach(dataEntry -> logger.info("Work on data: " + dataEntry));
}

Keybase proof

I hereby claim:

  • I am pschalk on github.
  • I am pschalk (https://keybase.io/pschalk) on keybase.
  • I have a public key whose fingerprint is 5D84 5DD5 A718 FA5B F010 332D CAED 66FE 90ED 6A71

To claim this, I am signing this object: