Skip to content

Commit

Permalink
Test uniformity of input variables across bpmns
Browse files Browse the repository at this point in the history
  • Loading branch information
zef committed Nov 22, 2024
1 parent 19aeacf commit a02858c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.camunda.bpm.model.bpmn.instance.StartEvent;
import org.camunda.bpm.model.xml.instance.ModelElementInstance;
import org.camunda.bpm.model.xml.type.ModelElementType;
import org.checkerframework.checker.units.qual.m2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -603,6 +604,19 @@ public Map<String, String> getInputVariablesForProcess(String processInstanceId)

for (HistoricVariableInstance historicVariableInstance : historicVariableInstances) {
String varName = historicVariableInstance.getName();
// Skip any input var other than those in m20Vars list
List<String> m20Vars = new ArrayList<String>(List.of("s3obj", "startedonworkerid", "initiationkey"));

log.info("INPUT VAR NAME " + varName);
boolean nonM20Var = true;
for(String m20Var : m20Vars){
if (varName.toLowerCase().contains(m20Var)){
nonM20Var = false;
}
}
if (nonM20Var) {
continue;
}
if (!(varName.toUpperCase().startsWith("TASK_") && (varName.toUpperCase().endsWith("_IN") || varName.toUpperCase().endsWith("_OUT"))) && !(varName.toUpperCase().startsWith("OUTPUT_"))) {
String varType = historicVariableInstance.getTypeName();
//if varType is not a file, then get the value as a string and put it in the outputVarMap
Expand Down

0 comments on commit a02858c

Please sign in to comment.