Read values from arraylist

states is a Map. It uses the Item as the key so the following might work.

MyItem.postUpdate(states.get(MyItem))

If it doesn’t work, you’ll need to filter the keys for the one with the name of the Item you want. See Design Pattern: Working with Groups in Rules.

val key = states.keySet.filter[ i | i.name == "MyItem"]
MyItem.postUpdate(states.get(key))