Skip to content

Commit

Permalink
Merge branch 'master' into fidelity-contributions-finalRepoCommentsApis
Browse files Browse the repository at this point in the history
  • Loading branch information
yanavasileva authored Sep 20, 2024
2 parents 535c773 + e7941a3 commit 0878e62
Show file tree
Hide file tree
Showing 198 changed files with 4,177 additions and 519 deletions.
6 changes: 3 additions & 3 deletions .ci/config/matrices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ sidetrack-stages:
- 'rolling-update'
jdk-ce-stages:
stages:
- 'platform-jdk-openjdk-jdk-21-latest'
- 'platform-jdk-openjdk-jdk-17-latest'
- 'platform-jdk-openjdk-jdk-11-latest'
- 'platform-jdk-temurin-jdk-21-latest'
- 'platform-jdk-temurin-jdk-17-latest'
- 'platform-jdk-temurin-jdk-11-latest'
- 'platform-jdk-jdk-21-latest'
- 'platform-jdk-jdk-17-latest'
- 'platform-jdk-jdk-11-latest'
40 changes: 24 additions & 16 deletions .ci/config/stage-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,27 +130,31 @@ engine-rest-jakarta-unit-compatibility-wildfly:
- 'rest-api'
nodeLabel: 'h2'
jdkVersion: 'openjdk-jdk-17-latest'
platform-jdk-openjdk-jdk-17-latest:
platform-jdk-temurin-jdk-17-latest:
directory: '.'
command: 'install source:jar source:test-jar -Pdistro,distro-ce,distro-wildfly'
stash:
runtimeStash: true
nodeLabel: 'h2'
jdkVersion: 'openjdk-jdk-17-latest'
withNpm: true
platform-jdk-openjdk-jdk-21-latest:
jdkVersion: 'jdk-17-latest'
podSpec:
cpu: 4
image: 'maven:3.9.7-eclipse-temurin-17'
platform-jdk-temurin-jdk-21-latest:
directory: '.'
command: 'install source:jar source:test-jar -Pdistro,distro-ce,distro-wildfly'
stash:
runtimeStash: true
nodeLabel: 'h2'
jdkVersion: 'openjdk-jdk-21-latest'
withNpm: true
platform-jdk-openjdk-jdk-11-latest:
jdkVersion: 'jdk-21-latest'
podSpec:
cpu: 4
image: 'maven:3.9.7-eclipse-temurin-21'
platform-jdk-temurin-jdk-11-latest:
directory: '.'
command: 'install source:jar source:test-jar
-pl ''!spring-boot-starter,!spring-boot-starter/starter,!spring-boot-starter/starter-client/spring,!spring-boot-starter/starter-client/spring-boot,
!spring-boot-starter/starter-qa,!spring-boot-starter/starter-rest,!spring-boot-starter/starter-test,!spring-boot-starter/starter-webapp,
!spring-boot-starter/starter-qa,!spring-boot-starter/starter-rest,!spring-boot-starter/starter-test,!spring-boot-starter/starter-webapp,!spring-boot-starter/starter-security,
!spring-boot-starter/starter-webapp-core,
!spring-boot-starter/starter-qa/integration-test-liquibase,!spring-boot-starter/starter-qa/integration-test-plugins,
!spring-boot-starter/starter-qa/integration-test-plugins/spin,!spring-boot-starter/starter-qa/integration-test-plugins/spin/spin-dataformat-all,
Expand All @@ -159,25 +163,27 @@ platform-jdk-openjdk-jdk-11-latest:
!spring-boot-starter/starter-qa/integration-test-webapp,!spring-boot-starter/starter-qa/integration-test-webapp/invoice-example,
!spring-boot-starter/starter-qa/integration-test-webapp/runtime,
!distro/run,!distro/run/assembly,!distro/run/core,!distro/run/distro,!distro/run/modules,!distro/run/modules/example,
!distro/run/modules/rest,!distro/run/modules/webapps,!distro/run/qa,!distro/run/qa/integration-tests,
!distro/run/modules/rest,!distro/run/modules/webapps,!distro/run/modules/oauth2,!distro/run/qa,!distro/run/qa/integration-tests,
!distro/run/qa/runtime,!distro/run/qa/example-plugin''
-Pdistro,distro-ce,distro-wildfly'
stash:
runtimeStash: true
nodeLabel: 'h2'
jdkVersion: 'openjdk-jdk-11-latest'
withNpm: true
jdkVersion: 'jdk-11-latest'
podSpec:
cpu: 4
image: 'maven:3.9.7-eclipse-temurin-11'
platform-jdk-jdk-17-latest:
directory: '.'
command: 'install source:jar source:test-jar -Pdistro,distro-ce,distro-wildfly'
command: 'install source:jar source:test-jar -Pdistro,distro-ce,distro-wildfly -Dskip.frontend.build=true'
stash:
runtimeStash: true
nodeLabel: 'h2'
jdkVersion: 'jdk-17-latest'
withNpm: true
platform-jdk-jdk-21-latest:
directory: '.'
command: 'install source:jar source:test-jar -Pdistro,distro-ce,distro-wildfly'
command: 'install source:jar source:test-jar -Pdistro,distro-ce,distro-wildfly -Dskip.frontend.build=true'
stash:
runtimeStash: true
nodeLabel: 'h2'
Expand All @@ -187,7 +193,7 @@ platform-jdk-jdk-11-latest:
directory: '.'
command: 'install source:jar source:test-jar
-pl ''!spring-boot-starter,!spring-boot-starter/starter,!spring-boot-starter/starter-client/spring,!spring-boot-starter/starter-client/spring-boot,
!spring-boot-starter/starter-qa,!spring-boot-starter/starter-rest,!spring-boot-starter/starter-test,!spring-boot-starter/starter-webapp,
!spring-boot-starter/starter-qa,!spring-boot-starter/starter-rest,!spring-boot-starter/starter-test,!spring-boot-starter/starter-webapp,!spring-boot-starter/starter-security,
!spring-boot-starter/starter-webapp-core,
!spring-boot-starter/starter-qa/integration-test-liquibase,!spring-boot-starter/starter-qa/integration-test-plugins,
!spring-boot-starter/starter-qa/integration-test-plugins/spin,!spring-boot-starter/starter-qa/integration-test-plugins/spin/spin-dataformat-all,
Expand All @@ -196,11 +202,13 @@ platform-jdk-jdk-11-latest:
!spring-boot-starter/starter-qa/integration-test-webapp,!spring-boot-starter/starter-qa/integration-test-webapp/invoice-example,
!spring-boot-starter/starter-qa/integration-test-webapp/runtime,
!distro/run,!distro/run/assembly,!distro/run/core,!distro/run/distro,!distro/run/modules,!distro/run/modules/example,
!distro/run/modules/rest,!distro/run/modules/webapps,!distro/run/qa,!distro/run/qa/integration-tests,
!distro/run/modules/rest,!distro/run/modules/webapps,!distro/run/modules/oauth2,!distro/run/qa,!distro/run/qa/integration-tests,
!distro/run/qa/runtime,!distro/run/qa/example-plugin''
-Pdistro,distro-ce,distro-wildfly'
-Pdistro,distro-ce,distro-wildfly
-Dskip.frontend.build=true'
stash:
runtimeStash: true
nodeLabel: 'h2'
jdkVersion: 'jdk-11-latest'
withNpm: true

16 changes: 13 additions & 3 deletions .ci/daily/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ pipeline {
}
steps {
cambpmConditionalRetry([
agentLabel : 'centos-stable',
podSpec: [
cpu: 4,
image: 'alpine:3.20'
],
runSteps : {
sh "apk -U add openjdk17-jdk maven rsync openssh libstdc++ libgcc bash"
cambpmRunMaven('./engine-rest',
"package -Dmaven.test.skip -pl '!engine-rest,!assembly'",
withNpm: true,
Expand Down Expand Up @@ -152,7 +156,10 @@ pipeline {
}
steps {
cambpmConditionalRetry([
agentLabel: 'h2_perf32',
podSpec: [
cpu: 32,
image: 'maven:3.9.7-eclipse-temurin-17'
],
runSteps: {
cambpmRunMaven('.',
"deploy source:jar source:test-jar javadoc:javadoc -Dskip-zip-frontend-sources=true -DaltStagingDirectory=${WORKSPACE}/staging -DskipRemoteStaging=true -B",
Expand Down Expand Up @@ -183,7 +190,10 @@ pipeline {
}
steps {
cambpmConditionalRetry([
agentLabel: 'h2_perf32',
podSpec: [
cpu: 32,
image: 'maven:3.9.7-eclipse-temurin-17'
],
runSteps: {
cambpmRunMaven('.',
"install source:jar -Pdistro,distro-ce,distro-wildfly,distro-webjar -B",
Expand Down
6 changes: 5 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ pipeline {
}
steps {
cambpmConditionalRetry([
agentLabel: 'h2_perf32',
podSpec: [
cpu: 32,
image: 'maven:3.9.7-eclipse-temurin-17'
],
suppressErrors: false,
runSteps: {
sh(label: 'GIT: Mark current directory as safe', script: "git config --global --add safe.directory \$PWD")
skipTests = ""
if (env.CHANGE_ID != null && pullRequest.labels.contains('ci:skipTests')) {
skipTests = "-DskipTests "
Expand Down
35 changes: 11 additions & 24 deletions bom/camunda-only-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-security</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
Expand Down Expand Up @@ -208,35 +213,15 @@
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-bom</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-all</artifactId>
<version>${project.version}</version>
<!-- Excluding dependencies that are shaded in camunda-spin-dataformat-all -->
<exclusions>
<exclusion>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-json-jackson</artifactId>
</exclusion>
<exclusion>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-xml-dom</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
</exclusions>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.camunda.commons</groupId>
<artifactId>camunda-commons-bom</artifactId>
<version>${project.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.camunda.template-engines</groupId>
Expand All @@ -247,6 +232,8 @@
<groupId>org.camunda.connect</groupId>
<artifactId>camunda-connect-bom</artifactId>
<version>${project.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>

<!-- dmn engine dependencies
Expand Down
6 changes: 1 addition & 5 deletions clients/java/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
</parent>

<properties>
<version.httpclient>5.3</version.httpclient>
<engine.runtime>${project.build.directory}/camunda-tomcat</engine.runtime>
<tomcat.runtime>${engine.runtime}/server/apache-tomcat-${version.tomcat}</tomcat.runtime>
<http.port>${tomcat.connector.http.port}</http.port>
Expand Down Expand Up @@ -54,19 +53,17 @@
<dependency>
<groupId>org.camunda.commons</groupId>
<artifactId>camunda-commons-logging</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.camunda.commons</groupId>
<artifactId>camunda-commons-typed-values</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${version.httpclient}</version>
<version>${version.httpclient5}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -109,7 +106,6 @@
<dependency>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-all</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ public class EngineClient {
public static final String FAILURE_RESOURCE_PATH = ID_RESOURCE_PATH + "/failure";
public static final String BPMN_ERROR_RESOURCE_PATH = ID_RESOURCE_PATH + "/bpmnError";
public static final String NAME_PATH_PARAM = "{name}";
public static final String EXECUTION_RESOURCE_PATH = "/execution";
public static final String EXECUTION_ID_RESOURCE_PATH = EXECUTION_RESOURCE_PATH + "/" + ID_PATH_PARAM;
public static final String GET_LOCAL_VARIABLE = EXECUTION_ID_RESOURCE_PATH + "/localVariables/" + NAME_PATH_PARAM;
public static final String GET_LOCAL_BINARY_VARIABLE = GET_LOCAL_VARIABLE + "/data";

public static final String PROCESS_INSTANCE_RESOURCE_PATH = "/process-instance";
public static final String PROCESS_INSTANCE_ID_RESOURCE_PATH = PROCESS_INSTANCE_RESOURCE_PATH + "/" + ID_PATH_PARAM;
public static final String GET_BINARY_VARIABLE =
PROCESS_INSTANCE_ID_RESOURCE_PATH + "/variables/" + NAME_PATH_PARAM + "/data";
protected String baseUrl;
protected String workerId;
protected int maxTasks;
Expand Down Expand Up @@ -147,9 +146,9 @@ public void extendLock(String taskId, long newDuration) {
engineInteraction.postRequest(resourceUrl, payload, Void.class);
}

public byte[] getLocalBinaryVariable(String variableName, String processInstanceId) {
String resourcePath = baseUrl + GET_LOCAL_BINARY_VARIABLE
.replace(ID_PATH_PARAM, processInstanceId)
public byte[] getLocalBinaryVariable(String variableName, String executionId) {
String resourcePath = baseUrl + GET_BINARY_VARIABLE
.replace(ID_PATH_PARAM, executionId)
.replace(NAME_PATH_PARAM, variableName);

return engineInteraction.getRequest(resourcePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.camunda.bpm.client.task.ExternalTask;
import org.camunda.bpm.client.variable.impl.TypedValueField;
import org.camunda.bpm.client.variable.impl.VariableValue;
import org.camunda.bpm.client.variable.value.DeferredFileValue;
import org.camunda.bpm.engine.variable.VariableMap;
import org.camunda.bpm.engine.variable.Variables;
import org.camunda.bpm.engine.variable.value.TypedValue;
Expand Down Expand Up @@ -257,6 +258,10 @@ public <T> T getVariable(String variableName) {

VariableValue variableValue = receivedVariableMap.get(variableName);
if (variableValue != null) {
if(variableValue.getTypedValue() instanceof DeferredFileValue) {
DeferredFileValue deferredFileValue = (DeferredFileValue) variableValue.getTypedValue();
deferredFileValue.setExecutionId(this.executionId);
}
value = (T) variableValue.getValue();
}

Expand Down Expand Up @@ -295,6 +300,10 @@ public <T extends TypedValue> T getVariableTyped(String variableName, boolean de
VariableValue variableValue = receivedVariableMap.get(variableName);
if (variableValue != null) {
typedValue = variableValue.getTypedValue(deserializeObjectValues);
if(typedValue instanceof DeferredFileValue) {
DeferredFileValue deferredFileValue = (DeferredFileValue) typedValue;
deferredFileValue.setExecutionId(this.executionId);
}
}

return (T) typedValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class DeferredFileValueImpl extends FileValueImpl implements DeferredFile
protected String variableName;
protected String processInstanceId;
protected EngineClient engineClient;
protected String executionId = null;

public DeferredFileValueImpl(String filename, EngineClient engineClient) {
super(PrimitiveValueType.FILE, filename);
Expand All @@ -47,7 +48,7 @@ public DeferredFileValueImpl(String filename, EngineClient engineClient) {

protected void load() {
try {
byte[] bytes = engineClient.getLocalBinaryVariable(variableName, processInstanceId);
byte[] bytes = engineClient.getLocalBinaryVariable(variableName, executionId);
setValue(bytes);

this.isLoaded = true;
Expand Down Expand Up @@ -79,9 +80,20 @@ public void setVariableName(String variableName) {
this.variableName = variableName;
}

@Override
public void setExecutionId(String executionId){
this.executionId = executionId;
};

@Override
public String getExecutionId() {
return executionId;
}

@Override
public String toString() {
return "DeferredFileValueImpl [mimeType=" + mimeType + ", filename=" + filename + ", type=" + type + ", isTransient=" + isTransient + ", isLoaded=" + isLoaded + "]";
return "DeferredFileValueImpl [mimeType=" + mimeType + ", filename=" + filename + ", type=" + type + ", "
+ "isTransient=" + isTransient + ", isLoaded=" + isLoaded + ", processInstanceId" + processInstanceId + ", executionId" + executionId + "]";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,20 @@ public interface DeferredFileValue extends FileValue {
*/
boolean isLoaded();

/**
* Sets the executionId, which defines the scope of the DeferredFileValue.
* This identifier ensures that the correct scope is applied when loading the file value.
*
* @param executionId defines the scope of the DeferredFileValue
*/
void setExecutionId(String executionId);

/**
* Returns the executionId, which specifies the scope of the DeferredFileValue.
* This identifier ensures that the correct scope is applied when loading the file value.
*
* @return the executionId which defines the scope of the DeferredFileValue
*/
String getExecutionId();

}
6 changes: 4 additions & 2 deletions commons/bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- HEADS-UP: Do not use camunda-parent as parent,
it would introduce a cyclic dependency to this bom -->
<parent>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-parent</artifactId>
<relativePath>../../parent</relativePath>
<artifactId>camunda-root</artifactId>
<version>7.22.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>org.camunda.commons</groupId>
Expand Down
Loading

0 comments on commit 0878e62

Please sign in to comment.