Skip to content

Commit

Permalink
fix(client) don't expose executionId to public API
Browse files Browse the repository at this point in the history
related to: #4523
  • Loading branch information
venetrius authored and tasso94 committed Sep 20, 2024
1 parent 7644178 commit 87c3f8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
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.impl.value.DeferredFileValueImpl;
import org.camunda.bpm.client.variable.value.DeferredFileValue;
import org.camunda.bpm.engine.variable.VariableMap;
import org.camunda.bpm.engine.variable.Variables;
Expand Down Expand Up @@ -258,8 +259,8 @@ public <T> T getVariable(String variableName) {

VariableValue variableValue = receivedVariableMap.get(variableName);
if (variableValue != null) {
if(variableValue.getTypedValue() instanceof DeferredFileValue) {
DeferredFileValue deferredFileValue = (DeferredFileValue) variableValue.getTypedValue();
if(variableValue.getTypedValue() instanceof DeferredFileValueImpl) {
DeferredFileValueImpl deferredFileValue = (DeferredFileValueImpl) variableValue.getTypedValue();
deferredFileValue.setExecutionId(this.executionId);
}
value = (T) variableValue.getValue();
Expand Down Expand Up @@ -300,8 +301,8 @@ 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;
if(typedValue instanceof DeferredFileValueImpl) {
DeferredFileValueImpl deferredFileValue = (DeferredFileValueImpl) typedValue;
deferredFileValue.setExecutionId(this.executionId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,14 @@ 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 + ", processInstanceId" + processInstanceId + ", executionId" + executionId + "]";
+ "isTransient=" + isTransient + ", isLoaded=" + isLoaded + "]";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,4 @@ 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();

}

0 comments on commit 87c3f8a

Please sign in to comment.