AnsweredAssumed Answered

HashMap problem in Activiti

Question asked by zlatan316 on Feb 11, 2014
Latest reply on Feb 11, 2014 by zlatan316

I have the below code which gives me a HashMap and sets it as the variable.

   public void execute(DelegateExecution execution) throws Exception {      
      Reader readerObj = new Reader();; // Creates values in a HashMap within Reader.
      MainClass mc = new MainClass(); = readerObj.getMap(); // Passes the created HashMap into a new global one.
      mc.decision = true;
      execution.setVariable("decisionVar", mc.decision);
      execution.setVariable("mapVar",; // Sets the HashMap Variable      

I then want to ideally get something from the HashMap. I tried using ${mapVar.IsEmpty()} on a flow to return a true condition, but it gives me the message "Unknown method used in expression ${mapVar.IsEmpty()}. IsEmpty() is a method that belongs to the HashMap<> collection.

Can someone please explain where I am going wrong?