Error creating Condition Variables from Map

I’m trying to create a group of condition variables using a Map<String, Boolean> but I get the following error:

“The method setVariables(Map<String,Object>) in the type ConditionEvaluationBuilder is not applicable for the arguments (Map<String,Boolean>)Java(67108979)”

This is what I’m doing:

    Map<String,Boolean> estadoDespachos = new  HashMap<String,Boolean>();
    
    estadoDespachos.put("disupAssinado", false);
    estadoDespachos.put("diretAssinado", false);
    estadoDespachos.put("presidenciaAssinado", false);

    List<ProcessInstance> instances = runtimeService
    .createConditionEvaluation()
    .setVariables(estadoDespachos)
    .evaluateStartConditions();

Hi @Pedro_Ribeiro,

I think it’s a Java issue with the typing of values.

If you declare your map like

Map<String, Object> estadosDespachos = new HashMap<String, Object>();

you should be fine.

Hope this helps, Ingo

Thanks, that worked… I thought I had to declare the type of the object…