A simple task management framework designed to queue and execute asynchronous tasks with support for database persistence and a user-friendly interface. It can be used to implement scheduling patterns or outbound patterns.
Focus is the usage with spring boot and JPA.
Secondary goal is to support Poor mans Workflow
Use for more advanced doc the WIKI. The README contains a shorter how to use.
- H2
- azure-sql-edge (MSSQL)
- PostgreSQL
- MariaDB
- MSSQL, as azure-sql-edge is tested
- mySQL: sequences are not supported
<dependency>
<groupId>org.sterl.spring</groupId>
<artifactId>spring-persistent-tasks-core</artifactId>
<version>1.x.x</version>
</dependency>
@SpringBootApplication
@EnableSpringPersistentTasks
public class ExampleApplication {
@Bean
PersistentTask<Vehicle> task1(VehicleHttpConnector vehicleHttpConnector) {
return v -> vehicleHttpConnector.send(v);
}
@Autowired
PersistentTaskService persistentTaskService;
public void triggerTask1(Vehicle vehicle) {
persistentTaskService.runOrQueue(
TaskTriggerBuilder.newTrigger("task1").state(vehicle).build());
}
Liquibase is supported. Either import all or just the required versions.
<include file="spring-persistent-tasks/db.changelog-master.xml" />
<include file="spring-persistent-tasks/db/pt-changelog-v1.xml" />
<dependency>
<groupId>org.sterl.spring</groupId>
<artifactId>spring-persistent-tasks-ui</artifactId>
<version>1.x.x</version>
</dependency>
@SpringBootApplication
@EnableSpringPersistentTasks
@EnableSpringPersistentTasksUI
public class ExampleApplication {
- quartz
- db-scheduler
- jobrunr