How to implement Activiti REST API with Spring Boot Example » grokonez

How to implement Activiti REST API with Spring Boot Example » grokonez

In this tutorial, we're gonna look at an example that uses Activiti REST API with Spring Boot.

https://grokonez.com/java-integration/activiti-rest-api-spring-boot-example

How to implement Activiti REST API with Spring Boot Example

In this tutorial, we're gonna look at an example that uses Activiti REST API with Spring Boot.

Related Articles:

I. Activiti REST API Overview

Activiti Engine includes a REST API that can be used by: - deploying the activiti-rest.war file to a servlet container, - or including the servlet and it’s mapping in the application and add all activiti-rest dependencies to the classpath.

By default the Activiti Engine will connect to an in-memory H2 database, so with Spring Boot, we just need to add dependency as below to make it run:

<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
</dependency>

<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-spring-boot-starter-basic</artifactId>
    <version>5.22.0</version>
</dependency>

<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>spring-boot-starter-rest-api</artifactId>
    <version>5.17.0</version>
</dependency>

Activiti REST API supports:

  • Deployment: get/create/delete Deployments, get resources inside a Deployment.
  • <li><strong>Process Definition</strong>: get one or list of Process Definitions, get resource content or BPMN model of a Process Definition, activate/suspend, get/add/delete candidate starters.</li>
    
    <li><strong>Model</strong>: get/update/create/delete Models, get/set editor source for a Model.</li>
    
    <li><strong>Process Instance</strong>: get/delete/activate/suspend Process Instances, add/remove Users, get/create/update Variables.</li>
    
    <li><strong>Execution</strong>: get Executions, execute an action or get active activities, query, get/create/update Variables.</li>
    
    <li><strong>Task</strong>: get/update/delete Tasks, query for Tasks, get/create/update Variables, get/create/delete identity links, get Events, get/create/delete Attachments.</li>
    
    <li><strong>History</strong>: get/delete/query for Historic Process Instances, Task Instances, Activities Instances, Variables Intances.</li>
    
    <li><strong>User</strong> & <strong>Group</strong>: get/create/update/delete information.</li>
    
    <li><strong>Database Table</strong>, <strong>Engine</strong>, <strong>Runtime</strong>, <strong>Job</strong>...</li>
For more details, please visit: Activiti User Guide - REST API

In the example, we will test some of them to see how it works.

II. Practice

1. Technology

- Java 1.8 - Maven 3.3.9 - Spring Tool Suite – Version 3.8.4.RELEASE - Spring Boot: 1.5.3.RELEASE

2. Step by step

2.1 Create Spring Boot project

Using Spring Tool Suite/Eclipse to create Project and add Dependencies to pom.xml file:

https://grokonez.com/java-integration/activiti-rest-api-spring-boot-example

How to implement Activiti REST API with Spring Boot Example

restapi springboot activiti

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

[Angular SpringBoot] Angular Table Pagination Filtering Sorting with SpringBoot RestAPIs

When we have a large dataset and we want to present it to the user in smaller chunks, pagination and sorting is often helpful solution. So in the tutorial, I introduce how to use Angular to build a table solution for pagination, filtering and sorting the fetching data with SpringBoot RestAPIs examples. Related posts: Angular … Continue reading "[Angular SpringBoot] Angular Table Pagination Filtering Sorting with SpringBoot RestAPIs + Bootstrap Example – Angular 10-9-8-6 Tutorial"

SpringBoot WebFlux Functional RestAPIs » grokonez

Reactive programming is about non-blocking applications. And Spring Framework 5 includes a new spring-webflux module, supports Reactive Streams for communicating backpressure across async components and libraries. So in the tutorial, JavaSampleApproach will guide you through the steps for creating a SpringBoot WebFlux Functional restful APIs. Related posts: – SpringBoot WebFlux Annotation-based RestAPIs – Reactor – … Continue reading "SpringBoot WebFlux Functional RestAPIs"

SpringBoot RestAPIs CRUD Application with MySQL Examples

In the tutorial, I will introduce how to create a Fullstack SpringBoot RestAPIs CRUD Application to MySQL database using Spring WEB MVC framework and Spring JPA for building Backend and using Bootstrap, JQuery Ajax for building frontend client Related posts: Spring Boot Security JWT Authentication Example – MySQL/PostgreSQL + Spring JPA + RestAPIs Angular CRUD … Continue reading "SpringBoot RestAPIs CRUD Application with MySQL Examples – FullStack: Frontend (Bootstrap + Ajax JavaScript) to Backend (SpringBoot + MySQL)"

SpringBoot RestAPIs @GetMapping, @PostMapping, @DeleteMapping, @PutMapping,

“How to create SpringBoot RestAPIs?” is one of the most common questions in Java development world. So in the tutorial, loizenai.com will guide step by step how to do it with clearly explaination and pratice with running sourcecode by using a new annotation features of SpringBoot framework: @GetMapping, @PostMapping, @DeleteMapping, @PutMapping, @PatchMapping New Annotations of … Continue reading "SpringBoot RestAPIs @GetMapping, @PostMapping, @DeleteMapping, @PutMapping, @PatchMapping"

SpringBoot WebFlux Annotation-based RestAPIs » grokonez

Reactive programming is about non-blocking applications. And Spring Framework 5 includes a new spring-webflux module, supports Reactive Streams for communicating backpressure across async components and libraries. So in the tutorial, JavaSampleApproach will guide you through the steps for creating a SpringBoot WebFlux Annotation-based restful APIs. Related posts: – SpringBoot WebFlux Functional RestAPIs – Reactor – … Continue reading "SpringBoot WebFlux Annotation-based RestAPIs"