Get the result of the exclusive gateway when process complete

I want to get the result checked in the exclusive gateway when the process is complete. I use spring boot and camunda 7.

Hi @Helen,

the results of the expressions are not saved explicitly. But the trail of the activities is saved in the history.

Also, with history level full (default setting) all changes of variables values are saved in the history.

Here is a piece of code to access the variable details in a JUnit test:

    String variableInstanceId = processEngine.getHistoryService().createHistoricVariableInstanceQuery().variableName("var2").singleResult().getId();
    List<HistoricDetail> varDetails = processEngine.getHistoryService().createHistoricDetailQuery().variableInstanceId(variableInstanceId ).list();
    varDetails.forEach(varDetail -> {
      HistoricVariableUpdate update = (HistoricVariableUpdate) varDetail;"datailId:{}, value:{}, name:{}", update.getId(), update.getValue(), update.getVariableName());

With this data, you can somehow reengineer the result of the expressions.

Hope this helps, Ingo

thank you @Ingo_Richtsmeier ,
what is the processEngine?. I dont know it

Hello @Helen ,

the ProcessEngine is the Java Interface for the process engine that Camunda 7 uses to execute a process.

You can inject it to any Bean as it lives inside the Spring Boot Context (if you are using our spring-boot-starter).