Skip to content

Commit

Permalink
Merge pull request #1420 from SnehaSuresh-aot/master
Browse files Browse the repository at this point in the history
camunda upgrade to 7.18 + vulnerability fixes
  • Loading branch information
SnehaSuresh-aot authored May 22, 2023
2 parents eb1905c + 05918db commit 6c9187e
Show file tree
Hide file tree
Showing 26 changed files with 235 additions and 60 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

Mark items as `Added`, `Changed`, `Fixed`, `Removed`, `Untested Features`, `Upcoming Features`, `Known Issues`

## 5.1.1 - 2023-05-18

`Added`

**forms-flow-bpm**

* `External Task` APIs are exposed in bpm abstraction layer.

`Modified`

**forms-flow-bpm**

*Upgrade notes:*

* camunda upgraded from version 7.17.0 to 7.18.0.
* camunda-keycloak upgraded from version 2.2.3 to 7.18.0.
* camundaConnect upgraded from 1.5.0 to 1.5.4.
* camundaMail upgraded from 1.3.0 to 1.5.0.
* camunda-template-engines upgraded from 1.0.0 to 2.1.0
* spring boot upgraded from version 2.6.6 to 2.7.11.
* spring security Oauth2 upgraded from version 2.6.6 to 2.6.7.
* camunda-bpm-assert upgraded from 12.0 to 13.0.
* groovy upgraded from 3.0.13 to 3.0.17.
* graalVm upgraded from 22.1.0.1 to 22.3.2.
* jackson upgraded from version 2.14.0 to 2.15.0.


## 5.1.0 - 2022-01-18

`Added`
Expand Down
4 changes: 2 additions & 2 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ In the following document, we’ll describe the details of dependencies of vario

| Component | Version|
| --- | ----- |
| Camunda | 7.17|
| SpringBoot | 2.6.6 |
| Camunda | 7.18|
| SpringBoot | 2.7.11 |
| Postgres | Latest |
<br>

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![FormsFlow BPM CI](https://github.com/AOT-Technologies/forms-flow-ai/actions/workflows/forms-flow-bpm-ci.yml/badge.svg)](https://github.com/AOT-Technologies/forms-flow-ai/actions)
[![Join the chat at https://gitter.im/forms-flow-ai/community](https://badges.gitter.im/forms-flow-ai/community.svg)](https://gitter.im/forms-flow-ai/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://stackoverflow.com/questions/tagged/formsflow.ai](https://img.shields.io/badge/ask%20-on%20%20stackoverflow-F47F24)](https://stackoverflow.com/questions/tagged/formsflow.ai?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
<img src="https://img.shields.io/badge/release-v5.1.0-blue"/>
<img src="https://img.shields.io/badge/release-v5.1.1-blue"/>
<img src="https://img.shields.io/badge/LICENSE-Apache%202-green"/>

[**formsflow.ai**](https://formsflow.ai/) is a Free, Open-Source, Low Code Development Platform for rapidly building powerful business applications. [**formsflow.ai**](https://formsflow.ai/) combines leading Open-Source applications including [form.io](https://form.io) forms, Camunda’s workflow engine, Keycloak’s security, and Redash’s data analytics into a seamless, integrated platform.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
v5.1.0
v5.1.1


2 changes: 1 addition & 1 deletion deployment/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:

forms-flow-forms:
container_name: forms-flow-forms
image: formsflow/forms-flow-forms:v5.1.0
image: formsflow/forms-flow-forms:v5.1.1

# The app will restart until Mongo is listening
restart: always
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-bpm/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Workflow Engine

[![FormsFlow BPM CI](https://github.com/AOT-Technologies/forms-flow-ai-dev/actions/workflows/forms-flow-api-ci.yml/badge.svg?branch=develop)](https://github.com/AOT-Technologies/forms-flow-ai-dev/actions)
![Camunda](https://img.shields.io/badge/Camunda-7.17.0-blue) ![Spring Boot](https://img.shields.io/badge/Spring_Boot-2.6.6.RELEASE-blue) ![postgres](https://img.shields.io/badge/postgres-latest-blue)
![Camunda](https://img.shields.io/badge/Camunda-7.18.0-blue) ![Spring Boot](https://img.shields.io/badge/Spring_Boot-2.7.11.RELEASE-blue) ![postgres](https://img.shields.io/badge/postgres-latest-blue)
**formsflow.ai** leverages Camunda for workflow and decision automation.

To know more about Camunda, visit https://camunda.com/.
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-bpm/pom-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>formsflow-bpm</artifactId>
<version>5.1.0</version>
<version>5.1.1</version>
<relativePath>pom.xml</relativePath>
</parent>

Expand Down
40 changes: 18 additions & 22 deletions forms-flow-bpm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.camunda.bpm.extension</groupId>
<artifactId>formsflow-bpm</artifactId>
<version>5.1.0</version>
<version>5.1.1</version>
<packaging>pom</packaging>

<name>Forms flow BPM Extension</name>
Expand All @@ -22,14 +22,14 @@
<failOnMissingWebXml>false</failOnMissingWebXml>

<!-- versions -->
<version.camundaKeycloak>2.2.3</version.camundaKeycloak>
<version.camunda>7.17.0</version.camunda><!-- 7.15.0 - 7.17.0 -->
<version.camundaConnect>1.5.0</version.camundaConnect><!-- 1.5.0 -->
<version.camundaMail>1.3.0</version.camundaMail><!-- 1.3.0 -->
<version.springBoot>2.6.6</version.springBoot><!-- 2.6.4 - 2.6.6 -->
<version.springSecurityOauth2>2.6.6</version.springSecurityOauth2><!--
2.6.4 - 2.6.6 -->
<version.jackson>2.14.0</version.jackson>
<version.camundaKeycloak>7.18.0</version.camundaKeycloak>
<version.camunda>7.18.0</version.camunda><!-- 7.17.0 - 7.18.0 -->
<version.camundaConnect>1.5.4</version.camundaConnect><!-- 1.5.4 -->
<version.camundaMail>1.5.0</version.camundaMail><!-- 1.5.0 -->
<version.springBoot>2.7.11</version.springBoot><!-- 2.6.6 - 2.7.11 -->
<version.springSecurityOauth2>2.6.7</version.springSecurityOauth2><!--
2.6.6 - 2.6.7 -->
<version.jackson>2.15.0</version.jackson>
</properties>

<dependencyManagement>
Expand All @@ -51,7 +51,7 @@
<!-- modules -->
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-identity-keycloak</artifactId>
<artifactId>camunda-platform-7-keycloak</artifactId>
<version>${version.camundaKeycloak}</version>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -121,7 +121,7 @@
<!-- Keycloak Identity Prover Plugin -->
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-identity-keycloak</artifactId>
<artifactId>camunda-platform-7-keycloak</artifactId>
</dependency>

<!-- Add Email Component -->
Expand Down Expand Up @@ -163,13 +163,13 @@
<dependency>
<groupId>org.camunda.template-engines</groupId>
<artifactId>camunda-template-engines-freemarker</artifactId>
<version>1.0.0</version>
<version>2.1.0</version>
</dependency>

<dependency>
<groupId>org.camunda.template-engines</groupId>
<artifactId>camunda-template-engines-velocity</artifactId>
<version>1.0.0</version>
<version>2.1.0</version>
</dependency>

<!-- Database -->
Expand All @@ -185,11 +185,6 @@
<version>42.4.3</version>
</dependency>

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

<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
Expand All @@ -210,6 +205,7 @@
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.3</version>
</dependency>

<!-- Test dependencies -->
Expand All @@ -221,7 +217,7 @@
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<version>12.0.0</version>
<version>13.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -243,7 +239,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.5.8</version>
<version>3.0.17</version>
<type>pom</type>
</dependency>

Expand Down Expand Up @@ -303,13 +299,13 @@
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>22.1.0.1</version>
<version>22.3.2</version>
</dependency>

<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>22.1.0.1</version>
<version>22.3.2</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


import org.camunda.bpm.engine.rest.impl.CamundaRestResources;
import org.camunda.bpm.engine.rest.impl.JaxRsTwoDefaultProcessEngineRestServiceImpl;
import org.camunda.bpm.engine.rest.impl.DefaultProcessEngineRestServiceImpl;
import org.camunda.bpm.extension.hooks.rest.impl.FormsFlowProcessEngineRestServiceImpl;
import org.camunda.bpm.spring.boot.starter.rest.CamundaJerseyResourceConfig;
import org.glassfish.jersey.jackson.JacksonFeature;
Expand All @@ -20,7 +20,7 @@ public class FormsFlowJerseyResourceConfig extends CamundaJerseyResourceConfig {

protected void registerCamundaRestResources() {
//Removing so that it won't conflict with the FormsFlowProcessEngineRestServiceImpl extended resources
CamundaRestResources.getResourceClasses().remove(JaxRsTwoDefaultProcessEngineRestServiceImpl.class);
CamundaRestResources.getResourceClasses().remove(DefaultProcessEngineRestServiceImpl.class);
this.registerClasses(CamundaRestResources.getResourceClasses());
this.registerClasses(CamundaRestResources.getConfigurationClasses());
this.register(JacksonFeature.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.camunda.bpm.extension.commons.connector.support;

import com.google.gson.JsonObject;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.extension.commons.ro.req.IRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.camunda.bpm.extension.commons.io.socket;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import javax.annotation.Resource;
import javax.servlet.ServletException;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.engine.AuthorizationService;
import org.camunda.bpm.engine.ProcessEngines;
import org.camunda.bpm.engine.RepositoryService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import com.nimbusds.jose.shaded.json.JSONArray;
import com.nimbusds.oauth2.sdk.util.CollectionUtils;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.extension.hooks.controllers.data.Task;
import org.camunda.bpm.extension.hooks.controllers.data.Variable;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.camunda.bpm.engine.delegate.Expression;
Expand Down Expand Up @@ -81,7 +81,7 @@ private void createApplication(DelegateExecution execution, boolean retryOnce) t
Map<String,Object> data = new HashMap<>();
String formUrl = String.valueOf(execution.getVariable(FORM_URL));
data.put(FORM_URL,formUrl);
data.put("formId",StringUtils.substringBetween(formUrl, "/form/", "/submission/"));
data.put("formId", StringUtils.substringBetween(formUrl, "/form/", "/submission/"));
data.put("submissionId",StringUtils.substringAfter(formUrl, "/submission/"));
data.put("processInstanceId",execution.getProcessInstanceId());
ResponseEntity<String> response = httpServiceInvoker.execute(httpServiceInvoker.getProperties().getProperty("api.url")+"/application/create", HttpMethod.POST, bpmObjectMapper.writeValueAsString(data));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.camunda.bpm.extension.hooks.listeners.execution;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.camunda.bpm.extension.hooks.listeners.BaseListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package org.camunda.bpm.extension.hooks.rest;

import org.camunda.bpm.engine.rest.dto.CountResultDto;
import org.camunda.bpm.engine.rest.dto.externaltask.*;

import javax.ws.rs.*;
import javax.ws.rs.container.AsyncResponse;
import javax.ws.rs.container.Suspended;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
import java.util.List;

@Produces(MediaType.APPLICATION_JSON)
public interface ExternalTaskRestResource extends RestResource {

String PATH = "/external-task";

@GET
@Produces(MediaType.APPLICATION_JSON)
List<ExternalTaskDto> getExternalTasks(@Context UriInfo uriInfo,
@QueryParam("firstResult") Integer firstResult,
@QueryParam("maxResults") Integer maxResults);

@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
List<ExternalTaskDto> queryExternalTasks(ExternalTaskQueryDto query,
@QueryParam("firstResult") Integer firstResult,
@QueryParam("maxResults") Integer maxResults);

@GET
@Path("/count")
@Produces(MediaType.APPLICATION_JSON)
CountResultDto getExternalTasksCount(@Context UriInfo uriInfo);

@POST
@Path("/count")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
CountResultDto queryExternalTasksCount(ExternalTaskQueryDto query);

@POST
@Path("/fetchAndLock")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
void fetchAndLock(FetchExternalTasksExtendedDto dto, @Suspended final AsyncResponse asyncResponse);

@GET
@Path("/topic-names")
@Produces(MediaType.APPLICATION_JSON)
List<String> getTopicNames(@QueryParam("withLockedTasks") boolean withLockedTasks,
@QueryParam("withUnlockedTasks") boolean withUnlockedTasks,
@QueryParam("withRetriesLeft") boolean withRetriesLeft);
@GET
@Path("/{id}")
@Produces(MediaType.APPLICATION_JSON)
ExternalTaskDto getExternalTask(@PathParam("id") String id);

@POST
@Path("/{id}/complete")
@Consumes(MediaType.APPLICATION_JSON)
void complete(@PathParam("id") String id, CompleteExternalTaskDto dto);

@POST
@Path("/{id}/failure")
@Consumes(MediaType.APPLICATION_JSON)
void handleFailure(@PathParam("id") String id, ExternalTaskFailureDto dto);

@POST
@Path("/{id}/extendLock")
@Consumes(MediaType.APPLICATION_JSON)
void extendLock(@PathParam("id") String id, ExtendLockOnExternalTaskDto extendLockDto);

@GET
@Path("/{id}/errorDetails")
@Produces(MediaType.TEXT_PLAIN)
String getErrorDetails(@PathParam("id") String id);

}
Loading

0 comments on commit 6c9187e

Please sign in to comment.